Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Will downvote if the answer is wrong or copied Ex. 3 (15 pts) Suppose we have two kinds of doctors: hospital doctors and family physicians.

image text in transcribedWill downvote if the answer is wrong or copied

Ex. 3 (15 pts) Suppose we have two kinds of doctors: hospital doctors and family physicians. In addition to the doctor's id number, name, specialty, and years of experience, we want to record the hospital name for the hospital doctors, and the office address for the family physicians. There can be doctors that are working in a hospital who are at the same time family physicians in their free time. Also there can be doctors for whom we don't know whether they are working in a hospital and/or whether they are family physicians or whether they are not working at all. (5 pts) Draw an E/R diagram capturing the above description. (5 pts) Translate your E/R diagram into a relational schema using the E/R approach and write the SQL statements for the table creation. Specify primary keys and foreign keys. (5 pts) Write SQL INSERT statements to insert at least one tuple (that you create) into each table. Ex. 3 (15 pts) Suppose we have two kinds of doctors: hospital doctors and family physicians. In addition to the doctor's id number, name, specialty, and years of experience, we want to record the hospital name for the hospital doctors, and the office address for the family physicians. There can be doctors that are working in a hospital who are at the same time family physicians in their free time. Also there can be doctors for whom we don't know whether they are working in a hospital and/or whether they are family physicians or whether they are not working at all. (5 pts) Draw an E/R diagram capturing the above description. (5 pts) Translate your E/R diagram into a relational schema using the E/R approach and write the SQL statements for the table creation. Specify primary keys and foreign keys. (5 pts) Write SQL INSERT statements to insert at least one tuple (that you create) into each table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is the distinction between client/server and intranet?

Answered: 1 week ago

Question

What are the determinants of cash cycle ? Explain

Answered: 1 week ago

Question

3. You can gain power by making others feel important.

Answered: 1 week ago