ER Diagram For Hospital Management System
ER Diagram For Hospital Management System
| Hospital |
| hospital_id (PK) |
| name |
| address |
+---------------+------------------+
| | | department_id | | address |
| || | | contact_number |
+---------------+ | | | |
| | | |
| | | |
+----------+------+ | | |
| | | | |
+----------------+ +------------------+ |
| Appointment | | Prescription | |
+----------------+ +------------------+ |
| appointment_id | | prescription_id | |
| doctor_id | | patient_id | |
| patient_id | | doctor_id | |
| date | | date | |
| time | | medicine | |
+----------------+ +------------------+ |
SQL Queries:
1 Create tables:
Name VARCHAR(255),
Address VARCHAR(255)
);
Name VARCHAR(255)
);
Name VARCHAR(255),
Department_id INT,
);
Name VARCHAR(255),
Address VARCHAR(255),
Contact_number VARCHAR(20)
);
Doctor_id INT,
Patient_id INT,
Date DATE,
Time TIME,
);
Doctor_id INT,
Patient_id INT,
Date DATE,
Medicine VARCHAR(255),
);