Question: 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):

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

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) ).

You have multiple Many-to-Many relationships, but I do not see any middle

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!