Answered step by step
Verified Expert Solution
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.
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. 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 tableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started