DBMS Project Report Final
DBMS Project Report Final
Submitted to the
Bachelor of Engineering
in
Information Technology
by
Ms Jayshree Lavhare
2024-2025
CERTIFICATE
Date:
Place: Pune
Principal
This Mini Project report has been examined by us as per the Savitribai Phule Pune
University, Pune requirements at Army Institute of Technology, Pune – 411015 on
...........
We would like to express our sincere gratitude to Ms. Jayshree Lavhare, our project guide, for her continuous
support, valuable guidance, and encouragement throughout the development of the Hospital Management System
project. Her expertise and insights were instrumental in shaping the project in the right direction.
We are also thankful to the Head of the Department and all the teaching and non-teaching staff members of the
Department of Information Technology, Army Institute of Technology, Pune, for providing the necessary resources
and academic environment that facilitated the completion of this project.
We would like to acknowledge the technical staff for their assistance with software and system requirements during
the development phase. We are also grateful to all the reviewers for their constructive feedback which helped
improve the quality of our work.
We extend our heartfelt thanks to our families and friends for their constant encouragement, motivation, and support
throughout this journey.
Finally, we would like to acknowledge all the resources, tutorials, and online materials that contributed to enhancing
our understanding and skills necessary for the successful execution of this project.
1. Abstract 3
2. Introduction 3
3. Data Types 4
4. Data Requirements 4
Entities
Attributes
Relationships- Cardinality
5 Creating database using MySQL 4
7. Conclusion 16
8 References
1. ABSTRACT
This project presents a simple and user-friendly Hospital Management System developed using
Flask for the backend and MySQL for data storage. The main objective of this system is to
manage hospital records efficiently by allowing users to add, update, delete, and view patient and
appointment details. The application supports two roles: Admin and Receptionist.
Receptionists can view patient information and appointment schedules from anywhere within the
hospital system, making it convenient for hospital operations. On the other hand, only admins
have the privilege to add new doctor or patient records or remove existing ones from the system.
This system ensures secure data handling and a smooth user experience, making hospital
management easier, more organized, and accessible.
2. INTRODUCATION
E. F. Codd introduced the term in his seminal paper "A Relational Model of Data for Large
Shared Data Banks", published in 1970. In this paper and later papers he defined what he meant
by relational. One well-known definition of what constitutes a relational database system is
Codd's 12 rules. However, many of the early implementations of the relational model did not
conform to all of Codd's rules, so the term gradually came to describe a broader class of database
systems. At a minimum, these systems: • presented the data to the user as relations (a
presentation in tabular form, i.e. as a collection of tables with each table consisting of a set of
rows and columns, can satisfy this property) • provided relational operators to manipulate the
data in tabular form The first systems that were relatively faithful implementations of the
relational model were from the University of Michigan; Micro DBMS (1969) and from IBM UK
Scientific Centre at Peterlee; IS1 (1970–72) and its followon PRTV (1973–79). The first system
sold as an RDBMS was Multics Relational Data Store, first sold in 1978. Others have been
Berkeley Ingres QUEL and IBM BS12. The most popular definition of an RDBMS is a product
that presents a view of data as a collection of rows and columns, even if it is not based strictly
upon relational theory. By this definition, RDBMS products typically implement some but not all
of Codd's 12 rules.[1] A second, theorybased school of thought argues that if a database does not
implement all of Codd's rules (or the current understanding on the relational model, as expressed
by Christopher J Date, Hugh Darwen and others), it is not relational. This view, shared by many
theorists and other strict adherents to Codd's principles, would disqualify most DBMSs as not
relational. For clarification, they often refer to some RDBMSs as Truly-Relational Database
Management Systems (TRDBMS), naming others Pseudo-Relational Database Management
Systems (PRDBMS). As of now, all commercial relational DBMSes employ SQL as their query
language. Alternative query languages have been proposed and implemented, notably the pre-
1996 implementation of Berkeley Ingres QUEL. With standardization of the SQL, both
commercial and open source DBMSes have adopted some degree of standards compliance.
History of SQL (A Research Project Conducted by IBM)
With the rapid growth of digital platforms, managing data efficiently and providing easy access
to users have become essential components of any modern application. This project presents a
Hospital Management System developed using Flask (a lightweight Python web framework) and
MySQL as the backend database. The goal of this system is to provide a simple, intuitive, and
interactive interface for managing patients, doctors, and their related information such as
appointments and records.
This system is designed for two types of users: Admins and Receptionists. While receptionists
can view the available patient and appointment details from any location within the hospital
system, admins have the authority to add, update, and delete patient, doctor, and appointment
records. This separation of privileges ensures secure data handling and role-based access control.
The underlying database is built upon the relational model, a concept introduced by E. F. Codd in
1970, which organizes data into tables (relations) consisting of rows and columns. The use of
SQL (Structured Query Language), originally developed by IBM in the 1970s as part of the
System R project, provides a robust mechanism for querying and manipulating the data stored in
the system.
By leveraging modern web technologies and proven database principles, the Hospital
Management System provides a practical solution for organizing and maintaining hospital
information efficiently, making it a useful tool for hospital administration and healthcare
management.
In many small-scale hospitals, clinics, and healthcare centers, managing patient and appointment
records manually or through basic spreadsheets leads to inefficiencies, errors, and limited
accessibility. There is a need for a centralized, user-friendly, and web-based system that allows
easy addition, modification, and deletion of patient, doctor, and appointment details.
This project aims to develop a Hospital Management System using Flask and MySQL, which
will provide:
• An intuitive interface for receptionists to view patient and appointment information from any
location within the hospital system.
• A secure backend for admins to handle hospital records through add, update, and
delete operations.
3. Efficient storage and retrieval of healthcare data using relational database
concepts.
3.1 Motivation
In today’s digital age, maintaining organized and accessible information is crucial, especially for
critical systems like managing hospital records. Traditional methods such as physical registers or
spreadsheets are prone to errors, lack accessibility, and do not support real-time updates. This
inspired the development of a Hospital Management System that is not only efficient but also
user-friendly and accessible within the hospital network.
The motivation behind this project lies in building a lightweight web-based solution that
leverages modern technologies like Flask and MySQL to provide smooth interaction between
the hospital staff and the system. With the increasing demand for digital healthcare solutions
and efficient record management, it has become essential to have a system where receptionists
can manage appointments easily, while authorized personnel like admins can control and
update patient and doctor records securely.
This project also serves as a learning platform to gain hands-on experience with full-stack
development, backend database integration, and role-based access management.
3.2 . Objectives
INT Used for numeric values like patient IDs, doctor IDs, and appointment IDs.
TEXT Used to store long-form text like patient addresses or detailed medical
histories.
DECIMAL(a,b) Used to store fees or other numeric values with precision (e.g., DECIMAL(10,2)
stores numbers up to 99999999.99).
DATETIME Used to store date and time values for patient registration and appointment
scheduling.
ENUM Used to restrict the values to a specific set (e.g., user roles like 'admin' or 'receptionist',
gender as 'male', 'female', or 'other', appointment status like 'scheduled', 'completed', or 'cancelled').
5. Data Requirments
Entities
1. User
2. Patient
3. Doctor
4. Appointment
Attributes
1. User
• user_id: Unique ID for each user (INT).
• username: Name used for login (VARCHAR).
• password: User password (VARCHAR).
• role: Defines if the user is a doctor, administrator, or patient (ENUM).
• date_created: Date the account was created (DATETIME).
2. Patient
• patient_id (INT): Unique ID for each patient.
• first_name (VARCHAR): Patient's first name.
• last_name (VARCHAR): Patient's last name.
• dob (DATE): Date of birth
• gender (ENUM): Gender of the patient.
• contact_number (VARCHAR): Patient’s contact number.
• address (VARCHAR): Address of the patient.
3. Appointment
appointment_id (INT): Unique ID for each appointment.
patient_id (INT): Reference to the patient (foreign key).
doctor_id (INT): Reference to the doctor (foreign key).
appointment_date (DATETIME): Date and time of the appointment.
status (ENUM): Status of the appointment (e.g., scheduled, completed, canceled).
4. Doctor
• doctor_id (INT): Unique ID for each doctor.
• first_name (VARCHAR): Doctor's first name.
• last_name (VARCHAR): Doctor's last name.
• specialization (VARCHAR): Doctor's area of expertise.
• contact_number (VARCHAR): Contact number of the doctor.
• email (VARCHAR): Email address of the doctor.
• availability (VARCHAR): Availability hours or shift details.
USE hospital_management;
CREATE TABLE IF NOT EXISTS Users (
user_id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(100) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
role ENUM('doctor', 'nurse', 'admin', 'patient') NOT NULL,
date_created DATETIME DEFAULT CURRENT_TIMESTAMP
);
Explanation:
Staff or patients can log in.
role can be 'doctor', 'nurse', 'admin', or 'patient'.
SNAPSHOTS
7. Test Queries(Minimum 25 Queries)
-- Insert Patients
INSERT INTO Patients (first_name, last_name, dob, gender, contact_number, address, email)
VALUES ('John', 'Doe', '1990-05-12', 'male', '9876543210', '123 Main St', '[email protected]');
INSERT INTO Patients (first_name, last_name, dob, gender, contact_number, address, email)
VALUES ('Jane', 'Smith', '1985-09-23', 'female', '9876543211', '456 Maple Ave',
'[email protected]');
-- Insert Doctors
INSERT INTO Doctors (first_name, last_name, specialization, contact_number, email, availability)
VALUES ('Dr. Alex', 'Brown', 'Cardiologist', '9876543220', '[email protected]', 'Mon-Fri 10am-
4pm');
-- Insert Appointments
INSERT INTO Appointments (patient_id, doctor_id, appointment_date)
VALUES (1, 1, '2025-05-05 11:00:00');
-- Insert Prescriptions
INSERT INTO Prescriptions (patient_id, doctor_id, medication_details)
VALUES (1, 1, 'Tablet A - 1 daily after meals for 30 days.');
-- Delete a Patient
DELETE FROM Patients
WHERE patient_id = 2;
-- Delete a Doctor
DELETE FROM Doctors
WHERE doctor_id = 2;
8. Conclusion
The Hospital Management System developed using Flask and MySQL successfully
achieves its goal of providing an efficient, user-friendly, and role-based web application for
managing hospital operations.
The system allows patients to conveniently book appointments and view their medical
records, while enabling doctors and administrators to perform crucial operations such as
managing patient information, scheduling appointments, and maintaining medical records
and prescriptions.
This project not only demonstrates the practical application of relational database
concepts and web development technologies but also enhances the understanding of how to
integrate frontend and backend components effectively.
The implementation of CRUD functionalities, secure data handling, and role-based access
control ensures that the system is reliable, scalable, and ready for real-world hospital
management needs.
9. References.
Code with harry https://youtu.be/oA8brF3w5XQ?si=zBIP5byztlcv1fiA