0% found this document useful (0 votes)
85 views5 pages

EERD To RelationalSchema+ Relations To ERDs Discussion Set 6

The document presents a set of discussion questions for a course on Database Systems Management, focusing on converting E-R diagrams to relational schemas. It includes tasks such as reverse-engineering E-R diagrams from given relations, creating E-R diagrams based on winery database requirements, and translating various E-R diagrams into relational schemas. Each question emphasizes the identification of primary keys, mapping constraints, and assumptions made during the design process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views5 pages

EERD To RelationalSchema+ Relations To ERDs Discussion Set 6

The document presents a set of discussion questions for a course on Database Systems Management, focusing on converting E-R diagrams to relational schemas. It includes tasks such as reverse-engineering E-R diagrams from given relations, creating E-R diagrams based on winery database requirements, and translating various E-R diagrams into relational schemas. Each question emphasizes the identification of primary keys, mapping constraints, and assumptions made during the design process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INSTITUTE OF FINANCE MANAGEMENT

CSU/ITU 07208: DATABASE SYSTEMS MANAGEMENT


BCS [1] & BIT [1], 2024/2025
DISCUSSION QUESTIONS SET 6: EERM vs RELATIONAL SCHEMA, DUE[ 02-06/06/2025]

Q1) This question tests how well you understand the algorithm for converting E-R diagrams to a
relational schema. An E-R diagram when concerted to relations gives the following relations;
A (h, i, j)
B (h, k, p, l, m) , FK (h) refs A, FK (p) refs C

C (p, q)
D(r, s, t)
E (u, v, w)
F(x, y, z)
R (h, r, w, x, ab, cd, ef);

FK (h) refs A
FK (r) refs D
FK (w) refs E
FK (x) refs F

You may assume that the same symbols refer to the same attribute and that different symbols refer to
different attributes. For example, the attribute h, in the relations A and B are the same, i.e.; they
come from a single entity set or relationship in the E-R diagram. Your task is to reverse-engineer
the E-R diagram from these relations; in other words, what E-R diagram could have produced these
(and only these) relations?

1
Q2) The owners of wineries at Cetawico Hombolo in Dodoma want to keep track of the different
wines, wine-growing estates, and wine dealers. For this, they set up a database containing the
following relations;

WINE (OCNo, WName, WEstate, Year, Percentage, Quality)

ESTATE (WEstate, Region, FYear, AQuality)

WDEALER (WDID, Name, Address)

OFFERS (WDID, OCNo, Price)

In the table WINE, the following data about wines are stored: the official control number of the
wine (OCNo), the name of the wine (WName), and the name of the wine-growing estate where
the wine is coming from (WEstate). Furthermore, the year of the wine, its alcoholic content
(Percentage, e.g., 5.2%), and its quality are stored (e.g. 1 -excellent, 2 – expensive, etc).

The table ESTATE contains information about the wine-growing estate, its region, the year of
the foundation, and the average wine quality. The table WDEALER stores the names and
addresses of wine dealers.

Finally, the table OFFERS stores information about wines offered by wine dealers and the price
each dealer charges for that wine.

Draw the Entity-Relationship Diagram for the above-given set of requirements. Please identify
primary key attributes as well as mapping constraints for the relationship sets. State any
assumptions made in the design of the E-R diagram

Q3) Consider the following database schema:

EMPLOYEE (fname, middle, lname, ssn, bdate, address, salary, dnumber)


DEPT (dname, dnumber)
PROJECT (pnumber, pname, plocation, dnumber)
WORKS_ON (ssn, pnumber, hours)
DEPENDENT (ssn, dependent_name, sex, bdate, relationship) The above relations store
information about a company. The meaning of most of the relations and attributes is
straightforward. For example, the first relation stores information about employees. The
department relation stores information.

2
About departments. Also, each project is associated with a given department and is located in a
single location. Finally, the Works_On and the Dependent relations store information about
which project each employee works on and the dependents of each employee.
Draw an ER Diagram from which the above database schema is derived (attributes required).
For each binary relationship you identified, state the cardinalities of the entities participating
in this relationship and indicate key attributes in each entity set. State any assumptions made in
the design of the E-R diagram.

Q4) Consider the following E-R diagram about a retail chain that sells watches in airport locations

Please translate the ER diagram into a relational database schema. Be certain to


indicate primary keys and referential integrity constraints.

3
Q5) Translate the following ER schema of an Airport Database into an equivalent relational schema.
Select approaches that yield the fewest number of relations; merge relations where appropriate.
Be certain to indicate primary keys and referential integrity constraints.

Q6) Production tracking is important in many manufacturing environments (e.g., the pharmaceuticals
industry, children’s toys, etc.). The following ER diagram captures important information in the
tracking of production. Specifically, the ER diagram captures relationships between production
lots (or batches), individual production units, and raw materials.

4
Lot#
ProductDesc
CreatedDate

Serial# ExactWeight Cost_of_Materials

PRODUCTION UNITS Includes LOT

ProductType QualityTest?

Created From

Material_ID RAW MATERIALS

Type UnitCost

Figure 1, ERD for the Production Tracking Database

Please convert the ER diagram into a relational database schema. Be certain to indicate
primary keys and referential integrity constraints.

Q7) Covert the following E-R diagram into a relational database (the primary keys are underlined)

You might also like