Site icon Student Projects Live

Hospital management system database design

Hospital management system database design is uploaded in this page. A database is a collection of information and is systematically stored in tables in the form of rows and columns. The table in the database has unique name that identifies its contents. The database in turn is further described in detail giving all the fields used with the data types, constraints available, primary key and foreign key.

Database design is used to manage large bodies of information. In this database we describe all the 4 tables available in the software, which are used to store all the records.


Data types and its description:   

Fields in database table have a data type. Some of the data types used in database table are explained below.

a)   Integer:-

One optional sign character (+ or -) followed by atleast one digit (0-9). Leading and trailing blanks are ignored. No other character is allowed.

b)  Varchar:-

It is used to store alpha numeric characters. In this data type we can set the maximum number of characters upto 8000 ranges by default SQL server will set the size to 50 characters large.

a)   Date/Time:-

Date/Time data type is used for representing data or time.


Hospital management system database design

Patient Table:

FieldsData TypeRelationships
PidVarchar(5)Primary Key
nameVarchar(20)Not Null
ageintNot Null
weightintNot Null
genderVarchar(10)Not null
addressVarchar(50)Not Null
phonenointNot Null
diseaseVarchar(20)Not Null
doctoridVarchar(5)Not Null

Doctor Table:

FieldsData TypeRelationships
doctoridVarchar(5)Primary Key
doctornameVarchar(15)Not Null
deptVarchar(15)Not  Null

Lab Table:

FieldsData TypeRelationships
labnoVarchar(5)Primary Key
pidVarchar(5)Not Null
weightintNot Null
doctoridVarchar(5)Foreign Key
dateDate/TimeNot Null
categoryVarchar(15)Not Null
patient_typeVarchar(15)Not Null
amountintNot Null

Inpatient Table:

FieldsData TypeRelationships
pidVarchar(5)Primary Key
room_noVarchar(50)Not Null
date_of_admDate/TimeNot Null
date_of_disDate/TimeNot Null
advanceintNot Null
labnoVarchar(5)Foreign Key

Outpatient Table:

FieldsData TypeRelationships
pidVarchar(5)Primary Key
dateDate/TimeNot Null
labnoVarchar(5)Foreign Key

Room Table:

FieldsData TypeRelationships
room_noVarchar(50)Primary Key
room_typeVarchar(10)Not Null
statusVarchar(10)Not Null

Bill Table:

FieldsData TypeRelationships
bill_noVarchar(50)Primary Key
pidVarchar(5)Foreign Key
patient_typeVarchar(10)Allow Null
doctor_chargeintNot Null
medicine_chargeintNot Null
room_chargeintNot Null
oprtn_chargeintAllow Null
no_of_daysintAllow Null
nursing_chargeintAllow Null
advanceintAllow Null
health_cardVarchar(50)Allow Null
lab_chargeintAllow Null
billintNot Null

E-R Diagram

Entity relationship diagram is used in modern database software engineering to illustrate logical structure of database. It is a relational schema database modeling method used to model a system and approach. This approach commonly used in database design. The diagram created using this method is called E-R diagram.


Exit mobile version