Er Diagram Solutions
Er Diagram Solutions
Er Diagram Solutions
Questions
Questions
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.
Assumption:
Customers have one or more cars each
Each car is associated with zero to any number of
accidents recorded
Question
Car insurance tables:
person (driver-id, name, address)
car (license, year, model)
accident (report-number, date, location)
Participated (driver-id, license, report-number,
damage-amount)
ER diagram of Car Insurance Company
Questions
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.
Assumption:
Questions
Hospital tables:
patients (patient-id, name, insurance, date-admitted,
date-checked-out)
doctors (doctor-id, name, specialization)
test (testid, testname, date, time, result)
doctor-patient (patient-id, doctor-id)
test-log (testid, patient-id) performed-by (testid,
doctor-id)
ER Diagram of Hospital
Question
Draw the ER diagram of following case.
Kathmandu Engineering college maintains data about the
following entities: (i) Courses, including number, title,
credits, syllabus and prerequisites; (ii) Course offering,
including course number, year, semester, section number,
instructor(s), timings and classroom; (iii) Student, including
student-id, name, address and program; and (iv) instructors,
including identification number, name, department, course
taken. Further, the enrollment of students in courses and
grades awarded to students in each course they are enrolled
for must be appropriately modeled.
Answer
The main entity sets are student, course, course-offering, and
instructor. The entity set course-offering is a weak entity set
dependent on course.