Find the patients who have made an appointment with a


Kindly refer to the "CREATE TABLE" commands given at the end to answer the following questions.

(1a) Did the SQL programmer enforce the constraint that every doctor practices in a unique hospital? If so, how? If not, how do

you know, and how, if at all, could this constraint have been implemented?

(1b) Did the SQL programmer enforce the constraint that every patient has at least one doctor? If so, how? If not, how do you

know, and how, if at all, could this constraint have been implemented?

(1c) Did the SQL programmer enforce the constraint that every patient can be hospitalized in at most one hospital? If so, how? If

not, how do you know, and how, if at all, could this constraint have been implemented?

2. Write SQL queries to answer the following questions. Try to use a simple SELECT without sub-queries.

(a) Find all doctors who went to Harvard as their medical school and who have been practicing for at least 10 years.

(b) Find the names and SSNs of all doctors who have diagnosed anyone with an incurable disease.

(c) Find the patients who have made an appointment with a doctor who does not treat them.

 

Solution Preview :

Prepared by a verified Expert
Programming Languages: Find the patients who have made an appointment with a
Reference No:- TGS01241432

Now Priced at $30 (50% Discount)

Recommended (90%)

Rated (4.3/5)