Sample Dbms Paper
Sample Dbms Paper
Section A
1. .......... and ………. used to find the number of values in a column and the average value.
a. TOTAL, AVG
b. COUNT, AVG
c. COUNT, AVG
d. SUM, AVG
6. In 2NF
a. No functional dependencies exist.
b. No multivalued dependencies exist.
c. No partial functional dependencies exist
Page 1 of 5
d. No partial multivalued dependencies exist.
8. A ………………. does not have a distinguishing attribute if its own and mostly are dependent
entities, which are part of some another entity.
a. Weak entity
b. Strong entity
c. Non attributes entity
d. Dependent entity
Page 2 of 5
d. Software runs in a server
15. _____ integrity ensures that each row can be uniquely identified via one or more attributes
called the primary key
a. Domain integrity
b. Entity integrity
c. Referential integrity
d. None of the above
19. Aggregate functions are functions that take a ___________ as input and return a single value.
a. Collection of values
b. Single value
c. Aggregate value
d. Both a & b
20. A relation is ................... if every field contains only atomic values and, no lists or sets.
a. 1 NF
b. 2 NF
c. 3 NF
d. None of above
(Total-40 marks)
Page 3 of 5
Section B
Q1
Consider the following requirements given to build a database for ABC Pvt Ltd.
ABC Pvt Ltd is an item manufacturing company with several plants island wide. These plants
are responsible for leading different projects that the company undertakes. A certain plant
may control a number of projects, but a project is always under the control of one plant. All
plants have a name, number (unique), budget and several buildings at different locations.
There are number of employees working in a plant and each employee works in only one
plant. For each employee the name (first name and surname separately), employee number
(unique), address, gender and salary are recorded. The date that an employee was employed
is also recorded.
Some employees are assigned to work on one or more projects simultaneously. Each project
has one or more employees. Each project has a name, number (unique) and a single location.
The time an employee has been assigned to a particular project should be recorded.
Some employees also supervise other employees, but all employees need not be supervised.
An employee is supervised by just one employee but an employee may supervise several
employees.
Some employees may have several dependents. A dependent can only be a dependent of one
employee at any time. For each dependent the dependent’s name, relationship, birth date
and gender are recorded.
The company offers credit union facilities as a service to its employees. An employee is not
required to become a member of ABC Credit Union (ACU). However most of employees have
accounts in ACU. Every ACU account must belong to one employee. ACU accounts are
identified by a unique account number. For each ACU account, account type and the balance
are also recorded.
A. Draw an Entity Relationship diagram and use the relational mapping rules to create a linked
relational schema. State any assumptions you make.
(15 marks)
B. Convert the ER Diagram in part (A) to the Relational Model
(5 marks)
(Total-20 marks)
Q2
A. Define followings using suitable examples
I. Participation constrains
II. Integrity constraints (4 marks)
Page 4 of 5
C. Consider the following health history report.
HEALTH HISTORY REPORT
pet id pet name pet type pet age owner visit date Proc no procedure
246 Rover Dog 12 Sam Jan 13/2014 01 rabies vaccination
Cook Mar 27/2014 10 examine and treat
Apr 02/2015 05 heart worm test
341 Jerry Cat 4 Sam Jan 23/2014 01 rabies vaccination
Cook Jan 13/2015 01 rabies vaccination
519 Tweedy Bird 2 Terry Apr 30/2014 20 annual check up
Kim Apr 30/2015 12 eye wash
The above report can be converted to un-normalized form relational model as follows.
Convert above un-normalized relation to Third Normal Form. You must provide appropriate
justifications/reasons for each change you make during the normalization process.
(10 Marks)
(Total-20 marks)
Q4
Consider the following tables and answer the questions given below.
Stock Table
ItemCode – Primary Key
ItemCategory – Foreign key from the field ItemCategory of ItemCategory table
ItemDescription – Cannot contain null values
QuantityInHand
CostPrice – Acceptable data values should be between 100 and 10000
SalesPrice
ItemCategory Table
ItemCategory – Primary Key, Only accepts values S,M,C,D
CategoryName