Professional Documents
Culture Documents
Fall 2022
Phase 1- Group 2
Fatima S. Alhemeiri-201807988
Shahd Alhebsi-202006232
------------------------------------------------------------------------------------
An ER diagram of a hospital. The diagram shows the hospital's database and its related fields.
Different entities, their attributes, and their relationships are mentioned here. This helps the
hospital to function efficiently and retain patients
In this Hospital ERD we have 5 main Entities, Hospital and it has medical record, Doctors,
Patient And appointment. the hospital has ID, Address and Name, the hospital must have
Doctors and they have salary, ID, Name and specialization, The doctor must work in hospital
and also must treat the patient and have medical record, the patient can access medical record
must book an appointment and, the patient have Hospital name, Patient ID, Patient address
and diagnosis. medical record has the attribute of examination, drug and appointment attribute
are ID, type and data.
ER DIAGRAM
Examination Drugs
H_ID H_Address H_Name PMR_ID
1 1
Access
write
work
N 1
1 N
Doctor Treats Patient
N
Salary D_ID
P_Address
H_Name
Specialization Book
H_Name
P_ID Diagnosis
App_data
Appointment
App_Type App_ID
Prim. key Defor. key
H_ID H_Addres, H_Name
D_ID Salary, H_Name, Specialization
P_ID H_Name, P_Addres, Diagnosis
PMR_ID Examination, Drugs
App_ID App_Data, App_Type
Cardinality ratio:
Hospital can be worked by many doctors. And doctors can work in one hospital.
Doctor can work write many medical records. And medical record can be written by one doctor.
Patient access one medical record.
Patient can book many appointments. Appointment can be booked by many patients.
Doctors treat many patients. Patient can be treated by one doctor.
Participation type:
Doctor must work in hospital.
Doctor must write medical records.
Doctor must treat patients.
Patients must access medical records.
Appointment must be booked by patients.