DBMS Report Final
DBMS Report Final
SYSTEM
A PROJECT REPORT
Submitted by
MAY 2024
SRM INSTITUTE OF SCIENCE & TECHNOLOGY
(Under Section 3 of UGC Act, 1956)
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Overall, this project demonstrates the potential of modern web technologies and
frameworks in revolutionizing hospital management, offering a scalable, user-
friendly, and integrated solution to meet the evolving needs of healthcare
organizations.
ACKNOWLEDGEMENT
We express our heartfelt thanks to our honorable Vice Chancellor Dr.
C. MUTHAMIZHCHELVAN, for being the beacon in all our endeavors.
We are highly thankful to our my Course project Faculty MRS NEETU BANSAL
for her assistance, timely suggestion and guidance throughout the duration of this
course project.
We extend my gratitude to our HoD Computer Science 2nd year and
my Departmental colleagues for their Support.
Finally, we thank our parents and friends near and dear ones who directly and
indirectly contributed to the successful completion of our project. Above all, I thank
the almighty for showering his blessings on me to complete my Course project.
TABLE OF CONTENTS
1 INTRODUCTION 6
2 LITERATURE SURVEY 7
3 PURPOSE OF HMS 8
4 REQUIREMENT 9
ANALYSIS
5 ARCHITECTURE & 11
DESIGN
6 IMPLEMENTATION 12
8 QUERIES USED 22
9 DATABASES 26
10 EXPERIMENT RESULTS 29
11 CONCLUSION 33
12 REFERENCES 34
INTRODUCTION
The synergy between these technologies empowers HMS with real-time data
management, calendar-integrated scheduling, online payment processing, and
comprehensive analytics. Responsive design principles ensure accessibility
across devices, catering to the needs of healthcare professionals and patients
alike.
HARDWARE REQUIREMENTS
Processor: 5th generation intel core i5
Clock Speed: 2.80 GHZ
Hard Disk Drive: 1 TB RAM:
8 GB
SOFTWARE REQUIREMENTS
Database: Oracle XE
Integrated Development Environment: IntelliJ IDEA for Java
Languages: Java, HTML, CSS, React JS, JavaScript, Bootstrap.
Testing Application: POSTMAN
TOOLS AND FRAMEWORKS
HTML- HyperText Markup Language is a form of programming code
used to instruct a browser to create the structure for individual web pages
on a website.
CSS-Cascading Style Sheets (CSS) is a stylesheet language used to
describe the presentation of a document written in HTML or XML.
JAVASCRIPT-JavaScript is a text-based programming language used
both on the client-side and server-side that allows you to make web pages
interactive
BOOTSTRAP- Bootstrap is a free, open source front-end development
framework for the creation of websites and web apps. Designed to enable
responsive development of mobile-first websites, it provides a collection
of syntax for template designs.
Oracle XE - It is a relational database management system.
Postman-Postman enables you to create and send API requests. Send a
request to an endpoint, retrieve data from a data source, or test an API's
functionality.
IntelliJ IDEA- IntelliJ IDEA is an Integrated Development Environment
(IDE) for Java and Kotlin designed to maximize developer productivity
IntelliJ IDEA comes with one of the most powerful code editors in the
industry.
SpringBoot- Java Spring Boot (Spring Boot) is a tool that makes
developing web application and microservices with Spring Framework
faster and easier through three core capabilities.
Spring Security-Spring Security is a powerful and highly customizable
authentication and access-control framework.
JWT Authentication-JSON Web Token (JWT) authentication is a
stateless method of securely transmitting information between parties as
a JavaScript Object Notation (JSON) object. It is often used to
authenticate and authorize users in web applications and APIs.
Spring MVC-Spring MVC is a Java framework that is used to develop
web applications. It is built on a Model-View-Controller (MVC) pattern
and possesses all the basic features of a spring framework, such as
Dependency Injection, Inversion of Control.
Spring Data JPA-Spring Data JPA focuses on using JPA to store data in
a relational database. Its most compelling feature is the ability to create
repository implementations automatically, at runtime, from a repository
interface.
ARCHITECTURE AND DESIGN
To understand the architecture of spring boot, let us first see different layers
and classes present in it.
There are four main layers in Spring Boot:
• Presentation Layer: As the name suggests, it consists of views (i.e.
frontend part).
• Data Access Layer: CRUD (Create, Retrieve, Update, Delete)
Operations on the database comes under this category.
• Service Layer: This consist of service classes and uses services
provided by data access layers.
• Integration Layer: It consists of web different web services (any
service available over the internet and uses XML messaging system).
IMPLEMENTATION
CRUD Operations
The CRUD stands for Create, Read/Retrieve, Update and Delete. These
are the four basic functions of the persistence storage. The CRUD
operation can be defined as user interface conventions that allow view,
search and modify information through computer-based forms and
reports. CRUD is data-oriented and the standardized use of HTTP
action verbs. HTTP has few important verbs:
• POST: Creates a new resource
• GET: Reads a resource
• PUT: Updates an existing resource
• DELETE: Deletes a resource
CRUD operations are at the foundation of the most dynamic websites.
Therefore, we should differentiate CRUD from the HTTP action verbs.
Suppose, if we want to create a new record, we should use HTTP action
verb POST. To update a record, we should use the PUT verb. Similarly,
if we want to delete a record, we should use the DELETE verb.
Through CRUD operations, users and administrators have the right to
retrieve, create, edit and delete records online. We have many options
for executing CRUD operations. One of the most efficient choices is to
create a set of stored procedures in SQL to execute operations. The
CRUD operations refer to all major functions that are implemented in
relational database applications. Each letter of the CRUD can map to a
SQL statement and HTTP methods.
Spring boot provides an interface called Crud Repository that contains
methods for CRUD operations. It is defined in the package
org.springframework.data. repository. It extends the spring data
repository interface. It provides generic crud operation on a repository.
If we want to use CrudRepository in an application, we have to create
an interface and extend the CrudRepository.
REST APIs
Representational State Transfer (REST) is an architectural style that
defines a set of constraints to be used for creating web services. REST
API is a way of accessing the web services in a simple and flexible
way without having any processing. REST technology is generally
preferred to the more robust Simple Object Access Protocol (SOAP)
technology because REST uses the less bandwidth, simple and flexible
making it more suitable for internet usage. It’s used to fetch or give
some information from a web service. All communication done via
REST API used only HTTP request.
A request is sent from client to server in the form of web URL as HTTP
GET or POST or PUT or DELETE. After that a response is come back
from server in the form of resource which can be anything like HTML,
XML, image or JSON. But now JSON is the most popular format being
used in web services.
In HTTP there are five methods which are commonly used in a REST based
architecture i.e., POST, GET, PUT, PATCH and DELETE. These
correspond to create, read, update and delete (or CRUD) operations
respectively. There are other methods which are less frequently used like
OPTIONS and HEAD.
ER MODEL & ANALYSIS
Tables in ER diagram:
1. Bill
2. Patient
3. Out-patient
4. Relative
5. Test
6. In-patient
7. Room
8. Medicine
9. Doctor
10.Nurse
11.Employee
12.Active
13.Passive
14.Department
1. PATIENT:
Description: The patient entity represents all the patients that are currently a patient
in the hospital or have been a patient in the past. This entity is generalized into two
entities namely- Out_patient and In_patient.
• Attributes:
o PID: A unique identifier assigned to each patient, functioning as the
primary key for the Patient entity. It distinguishes one patient from
another in the database.
o NAME: name of the patient. o PHONE NO: A multi-valued attribute
representing the contact phone number(s) associated with the patient.
Patients may have more than one phone number stored in their profile.
o ADDRESS: an attribute to store the physical location of the patient. o
BLOOD GP: Blood group of the patient. o GENDER: gender of the
patient. o EMAIL: the email address associated with the patient. o
D.O.B: Date of Birth of the patient. It can be used to derive the patient’s
age.
2. BILL:
• Description: The bill entity records the history of all the bills issued by the
hospital to the patient.
• Attributes:
o BILL DATE: The date on which the bill is issued, providing a
chronological record of when the billing took place.
o ROOM COST: the total cost of the room according to the number of
days the patient was admitted in the hospital.
o MCOST: medical cost is the amount the patient has to pay for the
treatment.
o OTHER CHARGES: these are the additional charges to be paid by the
patient like medicine and vaccination costs. o TCOST: this is the total
amount to be paid comprising the room cost, medical cost and the other
charges.
3. DEPARTMENT:
4. EMPLOYEE:
• Description: the employee entity specifies each worker in the hospital. The
employee can be an active employee or a passive employee, i.e. a currently
working employee or a past employee in the hospital. Also, this entity is
generalized into employee types like- doctor and nurse.
• Attributes:
o EID: A unique identifier assigned to each employee, functioning as the
primary key for the employee entity. It distinguishes one employee from
another in the database.
o ETYPE: this attribute specifies the type of employee like doctor, nurse,
lab technician, accountant, etc. o NAME: name of the employee.
o DOB: date of birth of the employee from which age can be calculated.
o JOINING DATE: date when the employee started working in the
hospital.
o ADDRESS: it stores the physical location of the employee. o EMAIL:
the email address of the employee.
o SALARY: the annual salary amount paid to the employee by the
hospital.
5. DOCTOR:
• Description: The doctor entity stores the information of the various doctors
working in the hospital.
• Attributes:
o QUALIFICATION: it specifies the medical qualification of the doctor.
o DID: A unique identifier assigned to each doctor, functioning as the
primary key for the doctor entity. It distinguishes one doctor from
another in the database.
6. NURSE:
• Description: The doctor entity stores the information of the various nurses
working in the hospital.
• Attributes:
o COUNT PATIENT: the number of patients any nurse attends at a time.
o NID: A unique identifier assigned to each nurse, functioning as the
primary key for the nurse entity. It distinguishes one nurse from another
in the database.
7. ROOM:
• Description: the room entity stored the information about the room assigned
to the patient.
• Attributes:
o RID: A unique identifier assigned to each room, functioning as the
primary key for the room entity. It distinguishes one room from another
in the database.
o ROOM COST: the per day cost of the room to be paid by the patient
according to several factors like facilities, room size, etc.
o RTYPE: specifies the type of room assigned to the patient.
8. MEDICINE:
9. TEST:
• Description: the test table keeps a record of the tests undergone by the patient.
• Attributes:
o TEST ID: A unique identifier assigned to each test, functioning as the
primary key for the test entity. It distinguishes one test from another in
the database.
o TEST NAME: name of the test.
o TEST COST: the cost for conducting the test.
10. RELATIVE:
• Description: the relative table represents the relatives of the patient admitted
in the hospital.
• Attributes:
o RNAME: name of the relative. o RELATION: the relation of the person
to the patient.
o PHONE NO: contact number of the relative.
FINAL ER MODEL
QUERIES USED
SQL Constraints:
2. Unique Key: A unique key is a constraint in a database table that ensures the values
in a specified column or combination of columns are unique across all rows. Unlike a
primary key, a unique key does not necessarily serve as the primary means of identifying
records, but it enforces uniqueness to prevent duplicate data entries.
3. Not Null: "Not null" is a constraint in a database that ensures a particular column does
not contain any null (i.e., empty or undefined) values. This constraint mandates that every
record in the table must have a value for the specified column, thereby maintaining data
integrity and preventing the insertion of incomplete or missing data.
4. Foreign Key: A foreign key is a column or a set of columns in a database table that
establishes a relationship with the primary key or a unique key in another table. It
enforces referential integrity, ensuring that values in the foreign key column(s) match
values in the corresponding primary key or unique key column(s) in the related table.
This relationship allows for the creation of associations between data in different tables,
facilitating data consistency and enabling the implementation of relational database
concepts such as normalization and data integrity constraints.