In: Computer Science
The above ER diagram has the following entities.
Patient entity contains Patient ID, Name, Address, Sex, Phone No, Admitted date, Discharge date, Age as attributes. In Patient entity Patient ID is the primary key and Phone No and Medical records are multivalued attribute.
Hospital entity contains Hospital ID, Address, Name, Phone No as attributes where, Hospital ID is the primary key and Phone No is a multivalued attribute.
Employee enitity contains Employee ID, Sex, Phone No, Experience, Salary, Name, Qualification where Employee ID is the primary key, Phone No is a multivalued attribute and Name is a composite attribute.
Doctor entity consits of other three entities called Visiting, Permanent, and Resident which shows the designation of the doctors.
Receptionist entity has a relationship with record entity which contains Record No as primary key and Appointment attribute and Patient info attribute which is a multivalued attribute.
Room entity consists of Room ID as primary key and also a room type entity.
Medicine entity consists of Code as primary key and also attributes called Price and Description
Patient has a reltaion "Admitted in" with Hospital
Hospital has a relation "has" with Employee
Employee has a ISA relation with Doctor,Receptionist and Nurse
Doctor has a ISA relation with Visiting,Permanent,Intern
Nurse has a "Governs" relation with Room
Patient has a "billed for" relation with Treatment and Medicine
Patient has a "assigned to'' relation with Room