Question
A hospital inpatient section has several departments. Each department has several doctors and manages several wards, and the department has attributes of Department_id, Department_name, Department_manager.
A hospital inpatient section has several departments. Each department has several doctors and manages several wards, and the department has attributes of Department_id, Department_name, Department_manager. A patient has the attribute of P_id, P_name, Entrance_date. A doctor has the attribute of Doctor_id, Doctor_name, Doctor_department. Each ward has the Ward_id, Ward_location, Ward_totalcapacity, Ward_freecapacity. A patient stays in one ward and is treated by one doctor. A doctor belongs to one department. Each ward belongs to one department and holds several patients. A patient is treated by a doctor, a doctor can treat several patients. According to the descriptions above, please finish the following questions:
1) Design the Entity-Relationship diagram to represent department, doctor, patient, ward and their relationship.
2) Change the ER model into the relational model. Also identify the primary and foreign key in schemas.
Step 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