HW #1 Answer Key


#1.1 List four significant differences between a file-processing system and a DBMS



#1.2 This chapter has described several major advantages of a database system. What are two disadvantages?




#1.3 Explain the difference between physical and logical data independence



#2.1 Explain the distinctions among the terms primary key, candidate key, and superkey


#2.2 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


#2.3 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.





#2.4 Construct an E-R diagram for the registrar's office. Document all assumptions you make about the mapping constraints.



#2.5 Consider a database used to record the marks that students get in different exams of different course offerings.

(a) Construct an E-R diagram for the database modeling exams as entities and using a ternary relationship


(b) Construct an alternative E-R diagram that uses only a binary relationship between students and course-offerings. Make sure that only one relationship exists between a particular student and course-offering pair, yet you can represent the marks that a student gets in different exams of a course offering



#2.6 Construct appropriate tables for each of the E-R diagrams in exercises 2.2 to 2.4.


For #2.2:

Vehicle(VIN, vehicle-make, vehicle-model, vehicle-year, License-plate)

Customer( customer-name, customer-address)

Accident-record( date)

Owns (customer-name, VIN)

Involved-in-accident (VIN, date)

For #2.3:

Patient(SS#, name, insurance)

Physician ( name, specialization)

Test-log( SS#, test-name, date, time)

Doctor-patient (physician-name, SS#)

Patient-history(SS#, test-name, date)

For #2.4:

Student(SS#, name)

Class(Course#, time, location, department)

Instructor(Iss#, name)

Teaches-class(Iss#, Course#, time, location)

Takes-class (SS#, Course#, time, location, grade)