Professional Documents
Culture Documents
0 INTRODUCTION
Hospital is an institution that providing medical and surgical treatment and nursing care
for sick or injured people that includes a number of departments, rooms, doctors, nurses,
compounders, and other staff working in the hospital. Nowadays, due to the advanced
technology, hospital no longer use paperwork to store patients’ information. They will store all
the appointment information in the system so that information can be accessed more quickly
when patients register at the registration counter. If the hospital is running manually for
registration, storing and payment method, they will eventually decrease the hospital’s overall
performance as well as efficiency. Moreover, it is easy to meet unavoidable errors by using
paperwork and misunderstandings might happen.
To avoid this problem, we are going to design a hospital management system (HMS).
Hospital management system is the system which is developed to limit usage of pen paper work
at the hospitals. It is the system that is used in the hospitals to maintain the records of the
patients, doctors, nurses and other hospital staffs.
1
2.0 BUSINESS RULES
There are 5 entities and 8 business rules in the Entity Relationship Diagram (ERD).
2
3.0 ENTITY RELATIONSHIP DIAGRAM (ERD)
3
4.0 DATA DICTONARY
TABLE NAME ATTRIBUTE NAME CONTENT DATA TYPE FORMAT RANGE REQUIRED? PK FK
(YES/NO) OR FK REFERENCE
TABLE
4
Doctor_Lname Doctor’s last VARCHAR(20) XXXXXX… N/A YES
name
Treatment_ID The unique code VARCHAR(20) TC100 N/A YES PK, FK TREATMEN
of treatment T
5
Medicine_name The name of VARCHAR(20) XXXXXX… N/A YES
medicine
6
5.0 DATA DEFINITION LANGUAGE (DDL)
Data Definition Language (DDL) can be defined as a computer language which are
used to create, modify and also drop the structure of a database object in a database. We use
DDL to help create a table by using certain languages, such as ‘CREATE’, ‘ALTER’, and
‘DROP’. These database objects also include views, schemas and many more. These DDL
statements can be used to create tables by using Structured Query Language (SQL) in a website
called Oracle. Oracle helps to create tables, insert data and also to produce SQL statements to
communicate with the data.
In this assignment, we created the tables based on our ERD diagrams that we had
designed earlier. The table below shows the SQL commands that had been typed to create
tables about hospital management. The tables that have been created are doctor, company,
patient, appointment, treatment, medication record and bill.
);
7
COMPANY_ADDRESS VARCHAR2(50) NOT NULL
);
);
);
8
DOCTOR_ID REFERENCES DOCTOR(DOCTOR_ID),
);
);
);
9
6.0 DATA MANIPULATION LANGUAGE (DML)
RESULT:
10
2. DATA FOR TABLE COMPANY
Script name: InsertDataCompany
RESULT:
11
3. DATA FOR TABLE PATIENT
Script name: InsertDataPatient
RESULT:
12
4. DATA FOR TABLE APPOINTMENT
Script name: InsertDataAppointment
RESULT:
13
5. DATA FOR TABLE TREATMENT
Script name: InsertDataTreatment
RESULT:
14
6. DATA FOR TABLE MEDICATION RECORD
Script name: InsertDataMedication_Record
RESULT:
15
7. DATA FOR TABLE BILL
Script name: InsertDataBill
RESULT:
16
7.0 DATA QUERY
17
8.0 CONCLUSION
18