How does your ER diagram and schema change if a patient can undergo several surgeries (on di erent days, with possibly different surgeons) and if several surgeons can be involved in a single operation?

What will be an ideal response?

Solution:
Change to E-R diagram: dark arrow from patient to operation replaced by dark line.
Change to schema:


CREATE TABLE Operation (
Pid INTEGER,
Sid INTEGER,
Date DATE,
PRIMARY KEY (Sid, Date),
UNIQUE (Sid, Date),
FOREIGN KEY (Pid) REFERENCES Patient(Id),
FOREIGN KEY (Sid) REFERENCES Surgeon(Id))


Note: Adding constraint UNIQUE (Pid, Date) in an attempt to limit a patient to one
surgery a day will also eliminate the possibility of multiple surgeons performing a single
operation, so it is not included.

Computer Science & Information Technology

You might also like to view...

A customer is reporting that after removing a laptop from the docking station and bringing it home, the cursor occasionally jumps around the screen while the customer is typing. Which of the following should the technician do to mitigate this issue?

A. Disable the touch pad on the laptop B. Install new keyboard drivers for the laptop C. Install new drivers for the docking station D. Disable the keyboard on the laptop

Computer Science & Information Technology

The generally accepted definition of ____________________ refers to guessing, breaking, and/or stealing passwords to gain access to a system or application.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology