Professional Documents
Culture Documents
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
Tabl2:
C1 C3 C4 C5 Primaery key:C1+C3
Tabl1:
Primaery key:C1
C1 C2
Foregin Key: none
Tabl2:
C1 C3 C4 Primaery key:C1+C3
Tabl3:
C4 C5
Primaery key:C4
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