Normalization in DBMS11
Normalization in DBMS11
Important Instructions :
• Each question will have 5 (five) choices with one or more correct answers.
• The mark given for a question will vary from 0 (All the incorrect choices are
marked & no correct choices are marked) to +1 (All the correct choices are
marked & no incorrect choices are marked).
• Mark the correct choices on the question paper first and then transfer them
to the given answer sheet which will be machine marked. Please
completely read and follow the instructions given on the other side
of the answer sheet before you shade your correct choices.
1
1) A database management software (DBMS) is
(a) Recovery of data in case of an accidental or purposeful damage to the data is part of data
management.
(b) Management of data is critical as data is a corporate resource.
(c) Authentication procedures of users are established using data management techniques.
(d) The database administrator is the only person who carries out all the data management tasks
of a database.
(e) Data Management provides procedures which specify how and when data is to be entered
into a system.
4) In addition to database management software, what is/are the other possible type(s) of software
which a database application will have ?
(a) Languages used for coding user interfaces and application programs
(b) Presentation software for documenting the design of the database
(c) Computer-aided software engineering tools (CASE)
(d) A fourth generation language such as Structured Query Language
(e) Tools to monitor performance, allowing a human expert to make the necessary adjustments
after reviewing the statistics collected
2
6) Consider the following statements about three levels ANSI/SPARC architecture.
(i) External-Various user views exist and each of these views gives a user-oriented
description of the data elements and relationships of which the view is composed.
These views are defined using sub schema data definition language.
(ii) Logical- The result of the logical design which involves analysis of important needs of
users
(iii) Physical-The precise physical structure and the exact physical location of the database
which is defined by the database administrator using data definition language (DDL) or
statements of SQL
(a) (i)only (b) (iii) only (c) (i) and (ii) only
(d) (i) and (iii) only (e) All
7) Which of the following is/are correct with respect to entities and attributes?
(a) An entity may be an object with a physical existence like a car, a house or an
Employee.
(b) One cannot consider something which has conceptual existence like a course in a
degree program as an entity.
(c) Age can be considered as a single value attribute of a person.
(d) The attribute Date_of_birth can be considered as a derived attribute and similarly, the
Age can be considered as a stored attribute.
(e) An entity type describes the schema or intension for a set of entities which share the
same structure.
(a) An Entity integrity constraint states that no primary key value can be null.
(b) The referential integrity constraint is specified between two relations.
(c) A foreign key cannot be used to refer to its own relation.
(d) The domain integrity constraints are used to specify the valid values which a column
defined over the domain can take.
(e) Referential integrity is used to maintain consistency among tuples in the relations.
3
(b) (ii) only
(c) (iii) only
(d) (i) and (iii) only
(e) (ii) and (iii) only
Based on the following relations, answer question 11-14
Sailors (Sid, Sname, rating, age)
Boats (Bid, Bname, color)
Reserves (Sid, Bid, date)
11) Find the names of sailors who have reserved Bid 911.
13) Find the Sid’s of sailors with age over 20 who have not reserved a green boat
14) Find the names of sailors who have reserved a red or green boat
(a) The HAVING clause is used in a SELECT statement to filter the records which a GROUP
BY clause returns.
4
(b) The IN operator assists one in providing multiple values in the WHERE clause.
(c) The COUNT returns the number of columns which match the given criteria.
(d) The JOIN keyword is used to query data from two tables.
(e) The DISTINCT keyword is used to find out how many unique values there are in a table.
17) Which of the following is/are in correct SQL syntax with respect to creating a customers table that
stores customer ID, name and address? The customer ID should be the primary key of the table.
5
(e) CREATE CUSTOMERS TABLE
(customer_id integer (3) not null,
customer_name varchar(50) not null,
address varchar(50),
PRIMARY KEY (customer_id) ON DELETE CASCADE
);
19) Which of the following operators cannot be used with the WHERE clause ?
Consider the following example of a table called "Persons" defined by figure 1 and answer
question 20 and 21.
6
FirstName LastName City FirstName LastName Address
Thepul Ginige Ambalangoda Thepul Ginige No 46, First Lane
Kanchana welivitiya Borella Jeevani Goonathillake 6A, Flower road
Anuradha Gunathilake Dehiwella Anuradha Gunathilake No 254/3A,Galle Road
Ajith Jayasuriya Kandy Figure-3
Kapila Dias Maharagama
Jeevani Goonathillake Nugegoda
Figure-2
20) Which of the following SQL statements is/are in correct SQL syntax in order to generate an output
from figure-1 to figure-2?
21) Which of the following SQL statements is/are in correct SQL syntax in order to generate an output
from figure-1 to figure-3?
Which of the following SQL-query/queries can be used to retrieve all Gold award winners with
each winner’s name, category and year?
7
(b) SELECT p.name, c.category_name, w.year
FROM Participants p, Categories c, Winners w
WHERE p.pno=w.pno and c.code=w.code and award="Gold";
Store_Sales Internet_Sales
store_name Sales Date Date Sales
Colombo Rs450,000 Jan-01-2008 Jan-01-2008 Rs50,000
Kandy Rs250,000 Jan-03-2008 Jan-04-2008 Rs35,000
Colombo Rs375,000 Jan-05-2008 Jan-05-2008 Rs15,000
Kandy Rs150,000 Jan-08-2008 Jan-07-2008 Rs25,000
23) The following incomplete SQL statement is written to find out all the dates where there are both
store_sales and internet_sales.
Which of the following SQL keywords is correct to fill the above blank in (A)?
24) Which of the following SQL statements is/are in correct SQL syntax in order to find overall sales
of each store, where the total sale is more than Rs 500,000?
8
(a) SELECT store_name , SUM (Sales) (b) SELECT store_name , SUM (Sales)
FROM Store_Sales FROM Store_Sales
HAVING SUM(Sales) > 500,000; GROUP BY store_name
HAVING SUM(Sales) > 500,000;
(c) SELECT store_name , SUM (Sales) (d) SELECT store_name , SUM (Sales)
FROM Store_Sales FROM Store_Sales
WHERE Sales > 500,000; WHERE Sales > 500,000
GROUP BY store_name;
25) Which of the following SQL statements is/are in correct SQL syntax in order to find the names of
sailors who have reserved Bid 911?
26) Which of the following SQL statements is/are in correct SQL syntax in order to find the colors of
boats reserved by ‘Wasantha’?
9
(a) SELECT B.color
FROM Sailors S, Reserves R, Boats B
WHERE S.Sid=R.Sid AND R.Bid=B.Bid AND S.Sname="Wasantha”;
27) Which of the following SQL statements is/are in correct SQL syntax in order to find the names of
sailors who have reserved a red or green boat?
10
((SELECT B.Bid
FROM Boats B)
EXCEPT
(SELECT R.Bid
FROM Reserves R
WHERE R.Sid=S.Sid) );
Which of the following is/are in correct with respect to the output of above statement?
Which of the above statements is/are correct with respect to VIEWS in SQL?
(a) (i) only. (b) (ii) only. (c ) (i) and (ii) only.
(d) (ii) and (iii) only. (e) All.
30) Which of the following is a GRANT/REVOKE privilege(s) for a user of a table ?
31) Consider the two tables, Department and Employee. If many employees are working for a
department and only one employee can work for one and only one department, in which table
should the corresponding foreign key be placed?
(a) Foreign key needed only in Department table
(b) Foreign key needed only in Employee table
(c) Foreign key needed in both tables
(d) A new table has to be defined including the primary keys of both Employee and
Department tables.
(e) No foreign keys should be used.
Which of the following SQL statements is/are in correct SQL syntax in creating a view to store
overall sales by region?
11
(a) CREATE VIEW REGION_SALES (REGION, SALES) AS
SELECT R.region_name , S.Sales
FROM Region _Sales R, Store_Sales S
WHERE R.store_name = S.store_name
GROUP BY R.region_name;
Customer
OrderTbl
OrdLine
Product
Employee
33) If a new customer calls for the first time and places an order for 5 different products (all with
distinct ProdNo values), then how many rows are needed to be added to the database to store the
required information about this customer and the relevant order?
12
34) Consider the following incomplete statement.
For a specific row in the OrdLine table, there should be ____(i)____ corresponding row(s) in the
OrderTbl table, and ___(ii)____ corresponding row(s) in the Product table.
Which of the following is/are correct with respect to filling the above blanks ?
(a) (i) One, (ii) One (b) (i) One, (ii) Many (c) (i) Many, (ii) One
(d) (i) One, (ii) Many (e) (i) One, (ii) No
35) Which of the following is/are required to be inserted as a new entry to ‘OrderTbl’ table ?
36) Which of the following is/are correct when a command is given to delete a row from ‘OrderTbl’
table ?
(a) It will delete a row from ‘OrderTbl’ table and the relevant row(s) from ‘OrdLine’ table.
(b) It will delete a row from ‘OrderTbl’ table and the relevant row from ‘Product’ table.
(c) It will delete a row from ‘OrderTbl’ table and the relevant row from ‘Employee’ table.
(d) It will delete a row from ‘OrderTbl’ table, the relevant row(s) from ‘OrdLine’ table and
the relevant row from ‘Product’ table.
(e) It will delete a row from ‘OrderTbl’ table, the relevant row(s) from ‘OrdLine’ table and
the relevant row from ‘Employee’ table.
37) Consider the following statements about mapping associative entities in an Entity Relationship
Diagram (ERD) to Relations.
(i) Create a relation for the two entity types participating in the relationships.
(ii) Create a new associative relation for the associative entity and include primary key of each of
the two participating entity types as foreign key.
(iii) The relational model does not directly support mapping associative entities in an ERD to
Relations.
13
Which is a/are correct statement(s) with respect to information in the above diagram?
(a) Name is a multi-valued attribute.
(b) Employee is week entity.
(c) Age is a derived attribute.
(d) Phone is a composite attribute.
(e) Supervision is a Unary Relationship.
39) Consider the following ERD diagram illustrating the relationship between employees and projects.
Select from among the following, candidates for relations, if the above ERD is mapped into a
relational model.
(a) Employee(Emp_No, First_Name, Mid_Initials, Last_Name)
(b) Employee(Emp_No,Name)
(c) Project(Proj_ No, Proj_Name)
(d) Works_On(Emp_No, Proj_No,Hours)
(e) Works_On(Hours)
40) Which of the following statements is/are true with respect to data types?
(a) VARCHAR data type often reduces disk storage wastage when compared to CHAR data
type.
(b) BLOB data is a set of streams of bytes of fixed length.
(c) BYTE data type cannot store any type of binary data.
14
(d) Both INTEGER and FLOAT are Numeric data types.
(e) The DATE type has eight positions.
41) Which of the following statements is/are correct with respect to1NF of the above schema?
(a) The above schema is already in 1NF.
(b) Employee (EmpNo,EmpName, NIC)
Telephone (Home,Mobile)
Project (ProNo,ProName,ProHours)
(c) Employee (EmpNo,EmpName, NIC)
Telephone (EmpNo, Home,Mobile)
Project (EmpNo, ProNo,ProName,ProHours)
(d) Employee (EmpNo,EmpName, Telephone,
{Project(ProNo,ProName,ProHours)},NIC)
(e) The above schema has completed the 1NF requirements and now it is in 2NF
42) Which of the following statements is/are correct with 2NF of above schema?
(a) The above schema is already in 2NF.
(b) Employee (EmpNo,EmpName, NIC)
Telephone (EmpNo,Home,Mobile)
Project1 (EmpNo, ProNo)
Project2 (ProNo, ProName,ProHours)
(e) The above schema has completed the 2NF requirements and now it is in 3NF.
44) Which of the following statements is/are true with respect to embedded SQL?
15
(a) It writes an SQL statement to retrieve data from more than one relation
(b) Static and dynamic are the two types of embedded SQL.
(c) It does not have flag statements to signal the beginning or end of a set of SQL statements
in application programs
(d) It specifies a condition and action to be taken in case the given condition is satisfied.
(e) Embedded SQL has cursor facility where the result of an SQL query is stored for
subsequent processing.
45) Which of the following statements is/are true with respect to triggers?
47) Which of the following statements is/are true with Stored procedures?
(a) Stored procedures are SQL programs which are compiled the first time they are executed and
then stored for later use.
(b) Stored procedures can get executed very fast as they have already been compiled.
(c) Stored procedures are part of the DBMS that defines the structure of user data and how they
are to be used.
(d) A stored procedure is a named group of SQL statements which has been previously created
and stored in the server database.
(e) Stored procedures increase network traffic since they would be used over the network by
several clients.
48) Which of the following statements is/are true with respect to ODBC?
16
(d) It enables SQL statements to be incorporated into the application allowing the application
to retrieve and update values from a database.
(e) It is a driver that contains all information to access a specific instance of data in a DBMS.
(a) (i) and (ii) only (b) (i) and (iii) Only (c) (ii) and (iii) only
(d) (i) only (e) All
50) Which of the following statements is/are true with respect to a distributed database?
(a) It is a database that consists of two or more data files located at different sites on a
computer network.
(b) Different users can access it without interfering with one another.
(c) The DBMS must periodically synchronize the scattered databases to make sure that they
all have consistent data.
(d) A distributed database allows faster local queries and can reduce network traffic.
(e) A fault in one database system will affect the entire database.
********
17