DB Schema Hospital
DB Schema Hospital
2
CTT102 – Introduction to Databases Hospital Management Schema
1. Database Schema
3
CTT102 – Introduction to Databases Hospital Management Schema
PATIENT
Contact varchar(15) The patient phone number. Should be unique and not
allow null.
InsurancePlan varchar(10) The patient insurance plan. Can only contain the values
from set {‘Basic’, ‘VIP’, ‘Premium’}, default value: ‘Basic’.
DOCTOR
Phone varchar(15) The doctor's phone number. Unique and do not allow
null.
Email varchar(100) The doctor’s email. Unique and do not allow null.
Rating decimal(2,1) The doctor's average rating, ranging from 0.0 to 5.0, with
a default value of 3.0.
4
CTT102 – Introduction to Databases Hospital Management Schema
DEPARTMENT
Budget decimal(10,2) The monthly budget of the department. Not null and
must greater than 50,000
APPOINTMENT
PatientID (FK) varchar(10) The identifier number of the patient, do not allow null.
DoctorID (FK) varchar(10) The identifier number of the doctor, do not allow null
AppointmentDate datetime The scheduled date and time for the appointment, do
not allow null.
Duration int The duration of the appointment. Not allow null and
must greater than 0
5
CTT102 – Introduction to Databases Hospital Management Schema
MEDICALRECORD
CreatedDate datetime The date and time when the medical record is created,
with a default value set to the current date.
Cost decimal(10,2) The total amount billed for all medical services
provided, including consultations, diagnostic tests, and
treatments.
SYMPTOM
MEDICALRECORD_SYMPTOM
PRESCRIPTION
6
CTT102 – Introduction to Databases Hospital Management Schema
MedicineName nvarchar(100) The name of the medicine and not allow null
2. Data Sample
PATIENT
DOCTOR
7
CTT102 – Introduction to Databases Hospital Management Schema
DEPARTMENT
APPOINTMENT
MEDICALRECORD
8
CTT102 – Introduction to Databases Hospital Management Schema
SYMPTOM
9
CTT102 – Introduction to Databases Hospital Management Schema
MEDICALRECORD_SYMPTOM
PRESCRIPTION
10
CTT102 – Introduction to Databases Hospital Management Schema
REFERENCES
[1] https://github.com/GziXnine/Hospital_Management_System
11