Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

According to this feedback please help me to solve this problem. Thanks You have multiple Many-to-Many relationships, but I do not see any middle tables

According to this feedback please help me to solve this problem. Thanks

You have multiple Many-to-Many relationships, but I do not see any middle tables in the Schema to support that. Thinks about it, each patient can have many illnesses, but how are you going to put more than one in a row in the Customer table? Also, if you have FK such as Illnesses_id in the Patient schema, you must have an attribute for it, not just the FK. Do not store age attribute in Patient, instead store Date of Birth.

You did not include any Creation Date or Last Update attributes in any of your tables.

After getting the initial drawing, take the time to redraw it and try to get rid of any lines that cross over. There is no reason the Entity Doctor Specialty has to be in the middle of the ERD, it could be over to the left of the Doctor and thus not have to cross lines.

Part 1: Entity-Relationship Diagram (ERD):

image text in transcribed

1. In project database each doctor can accept MANY insurances, and one insurance can be accepted by MANY doctors

2. Each patient can have appointments to many doctors in the database; in the same instance each doctor can have appointments with many patients from the database.

3. Each patient may have many Illnesses, each illness can also be with more than one patient

4. One doctor has one Specialty.

5. One patient has one Insurance.

Part 2: Relational Schema:

a) Doctor ( Doctor_id: integer, doc_F_Name: varchar(35), doc_L_Name: varchar(35), doc_DOB: DATETIME.

foreign key Specialty_id references Doctors Specialty (Specialty_id)

foreign key Insurance_id references Insurance(Insurance_id)

foreign key Patient_id references Patient(Patient_id)).

b) Patients ( Patient_id: integer, Patient_F_Name: varchar(35), Patient_L_Name: varchar(35), Patient_Age: integer, Patient_Street: varchar(50), Patient_City: varchar(50), Patient_Phone_Number: integer.

foreign key Doctor_id references Doctor(Doctor_id)

foreign key Insurance_id references Insurance(Insurance_id)

foreign key Illnesses_id references Illnesses(Illnesses_id) ).

c) Illnesses (Illnesses_id:integer, Name_of_Illnesses: varchar(65), Description: varchar(200).

foreign key Doctor_id references Doctor(Doctor_id

foreign key Patient_id references Patient(Patient_id)).

d) Insurances (Insurances_id: integer, Insurances_Company_Name: varchar(100), Insurances_Type: varchar(100), City: varchar(50), State: varchar(15), Insurances_End_Date: DATETIME.

e) Doctors Specialty (Doctors_Specialty_ID:integer, Name_of_specialty: varchar(100) ).

image text in transcribed

awe E lawl tuee Skille Nome 1ype Soeton's Spee Doe.speiokHy.1D Specialty

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: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions

Question

=+5 Does this case provide an example of the future for IHRM?

Answered: 1 week ago

Question

=+4 How did it affect HR?

Answered: 1 week ago