DBMS Report Format (1)
DBMS Report Format (1)
A project report on
BACHELOR OF ENGINEERING
IN
INFORMATION SCIENCE AND ENGINEERING
By
Abhay K(1BM22IS007)
Abhay Sreenath Manikanti(1BM22IS008)
Darshan N D(1BM22IS060)
Abstract
1. Introduction ……………………………………………………………………………….
1.1. Purpose ………………………………………………………………………………
1.2. Scope …………………………………………………………………………………
2. Software Requirement Specification …………………………………………………….
2.1. Software Requirements ……………………………………………………………….
2.2. Hardware Requirements ………………………………………………………………
2.3. Functionality……………………………………………………………………………
3. ER Diagram ……………………..………………………………………………………..
4. Relational Schema ……………………………………………….……
5. Implementation……………………………………………………………………………
5.1. SQL queries ………………………………………………………………………….
5.2. Connecting backend to frontend ……………………………………………………….
6. Conclusion………………………………………………………………………………..
6.1. Summary………………………………………………………………………………..
6.2. Limitations……………………………………………………………………………..
6.3. Further enhancements…………………………………………………………………..
7. References……………………………………………………………………………..
8. Appendix: Snapshots …………………………………………………………………
ABSTRACT:
In the realm of healthcare and pharmaceutical management, a robust and efficient database
management system is crucial for handling various aspects of pharmacy operations. This
project report outlines the development of a comprehensive Pharmacy Database Management
System (PDBMS), designed to meet the needs of pharmacists, healthcare professionals, and
administrative staff. Leveraging a modern technology stack that includes HTML, CSS,
JavaScript, Node.js, and MongoDB, this project exemplifies the practical application of
database management principles in a real-world setting.
The primary goal of this project is to develop a user-friendly, efficient, and scalable system that
facilitates the management of pharmacy-related data. The MongoDB database serves as the
core component of the system, enabling effective data storage, retrieval, and manipulation. The
project focuses on creating a well-structured database schema and utilizes an Entity-
Relationship (ER) model to delineate the relationships between various data entities, such as
patients, prescriptions, medications, inventory, and pharmacy staff.
This project delves into advanced database concepts, including complex data relationships,
performance optimization through indexing, and data validation to ensure accuracy and
integrity. The implementation section details key features such as user authentication, CRUD
operations for prescriptions and medication records, inventory management, and reporting
functionalities, all seamlessly integrated into a responsive web interface.
By undertaking this project, we demonstrate the critical role of database management systems
in streamlining pharmacy operations, enhancing accuracy, and improving service delivery. The
report offers valuable insights into how theoretical database principles are applied in practical
scenarios, providing a comprehensive understanding of the complexities involved in
developing a functional and efficient Pharmacy Database Management System.
INTRODUCTION:
In the modern era of healthcare information management, the ability to efficiently manage
pharmaceutical data is crucial for enhancing productivity and ensuring accurate medication
handling. Our Pharmacy Database Management System (PDBMS) project aims to address this
need by developing a robust and user-friendly application that leverages the power of database
management systems (DBMS) to support efficient pharmaceutical operations and accurate data
handling.
The primary objective of this project is to design and implement a comprehensive pharmacy
database management system using a technology stack that includes HTML, CSS, JavaScript,
Node.js, and MongoDB. This project serves as a practical application of concepts learned in
the Database Management System (DBMS) course, offering hands-on experience with
database design, implementation, and management within a healthcare context.
The Pharmacy Database Management System allows users to manage medication inventories,
process prescriptions, handle patient records, and track pharmacy staff activities. By
incorporating various DBMS principles such as normalization, indexing, and relationship
management, the project ensures efficient data storage, retrieval, and manipulation.
In this report, we will outline the development process of the Pharmacy Database Management
System, beginning with requirements analysis and progressing through database design,
implementation, testing, and validation. We will also present the Entity-Relationship (ER)
diagram, illustrating the relationships between different data entities in the system, and provide
detailed explanations of the database schema and its components.
The project emphasizes the importance of a well-structured database in creating a reliable and
scalable pharmaceutical management application. By exploring advanced database concepts
and their practical applications, we aim to demonstrate the critical role of DBMS in modern
healthcare systems and provide valuable insights into effective data management practices.
1.1 Purpose:
The purpose of this Pharmacy Database Management System project is to develop a
comprehensive application that effectively demonstrates the principles and practices of
database management systems (DBMS) within a pharmaceutical context. By focusing on a
practical and crucial use case, the project aims to achieve the following objectives:
Real-World Applicability:
● Develop a pharmacy management application that can be used in various
pharmaceutical settings, including retail pharmacies, hospital pharmacies, and
administrative offices.
● Provide insights into how well-designed databases support efficient and effective
management of pharmaceutical data.
1.2 Scope:
The scope of this Pharmacy Database Management System project encompasses the design,
development, and implementation of a comprehensive application that leverages database
management system (DBMS) principles. The project aims to cover the following aspects:
User Management:
● Implementation of user registration, authentication, and role-based access control.
● Secure handling of user credentials and session management.
Medication and Prescription Management:
● Functionality for managing medication inventories, processing prescriptions, and
tracking medication usage.
● Organizing medication records by categories and tags for efficient retrieval and
management.
Performance Optimization:
● Use of indexing and other optimization techniques to ensure efficient data retrieval and
manipulation.
● Implementation of data validation and integrity constraints.
Advanced Features:
● Adding functionality for tracking medication inventory levels and generating alerts for
low stock.
● Implementation of search functionality to allow users to quickly find medications,
prescriptions, and patient records.
The software requirements specification (SRS) for the notes-making project details the
essential functionalities and features the application must have. Key requirements include user
management with secure registration and authentication, efficient note creation, editing,
deletion, and organization through categories and tags.
The backend, built on MongoDB, will handle data storage and retrieval, while the frontend,
designed using HTML, CSS, and JavaScript, will provide a user-friendly interface. Advanced
features such as search functionality and commenting on notes are also specified.
● HTML, CSS, and JavaScript: These technologies are employed to build a responsive
and intuitive user interface, ensuring that users can interact with the system efficiently.
● Node Package Manager (NPM): Utilized for handling dependencies and running scripts
necessary for development and build processes.
Together, these software components provide a robust foundation for developing a functional
and user-friendly pharmacy management system.
● Development Environment:
○ A computer or workstation with a multi-core processor (e.g., Intel i5 or
equivalent).
○ At least 8GB of RAM to ensure smooth performance during development and
testing phases, particularly when running local servers and databases.
● Deployment and Production Environment:
○ For cloud-based deployment on platforms such as AWS, Azure, or Heroku,
specific hardware requirements are managed by the service provider. The focus
here is on configuring server instances with adequate resources to handle
anticipated traffic and database operations.
○ Typically, this includes a modern processor, sufficient RAM (e.g., 2GB to 4GB
for small to medium-scale applications), and ample storage space for data and
backups. This setup ensures that the application remains responsive and reliable
under typical usage conditions.
2.3 Functionality:
The functionality of the Pharmacy Database Management System is centered around providing
an efficient platform for managing pharmaceutical data and operations. Key features include:
Overall, the functionality is designed to deliver a reliable and efficient pharmacy management
system that supports the effective handling of pharmaceutical data and enhances operational
efficiency.
3. ENTITY RELATIONSHIP (ER) DIAGRAM:
Here's the enhanced visual representation of the Entity-Relationship Diagram (ERD) for the
User and Note entities:
● Entities are represented by rectangles with distinct colors
2. Prescription Table
● Fields:
○ PRESPID: SERIAL (Primary Key)
■ Unique identifier for each prescription.
○ SSN: VARCHAR(255) (Foreign Key referencing Customer(SSN))
■ Social Security Number of the customer who received the prescription.
○ DOCID: VARCHAR(255) (Foreign Key)
■ Identifier for the doctor who issued the prescription.
○ PRESPDATE: DATE (Not Null)
■ Date the prescription was issued.
● Relational Schema Representation:
○ Prescription(PRESPID, SSN, DOCID, PRESPDATE)
○ Foreign Key Relationship:
■ Prescription(SSN) references Customer(SSN)
4. Order Table
● Fields:
○ ORDERID: SERIAL (Primary Key)
■ Unique identifier for each order.
○ PRESPID: SERIAL (Foreign Key referencing Prescription(PRESPID))
■ Prescription ID related to the order.
○ EMPID: VARCHAR(255) (Foreign Key)
■ Identifier for the employee who processed the order.
○ ORDERDATE: DATE (Not Null)
■ Date when the order was placed.
● Relational Schema Representation:
○ Order(ORDERID, PRESPID, EMPID, ORDERDATE)
○ Foreign Key Relationship:
■ Order(PRESPID) references Prescription(PRESPID)
5. Bills Table
● Fields:
○ SSN: VARCHAR(255) (Foreign Key referencing Customer(SSN))
■ Social Security Number of the customer being billed.
○ ORDERID: SERIAL (Foreign Key referencing Order(ORDERID))
■ Order ID linked to the billing record.
○ INSURPAY: DECIMAL(10,2) (Not Null)
■ Amount paid by insurance.
○ CUSTPAY: DECIMAL(10,2) (Not Null)
■ Amount paid by the customer.
○ TOTAL AMT: DECIMAL(10,2) (Not Null)
■ Total amount billed.
● Relational Schema Representation:
○ Bills(SSN, ORDERID, INSURPAY, CUSTPAY, TOTAL AMT)
○ Foreign Key Relationship:
■ Bills(SSN) references Customer(SSN)
■ Bills(ORDERID) references Order(ORDERID)
7. Medicine Table
● Fields:
○ DRUG NAME: VARCHAR(255) (Primary Key)
■ Name of the drug.
○ BATCH NO: VARCHAR(255) (Primary Key)
■ Batch number of the drug.
○ PRICE: DECIMAL(10,2) (Not Null)
■ Price of the drug.
○ MEDTYPE: VARCHAR(255) (Not Null)
■ Type of medicine (e.g., tablet, syrup).
○ MANUFACTURER: VARCHAR(255) (Not Null)
■ Manufacturer of the drug.
○ STOCK QTY: INTEGER (Not Null)
■ Quantity of the drug in stock.
○ EXPIRY DATE: DATE (Not Null)
■ Expiry date of the drug.
4. IMPLEMENTATION:
INSERT INTO OrderedDrugs (PRICE, ORDERID, DRUGNAME, BATCH NO, ORDER QTY)
VALUES (10.00, 1, 'Aspirin', 'BATCH001', 30);
Insert a New Medicine:
INSERT INTO Medicine (DRUGNAME, BATCH NO, PRICE, MEDTYPE, MANUFACTURER, STOCK QTY,
EXPIRY DATE)
VALUES ('Aspirin', 'BATCH001', 10.00, 'Tablet', 'PharmaCorp', 100, '2025-12-31');
2. Update Data
UPDATE Customer
SET NAME = 'Alice Johnson', PHONE = '555-5678'
WHERE SSN = '123-45-6789';
UPDATE Prescription
SET DOCID = 'DOC002'
WHERE PRESPID = 1;
UPDATE OrderedDrugs
SET ORDER QTY = 40
WHERE ORDERID = 1 AND DRUGNAME = 'Aspirin' AND BATCH NO = 'BATCH001';
5.2 Connecting backend to frontend:
Connecting the backend to the frontend in the notes-making project involves linking the server-
side functionality with the client-side interface. The backend, developed with Node.js and
Express.js, exposes API endpoints for operations like user authentication and note
management.
Here are the HTML (Hypertext Markup Language) Code snippets for designing the interface of
the website.
5.2.2 CSS Code Snippets:
Here are the CSS (Cascading Style Sheets) Code snippets for adding transitions, for styling and
beautifying the interface of the website.
5.2.3 JavaScript Code Snippets:
Here are the JavaScript Code snippets for adding logic and functionality to the interface of the
website.
5.2.4 MongoDB Code Snippets:
MongoDB stores and manages a website's data as flexible, JSON-like documents, allowing for
scalable, high-performance data retrieval and storage. It supports dynamic schema design,
making it easier to handle diverse data types and structures efficiently.
6. CONCLUSION:
The pharmacy database management system project provides a robust and comprehensive
solution for managing pharmaceutical operations and customer interactions. By employing a
sophisticated combination of technologies, including SQL for relational database management
and effective schema design, this project aims to streamline and enhance pharmacy operations
through efficient data management.
The integration of core database concepts ensures a solid backend infrastructure that supports
crucial functionalities such as prescription management, drug ordering, and billing. The
relational schema and SQL queries detailed in the project illustrate a structured approach to
managing complex relationships between various data entities, including customers,
prescriptions, drugs, and orders.
6.1 Summary:
The pharmacy database management system offers a detailed and well-organized approach to
handling essential pharmacy operations. Utilizing SQL for database management, the system
encompasses a range of functionalities including customer management, prescription tracking,
drug inventory control, order processing, and billing. The system’s design ensures that each
aspect of pharmacy operations is efficiently managed, from tracking prescriptions and drug
inventories to handling customer bills and orders.
The project effectively demonstrates the practical application of relational database principles,
providing a clear schema and set of queries that support robust data handling and operational
efficiency. The defined hardware and software requirements ensure that the system is capable
of performing optimally, supporting both development and deployment phases with adequate
resources.
6.2 Limitations:
Despite its comprehensive design, the pharmacy database management system has several
limitations. One major limitation is its reliance on a static database schema that may not fully
accommodate future changes in pharmacy operations or new regulatory requirements. As the
pharmaceutical industry evolves, the system may require updates to its schema and queries to
stay aligned with industry standards and practices.
Furthermore, while the project provides a solid foundation, it does not address the need for user
interfaces or integration with other pharmacy software systems, which could enhance usability
and functionality. The system’s performance is dependent on the underlying database and
hardware, and improvements in indexing, caching, or cloud-based solutions might be necessary
for optimal performance in larger deployments.
Expanding the system to include automated inventory management and integration with
external systems for electronic prescriptions and insurance processing would enhance its
functionality and streamline pharmacy operations. Introducing a user-friendly interface for
pharmacy staff and administrators would improve usability, enabling easier access to and
management of the system’s features.
In terms of scalability, optimizing the database with advanced indexing strategies, caching
mechanisms, and cloud-based solutions could enhance performance and support larger
volumes of data and user traffic. Regular updates and iterative improvements based on user
feedback and technological advancements will ensure that the system remains relevant and
effective in meeting the evolving needs of the pharmacy industry.
1. REFERENCES:
Mongoose Documentation:
Mongoose. (n.d.)
https://mongoosejs.com/
MongoDB Documentation:
MongoDB. (n.d.)
https://docs.mongodb.com/
Node.js Documentation:
Node.js. (n.d.)
https://nodejs.org/en/docs/
W3Schools. (2024):
HTML, CSS, and JavaScript Documentation.
https://www.w3schools.com/
2. Appendix - Snapshots: