You are on page 1of 3

Q1] Design a generalization-specialization hierarchy for a motor-vehicle sales

company. The company sells motorcycles which have an engine number and
cost; cars which have a chassis number, an engine number, seating capacity and
cost; trucks which have chassis number, an engine number and cost.

Q2] Map the following ER diagram to a relational database. Give the relation
names and attributes in them. Also mention the primary key and foreign keys if
any for each table.

Q3] Given the dependency diagram shown in the following figure, (the primary
key attributes are underlined)
(i) Identify and discuss each of the indicated dependencies.
(ii) Create a database whose tables are at least in 3NF, showing dependency
diagram for each table

Answer:
I)

C1  C2 represents a partial dependency, because C2 depends only on C1, rather than on the entire
primary key composed of C1 and C3. C4  C5 represents a transitive dependency, because C5 depends
on an attribute (C4) that is not part of a primary key. C1, C3  C2, C4, C5 represents a set of proper
functional dependencies, because C2, C4, and C5 depend on the primary key composed of C1 and C3.

II) Tabl1:

Primaery key:C1
C1 C2
Foregin Key: none

Nrmal Form 3NF

Tabl2:

C1 C3 C4 C5 Primaery key:C1+C3

Foregin Key: C1 to table1

Nrmal Form 2NF,because the table exhibit the


transitive dependies c4=>c5

Tabl1:

Primaery key:C1
C1 C2
Foregin Key: none

Nrmal Form 3NF

Tabl2:

C1 C3 C4 Primaery key:C1+C3

Foregin Key: C1 to table1

Nrmal Form 2NF,because the table exhibit the


transitive dependies c4=>c5

Tabl3:
C4 C5
Primaery key:C4

Foregin Key: None

Nrmal Form 3NF


Q4] The entity set EMPLOYEE is a generalization of the entity sets
FULL_TIME_EMPLOYEE and PART_TIME_EMPLOYEE. The former is a
generalization of the entity sets FACULTY with attributes degree and subject of
interest and STAFF with attribute classification; the latter, is a generalization of
the entity sets TEACHING with attribute stipend and CASUAL_FACULTY with
attribute hour rate. STAFF inherits the attribute Salary of the entity set
FULL_TIME_EMPLOYEE and the latter, in turn, inherits the attributes of
EMPLOYEE. FULL_TIME_EMPLOYEE is a specialization of the entity set
EMPLOYEE and is differentiated by the additional attribute Salary. Similarly,
PART_TIME_EMPLOYEE is specialization differentiated by the presence of the
attribute Type. Each employee must have attributes empno, name and hire_date.
(i) Draw an E-R diagram for the system.
(ii) Convert this E-R diagram to relational tables.

Q5] The tourism department wishes to computerize its data. The information
consists of monuments of tourist interest, their location and history. Monuments
are classified according to historical, religious and architecture importance. The
list of facilities available at each sport is also available. These give (i) living
accommodation in terms of hotels, their names, category and the number of
rooms available and (ii) local transport facilities in terms of service provider
name, tours with their tariff and timing. Arrive at an E-R diagram by identifying
the entities, relationships, attributes, primary keys and cardinality

You might also like