SlideShare a Scribd company logo
2
Most read
7
Most read
Hospital Management System
DATABASE DESIGN
1. Description
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.
2. 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.
19
Hospital Management System
c) Date/Time:-
Date/Time data type is used for representing data or time.
Patient Table:
Fields Data Type Relationships
Pid Varchar(5) Primary Key
Name Varchar(20) Not Null
Age int Not Null
weight int Not Null
gender Varchar(10) Not null
address Varchar(50) Not Null
phoneno int Not Null
disease Varchar(20) Not Null
doctorid Varchar(5) Not Null
Doctor Table:
Fields Data Type Relationships
doctorid Varchar(5) Primary Key
doctorname Varchar(15) Not Null
dept Varchar(15) Not Null
20
Hospital Management System
Lab Table:
Fields Data Type Relationships
labno Varchar(5) Primary Key
Pid Varchar(5) Not Null
weight int Not Null
doctorid Varchar(5) Foreign Key
date Date/Time Not Null
category Varchar(15) Not Null
patient_type Varchar(15) Not Null
amount int Not Null
Inpatient Table:
Fields Data Type Relationships
Pid Varchar(5) Primary Key
room_no Varchar(50) Not Null
date_of_adm Date/Time Not Null
date_of_dis Date/Time Not Null
advance int Not Null
labno Varchar(5) Foreign Key
Outpatient Table:
Fields Data Type Relationships
Pid Varchar(5) Primary Key
date Date/Time Not Null
labno Varchar(5) Foreign Key
21
Hospital Management System
Room Table:
Fields Data Type Relationships
room_no Varchar(50) Primary Key
room_type Varchar(10) Not Null
status Varchar(10) Not Null
Bill Table:
Fields Data Type Relationships
bill_no Varchar(50) Primary Key
Pid Varchar(5) Foreign Key
patient_type Varchar(10) Allow Null
doctor_charge int Not Null
medicine_charge int Not Null
room_charge int Not Null
oprtn_charge int Allow Null
no_of_days int Allow Null
nursing_charge int Allow Null
advance int Allow Null
health_card Varchar(50) Allow Null
lab_charge int Allow Null
Bill int Not 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.
22
Hospital Management System
The E-R diagram depicts the various relationships among
entities considering each object as entity. Entity is represented as
diamond shape and relationship is represented as rectangle. It
depicts the relationship between data objects. The E-R diagram is
the relation that is used to conduct the data modeling activity.
Entity:-
Entity is the thing which we want to store information. It is an
elementary basic building block of storing information about
business process. An entity represents an objects defined within
the information system about which you want to store information.
Relationship:-
A relationship is named connection or association between
entities used to relate two or more entities with some common
attributes of meaningful interaction between the object.
Attributes:-
Attributes are the properties of the entities and relationship.
Descriptor of the entity. Attributes are elementary pieces of
information attached to an entity.
23
Hospital Management System
Symbols Meaning
Entity
Relationship
Attribute
Key Attribute
Cardinality Ratio N: 1 for E1: E2
in R
24
Hospital Management System
E1 R E2
E-R Diagram
25
patient
pid
name
weight
doctori
d
gende
r
age
addres
s
phone
no
Consult
s
doctor
Doctorid
Doctor name
dept
Check
s
lab Report
lab no
Pid
weight
doctorid
date
category
Decid
es
inpatient outpatient
lab no
room no
pid
advanc
e
date of
admissio
n
date of
discharge
pid
lab no
date
Admitted
to to
room
status
room
no
room type
issued_
to
bill
bill no
pid
lab charge
patient
type
bill
doctor chargeadvanc
e
health
card
medicine
charge
room charge
operation
no of
nursing charge
disease
amount

More Related Content

PDF
Hospital database management system project report
DOCX
Hospital Management system Database design
PPTX
Hospital database management system (1)
PPTX
Dbms mini project
PDF
Hospital Management System (2nd Task)
PPTX
Hospital management system DBMS PROJECT USING APEX 5.04
PDF
Hospital Management System SRS for software
PPT
hospital database
Hospital database management system project report
Hospital Management system Database design
Hospital database management system (1)
Dbms mini project
Hospital Management System (2nd Task)
Hospital management system DBMS PROJECT USING APEX 5.04
Hospital Management System SRS for software
hospital database

What's hot (20)

PPTX
Hospital management
PPTX
Database design process
PPT
Entity relationship modelling
PPTX
Types Of Keys in DBMS
DOCX
PPTX
Hospital Management System
PPT
15. Transactions in DBMS
DOCX
Hospital Management System
PPTX
DBMS and its Models
PPTX
Relational model
PPT
"Hospital Management"
DOCX
Hostpital management system(srs)
PPT
Hospital management final report presentation
PPTX
library management system in SQL
PPTX
Data Modeling PPT
PPT
Normalization
PDF
Database Normalization
PPTX
ER MODEL
PPTX
PPTX
hospital management System
Hospital management
Database design process
Entity relationship modelling
Types Of Keys in DBMS
Hospital Management System
15. Transactions in DBMS
Hospital Management System
DBMS and its Models
Relational model
"Hospital Management"
Hostpital management system(srs)
Hospital management final report presentation
library management system in SQL
Data Modeling PPT
Normalization
Database Normalization
ER MODEL
hospital management System
Ad

Viewers also liked (20)

PPTX
Hospital management system(database)
PDF
Hospital management system
DOCX
Hospital management system project
PDF
Bioinformatics—an introduction for computer scientists
PDF
Bioinformatic approaches to functionally characterise RNAs
PDF
Applying cheminformatics and bioinformatics approaches to neglected tropical ...
PDF
Solution4 1(database)
PPT
Database Design
DOCX
Database Management System report
PPT
Gene expression profiling i
PPTX
Design And Purification Of Proteins
PPTX
Gene expression profiling in breast carcinoma
PPTX
Importance of database design (1)
PDF
Library management system
PPT
Database Design Process
PPTX
Hospital management system (php project) web engineering
PPTX
Comparative genomics
PPTX
Techniques for protein purification
PDF
Protein purification
Hospital management system(database)
Hospital management system
Hospital management system project
Bioinformatics—an introduction for computer scientists
Bioinformatic approaches to functionally characterise RNAs
Applying cheminformatics and bioinformatics approaches to neglected tropical ...
Solution4 1(database)
Database Design
Database Management System report
Gene expression profiling i
Design And Purification Of Proteins
Gene expression profiling in breast carcinoma
Importance of database design (1)
Library management system
Database Design Process
Hospital management system (php project) web engineering
Comparative genomics
Techniques for protein purification
Protein purification
Ad

Similar to Database design (20)

DOCX
Hospital database management_system_sql
DOCX
Hospital database management_system_sql
PDF
KingsleyUsen_HospitalDatabase
DOCX
A small surgery center needs your help to create a database. The.docx
PPTX
Databases and SQL - Lecture B
PDF
Database Management Systems Lab Manual
PDF
RDBMS Unit-2.pdf Entity Relationship Diagram
PPTX
fundamentals-of-database.pptx hehehehehe
PPT
introduction-to-dbms-unit-1.ppt
PPTX
IT6701-Information Management Unit 1
PPTX
database_design_presentation, data base design presenttion
PPTX
Unit-1-DBMS-SUN-4 everything you need to know.pptx
PPTX
Module 3 Database systems for DIPLOMA.pptx
PPTX
ER Modeling and Introduction to RDBMS
PPT
Database
PPTX
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
PDF
Db lec 04_new
PPTX
IT6701 Information Management Unit-I
PPTX
Chapter-3 Data Modeling using ER Model
PDF
Unit1 rdbms study_materials-converted (1) (1)
Hospital database management_system_sql
Hospital database management_system_sql
KingsleyUsen_HospitalDatabase
A small surgery center needs your help to create a database. The.docx
Databases and SQL - Lecture B
Database Management Systems Lab Manual
RDBMS Unit-2.pdf Entity Relationship Diagram
fundamentals-of-database.pptx hehehehehe
introduction-to-dbms-unit-1.ppt
IT6701-Information Management Unit 1
database_design_presentation, data base design presenttion
Unit-1-DBMS-SUN-4 everything you need to know.pptx
Module 3 Database systems for DIPLOMA.pptx
ER Modeling and Introduction to RDBMS
Database
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
Db lec 04_new
IT6701 Information Management Unit-I
Chapter-3 Data Modeling using ER Model
Unit1 rdbms study_materials-converted (1) (1)

More from Safwan Hashmi (16)

PDF
MODERAN BLOCK CIPHER
PPTX
Dark web
PDF
CEASER & VIGENERE CIPHER IMPLEMENTATION
PDF
Incident managment plan
PDF
Business continuity plan
PDF
Sql injection
PPTX
Soap xp-wg
PPT
Sql security
PPT
Alpha beta prouning
PPTX
Color and color models
PDF
Introduction to SOAP
PPTX
Democracy.s
PPTX
Democracy01
PPSX
Democracy.ppt
PPTX
Calunization
DOCX
Development
MODERAN BLOCK CIPHER
Dark web
CEASER & VIGENERE CIPHER IMPLEMENTATION
Incident managment plan
Business continuity plan
Sql injection
Soap xp-wg
Sql security
Alpha beta prouning
Color and color models
Introduction to SOAP
Democracy.s
Democracy01
Democracy.ppt
Calunization
Development

Recently uploaded (20)

PPTX
Institutional Correction lecture only . . .
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Lesson notes of climatology university.
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Complications of Minimal Access Surgery at WLH
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Insiders guide to clinical Medicine.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Computing-Curriculum for Schools in Ghana
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Basic Mud Logging Guide for educational purpose
Institutional Correction lecture only . . .
Final Presentation General Medicine 03-08-2024.pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Lesson notes of climatology university.
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
GDM (1) (1).pptx small presentation for students
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Complications of Minimal Access Surgery at WLH
102 student loan defaulters named and shamed – Is someone you know on the list?
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Insiders guide to clinical Medicine.pdf
PPH.pptx obstetrics and gynecology in nursing
STATICS OF THE RIGID BODIES Hibbelers.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Computing-Curriculum for Schools in Ghana
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
O5-L3 Freight Transport Ops (International) V1.pdf
Basic Mud Logging Guide for educational purpose

Database design

  • 1. Hospital Management System DATABASE DESIGN 1. Description 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. 2. 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. 19
  • 2. Hospital Management System c) Date/Time:- Date/Time data type is used for representing data or time. Patient Table: Fields Data Type Relationships Pid Varchar(5) Primary Key Name Varchar(20) Not Null Age int Not Null weight int Not Null gender Varchar(10) Not null address Varchar(50) Not Null phoneno int Not Null disease Varchar(20) Not Null doctorid Varchar(5) Not Null Doctor Table: Fields Data Type Relationships doctorid Varchar(5) Primary Key doctorname Varchar(15) Not Null dept Varchar(15) Not Null 20
  • 3. Hospital Management System Lab Table: Fields Data Type Relationships labno Varchar(5) Primary Key Pid Varchar(5) Not Null weight int Not Null doctorid Varchar(5) Foreign Key date Date/Time Not Null category Varchar(15) Not Null patient_type Varchar(15) Not Null amount int Not Null Inpatient Table: Fields Data Type Relationships Pid Varchar(5) Primary Key room_no Varchar(50) Not Null date_of_adm Date/Time Not Null date_of_dis Date/Time Not Null advance int Not Null labno Varchar(5) Foreign Key Outpatient Table: Fields Data Type Relationships Pid Varchar(5) Primary Key date Date/Time Not Null labno Varchar(5) Foreign Key 21
  • 4. Hospital Management System Room Table: Fields Data Type Relationships room_no Varchar(50) Primary Key room_type Varchar(10) Not Null status Varchar(10) Not Null Bill Table: Fields Data Type Relationships bill_no Varchar(50) Primary Key Pid Varchar(5) Foreign Key patient_type Varchar(10) Allow Null doctor_charge int Not Null medicine_charge int Not Null room_charge int Not Null oprtn_charge int Allow Null no_of_days int Allow Null nursing_charge int Allow Null advance int Allow Null health_card Varchar(50) Allow Null lab_charge int Allow Null Bill int Not 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. 22
  • 5. Hospital Management System The E-R diagram depicts the various relationships among entities considering each object as entity. Entity is represented as diamond shape and relationship is represented as rectangle. It depicts the relationship between data objects. The E-R diagram is the relation that is used to conduct the data modeling activity. Entity:- Entity is the thing which we want to store information. It is an elementary basic building block of storing information about business process. An entity represents an objects defined within the information system about which you want to store information. Relationship:- A relationship is named connection or association between entities used to relate two or more entities with some common attributes of meaningful interaction between the object. Attributes:- Attributes are the properties of the entities and relationship. Descriptor of the entity. Attributes are elementary pieces of information attached to an entity. 23 Hospital Management System
  • 6. Symbols Meaning Entity Relationship Attribute Key Attribute Cardinality Ratio N: 1 for E1: E2 in R 24 Hospital Management System E1 R E2
  • 7. E-R Diagram 25 patient pid name weight doctori d gende r age addres s phone no Consult s doctor Doctorid Doctor name dept Check s lab Report lab no Pid weight doctorid date category Decid es inpatient outpatient lab no room no pid advanc e date of admissio n date of discharge pid lab no date Admitted to to room status room no room type issued_ to bill bill no pid lab charge patient type bill doctor chargeadvanc e health card medicine charge room charge operation no of nursing charge disease amount