Where is the WEAK ENTITY in this ERD? and please explain what isthe weak entity? I don't
Question:
Where is the WEAK ENTITY in this ERD? and please explain what isthe weak entity? I don't see the weak entity.
If it's not in here then how to add a Weak entity and based onwhat?
Also how to determine the TOTAL Participation?
Could you please answer I need to understand these two parts
__________________________________________________________________________
Key points:
- Each patient?s personal details (name, address, and telephonenumber), and they are given an admission number.
- Patiets are then assigned to a particular ward.
- In each ward there are a number of doctors and nurses. (So,Ward: Doctor - 1: N)
- A patient will be treated by one doctor and several nurses.Which means (Doctor:Patient - 1:N) and (Nurse: Patient - N:N)
- Each doctor and nurse may be involved with severalpatients.(1:N)
So the ER diagram as required:
ER diagram:ER model is to represent the strucre of data by using entities andattributes and their reklations. ER diagram considers entities inreal world and relating with them. It is a graphical view.
Relational diagram:In Relational database model,the entities and relations arerepresented by using tables. Each table contains records andattribues.
ERD-Relational Schema
- If we have multi-valued attribute, make that attribute as newentity.
- In 1:1 Relationships, we are not considering relation asseperate entity. We add less priority table primary key as foreignkeyb of priority table.
- In 1:M relationships, we are not considering relation asseperate entity. We simply use primary key of one table as forignkey of another table.
- In M:M relationship, We need to create a relationship asseperate entity.
Now let us convert ER diagram to Relationaltables:
1) Relationship between Ward and Patient: As it contains 1:Nrelationship,we are adding primary key of Ward as foreign keyb ofPatient table.
Ward(Ward_Number,Ward_Name)Patient(Admission_Number,Name,Number,Address,Ward_Number)
2) Relationship between Doctor and Patient: As it contains 1:Nrelationship,we are adding primary key of Doctor as foreign keyb ofPatient table.
Doctor(Doctor_Id,Doctor_Name,Speciality)Patient(Admission_Number,Name,Number,Address,Ward_Number,Doctor_Id)
3) Relationship between Nurse and Patient: As it contains N:Nrelationship,we are adding relationship as another table.
Nurse(Nurse_ID,Nurse_Name)Assists(Admission_Number,Nurse_ID)Patient(Admission_Number,Name,Number,Address,Ward_Number,Doctor_Id)
4)Relationship between Ward and Doctor :As it contains 1:Nrelationship,we are adding primary key of Ward as foreign key ofDoctor table.
Ward(Ward_Number,Ward_Name)Doctor(Doctor_Id,Doctor_Name,Speciality,Ward_Number)
5) Relationship between Ward and Nurse: As it contains 1:Nrelationship,we are adding primary key of Ward as foreign key ofNurse table.
Ward(Ward_Number,Ward_Name)Nurse(Nurse_ID,Nurse_Name,Ward_Number)
So the final tables are:
Patient(Admission_Number,Name,Number,Address,Ward_Number,Doctor_Id)Ward(Ward_Number,Ward_Name)Nurse(Nurse_ID,Nurse_Name,Ward_Number)Assists(Admission_Number,Nurse_ID)Doctor(Doctor_Id,Doctor_Name,Speciality,Ward_Number)
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill