0% found this document useful (0 votes)
75 views3 pages

EX ch12

erd questions

Uploaded by

kokiiahmed2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views3 pages

EX ch12

erd questions

Uploaded by

kokiiahmed2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Entity-Relationship Modeling

1. Given the following descriptions, create an appropriate ER diagram for each of the
specified relationships.

(a) Each company operates four departments, and each department belongs to one
company.
(b) Each department in part (a) employs one or more employees, and each
employee is employed by one department.
(c) Each of the employees in part (b) may or may not have one or more
dependants, and each dependant belongs to one employee.
(d) Each employee in part (c) may or may not have an employment history.

2. Represent all of the relationships described in Question 1 as a single ER diagram.

3. Create an ER diagram to represent the tables of the StayHome video rental shop (as
described in the Access 2000 manual).

4. The IT Training Group (Glasgow) has contacted you to create a conceptual model
by using the Entity-relationship data model for a database that will meet the
information needs for its training program. The Company Director gives you the
following description of the training group's operating environment.

The Company has twelve instructors and can handle up to one hundred trainees per
training session. The Company offers five advanced technology courses, each of
which is taught by a teaching team of two or more instructors. Each instructor is
assigned to a maximum of two teaching teams or may be assigned to do research.
Each trainee undertakes one advanced technology course per training session.

Given this information, draw an ER diagram for IT Training Group (Glasgow).

5. Suppose you are involved in developing a database system for the Sales
Department of a company. The operation of the Department can be described as
follows.

They have a file of products that they provide to their customers. Each type of
product has a unique product number, as well as a description, a cost and a price.
The number of the product in stock and the number allocated are updated
regularly. When the number in stock decreases to the reorder level, the product is
reordered in a pre-decided quantity.
They have a file of customers. Each customer is given a unique customer number.
This file also contains customer names that consist of their first and last names,
and customer addresses composed of street, city and postcode and the customer
telephone number. Each customer has a credit limit, which is used to validate
their orders.

A customer may place zero, one or more orders at a time, and an order is always
placed by one customer alone. Each order is identified by a unique order number.
Other information as to orders includes the date due, the total price, and the
status, that is, an order may be outstanding, partially delivered, or fully delivered
and invoiced.

An order may involve one or more than one type of products, and a type of
products may be involved in more than one order. For each product being ordered
in an order, its quantity, total price, and status (i.e., outstanding, partially
delivered, or fully delivered) are recorded and updated regularly.

Given this information, draw an ER diagram for this Sales Department.

6. A Sample Solution Suppose you are given the following requirements for a
simple database for the National Hockey League (NHL): · the NHL has many
teams, · each team has a name, a city, a coach, a captain, and a set of players, ·
each player belongs to only one team, · each player has a name, a position (such
as left wing or goalie), a skill level, and a set of injury records, · a team captain is
also a player, · a game is played between two teams (referred to as host_team and
guest_team) and has a date (such as May 11th, 1999) and a score (such as 4 to 2).
Construct a clean and concise ER diagram for the NHL database using the Chen
notation as in your textbook. List your assumptions and clearly indicate the
cardinality mappings as well as any role indicators in your ER diagram.

7. Construct an E-R diagram for a car-insurance company whose customers own one
or more cars each. Each car has associated with it zero to any number of recorded
accidents.

8. Construct an E-R diagram for a hospital with a set of patients and a set of medical
doctors. Associate with each patient a log of the various tests and examinations
conducted.

‫تخيل انك عضو في فريق تطوير نظام خاص بمستشفى وقد‬ .9


‫ بحسب الوصف التالي‬ERD ‫طلب منك تصميم نموذج‬
‫ يأتي المرضى الى المشفى لمراجعة االطباء‬,‫يوجد لدى المشفى عدد من المرضى وعدد من االطباء يعملون في اقسام مختلفة‬
‫المختلفين قد يكون لدى المريض تحاليل مختلفة وفحوصات كذلك و البد من تسجيل كافة البيانات الخاصة بالمريض في كل‬
) ‫ ادوية وخالفه‬, ‫ تحاليل‬, ‫زيارة ( تشخيص‬
10. A university registrar’s office maintains data about the following entities: (a)
courses, including number, title, credits, syllabus, and prerequisites; (b) course
offerings, including course number, year, semester, section number, instructor(s),
timings, and classroom; (c) students, including student-id, name, and program;
and (d) instructors, including identification number, name, department, and title.
Further, the enrollment of students in courses and grades awarded to students in
each course they are enrolled for must be appropriately modeled. Construct an E-
R diagram forth registrar’s office. Document all assumptions that you make about
the mapping constraints.

a. a class meets only at one particular place and time. This E-R diagram cannot
model a class meeting at different places at different times.
b. There is no guarantee that the database does not have two classes meeting at
the same place and time.

You might also like