数据库代写 | COMP 418 Assignment 4

本次加拿大代写是一个数据库管理系统相关的assignment

Q 1: (11 points)

Design a database for a national family medicine practice with a set of patients and a set of medical doc
tors. The database should capture the relationship between doctors and patients, where a patient can possibly
have a family doctor, or multiple doctors. The database should also store the patients tests. The tests can be
ordered by one or more doctors, but this is not mandatory since a test can be ordered by a nurse practitioner
(no need to model nurses). The database should keep track of the dates of the tests as well as their results.
Draw an ER-diagram for your design. Feel free to include any attributes you find relevant to this database.
Underline the primary key in the entity sets.

Q 2: (6 points)
Reduce your ER-diagram to relations. Underline primary keys.

Q 3: (5 points)
If any test must be ordered by a doctor, what needs to be changed in your answer to Q1? Either draw a
new ER-diagram, or describe the changes. How will the reduced relations change?

Q 4: (14 points)
Consider the following ER diagram for a database design for a car insurance company:

Construct the relation schemas for this ER diagram.