Week4.Hospital.Exercise.Solution

Week4.Hospital.Exercise.Solution - or more doctors. A...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Hospital Project Solution Los Angeles wants you to create a database for all its 20 county hospitals. It wants to keep track of which patients are in a hospital. There can be many patients in a hospital. It also wants to keep track of which doctor in a hospital is each patient’s primary doctor. A primary doctor can have many patients but a patient can only have one primary doctor. A doctor can only work in one hospital. Hospital is the parent and Patient is the child: One-to-many relationship. A hospital can have one or more patients. A patient can only have one hospital. Hospital is the parent and Doctor is the child: One-to-many relationship. A hospital can have one
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: or more doctors. A doctor can only work in one hospital. Doctor is the parent and Patient is the child: One-to-many relationship. A doctor can have zero or more patients. A patient can only have one primary doctor. HOSPITAL HospitalID (Primary Key) HospitalName HospitalAddress HospitalPhone PATIENT PatientID (Primary key) PatientName PatientAddress PatientPhone DocID (Foreign key to Doctor) HospID (Foreign key to Hospital) DOCTOR DocID (Primary key) DocName DocAddress DocPhone HospID (Foreign key to Hospital)...
View Full Document

Page1 / 2

Week4.Hospital.Exercise.Solution - or more doctors. A...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online