Professional Documents
Culture Documents
HDBMS Final
HDBMS Final
6. Outpatient Table:
Fields Data Type Relationships
Patient_id int(5) Primary Key
date Date/Time Not Null
lab_no int(5) Foreign Key
7. Room Table:
Table:
• For lab Table:
The statement below enters 2 records or rows into
lab table:
Table:
3. Conclusion
The project Hospital Data Management System (MDBS)
Table: is for computerizing the working in a hospital. It takes care
of all the requirements of an average hospital and is
capable to provide easy and effective storage of
information related to patients that come up to the hospital.
It generates test reports, provide medicines prescribed to
• For room table: patient and doctor. It also provides billing facility on the
The statement below enters 2 records or rows into basis of patient’s status whether it is an indoor or outdoor
room table: patient. The system also provide the facility of backup as
per the requirement.
create database HMS1
use HMS1
CREATE TABLE department(
[department_id] [int] NOT NULL PRIMARY KEY,
[dep_name] [varchar](max) NOT NULL,
[dep_head] [varchar](max) NOT NULL,
);
CREATE TABLE employee(
[employee_id] [int] NOT NULL PRIMARY KEY,
[employee_name] [varchar](max) NOT NULL,
[DoB] [date] NOT NULL,
[joinning_date] [date] NOT NULL,
[emp_type] [varchar](max) NOT NULL,
[email] [varchar](max) NOT NULL,
[address] [varchar](max) NOT NULL,
[salary] [int] NOT NULL,
[date_of_leaveing] [date] NOT NULL,
[department_id] [int] NOT NULL foreign key
references [department]);
CREATE TABLE Medicine(
[medicine_id] [int] NOT NULL PRIMARY KEY,
[medicine_name] [varchar](max) NOT NULL,
[quantity] [int] NOT NULL,
[date] [date] NOT NULL,
[medicine_cost] [nchar](10) NOT NULL,
CREATE TABLE patient(
[patient_id] [int] NOT NULL PRIMARY KEY,
[patient_name] [varchar](max) NOT NULL,
[phone_no] [varchar](max) NOT NULL,
[blood_group] [varchar](max) NOT NULL,
[email] [varchar](max) NOT NULL,
[gender] [varchar](max) NOT NULL,
[address] [varchar](max) NOT NULL,
[disease] [varchar](max) NOT NULL,
[arrival_date] [date] NOT NULL,
[discharge_date] [date] NOT NULL,
);
create table Bill
( [payment_id] [int] NOT NULL PRIMARY KEY,
[date] [date] NOT NULL,
[room_cost] [int] NOT NULL,
[othercharge] [int] NULL,
[mcost] [int] NOT NULL,
[Total] [int] NOT NULL,
[patient_id] [int] NOT NULL foreign key references
[patient]);
CREATE TABLE doctor(
[doctor_id] [int] NOT NULL PRIMARY KEY,
[qualification] [varchar](max) NOT NULL,
[patient_id] [int] NOT NULL foreign key references
[patient],
[employee_id] [int] NOT NULL foreign key
references [employee]);
CREATE TABLE nurse(
[nurse_id] [int] NOT NULL PRIMARY KEY,
[patient_id] [int] NOT NULL foreign key references
[patient],
[employee_id] [int] NOT NULL foreign key
references [employee]);
CREATE TABLE reletive(
[reletive_id] [int] NOT NULL PRIMARY KEY,
[reletive_name] [varchar](max) NOT NULL,
[reletive_contact] [varchar](max) NOT NULL,
[relation] [varchar](max) NOT NULL,
[patient_id] [int] NOT NULL foreign key references
[patient]);
CREATE TABLE room(
[room_id] [int] NOT NULL PRIMARY KEY,
[room_type] [varchar](max) NOT NULL,
[patient_id] [int] NOT NULL foreign key references
[patient],
[room_cost] [int] NOT NULL);
CREATE TABLE Test([test_id] [int] NOT NULL
PRIMARY KEY, [test_name] [varchar](max) NOT
NULL, [test_cost] [int] NOT NULL, [date] [date]
NOT NULL, [patient_id] [int] NOT NULL foreign
key references [patient]);
Conclusions
This project has been a rewarding experience in more than one way. The entire project work has enlightened us in the following
areas.
a) We have gained an insight into the working of the HOSPITAL. This represents a typical real
world situation.
b) Our understanding of database design has been strengthened this is because in order to generate the
final reports of database designing has to be properly followed.
c) Scheduling a project and adhering to that schedule creates a strong sense of time management.
d) Sense of teamwork has developed and confidence of handling real life project has increased to a
great extent.
e) Initially, there were problem with the validation but with discussions, we were to implement
validations.