0% found this document useful (0 votes)
2 views

01 Create Table

The document outlines the creation of five database tables: Doctor, Patient, Nurse, Room, and Result. Each table includes various fields such as IDs, names, roles, and relationships among them through foreign keys. This structure is designed to manage information related to healthcare professionals, patients, and their interactions in a medical setting.

Uploaded by

Myint Hlaing San
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

01 Create Table

The document outlines the creation of five database tables: Doctor, Patient, Nurse, Room, and Result. Each table includes various fields such as IDs, names, roles, and relationships among them through foreign keys. This structure is designed to manage information related to healthcare professionals, patients, and their interactions in a medical setting.

Uploaded by

Myint Hlaing San
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Create TABLE Doctor (doctotID SERIAL Primary Key Not Null, doctor_name varchar(50),

doctor_role varchar(50), doctor_address varchar(50));

Create TABLE Patient (patient_id SERIAL Primary key Not Null, patient_name
varchar(50), patient_disease varchar(50));

Create TABLE Nurse (nurse_id SERIAL Primary key Not Null, nurse_name varchar(50),
nurse_phone varchar(50));

Create TABLE Room (room_id SERIAL Primary key Not Null, room_name varchar(50),
room_type varchar(50));

Create TABLE Result (rocord_id SERIAL Primary key Not Null, doctor_id int,
patient_id int, nurse_id int, room_id int, remark varchar(50), constraint
fk_doctor_id FOREIGN KEY REFERENCES Doctor(doctor_id), constraint fk_patient_id
FOREIGN KEY REFERENCES Patient(patient_id), constraint fk_room_id FOREIGN KEY
REFERENCES Room(room_id), constraint fk_nurse_id FOREIGN KEY REFERENCES
Nurse(nurse_id));

You might also like