Blood Bank Management System
Detailed Project Report
Submitted by:
1. Student Name 1
2. Student Name 2
3. Student Name 3
Submitted to: Instructor Name
Date of Submission: October 2024
Table of Contents
1. Introduction
2. Project Description
3. Entity-Relationship (ER) Diagram
4. Relational Database Design
5. Normalization of Tables
6. SQL Queries and Output
7. Conclusion
8. References
1. Introduction
Blood banks are essential institutions that collect, process, and store blood for medical use.
Managing blood donations, inventories, and matching blood types with recipients are
critical tasks that need to be handled efficiently. A computerized Blood Bank Management
System (BBMS) is designed to automate the process of recording donor details, managing
blood stocks, tracking blood donations, and processing requests for blood by hospitals or
patients.
The objective of this system is to ensure that blood is available to patients in need, while
maintaining accurate records of donors, blood stocks, and blood requests. This project
explores the database structure, SQL queries, and operations required to develop such a
system.
2. Project Description
The Blood Bank Management System (BBMS) consists of several key modules that help
streamline operations. These include donor registration, blood stock management, issuing
blood to recipients, and handling requests for blood. The system is designed to keep track of
different blood types, ensuring that any specific blood group is available when needed for
transfusion.
1. **Donor Registration**: This module records information about blood donors, including
their personal details, blood group, and contact information. The system also logs each
donation made by the donor.
2. **Blood Stock Management**: Blood is categorized by type and stored in the blood bank.
This module monitors blood stock levels, tracks the expiration dates of blood units, and
updates the database after each donation or transfusion.
3. **Blood Requests**: Hospitals or patients can request blood. The system checks the
availability of the required blood type and generates an alert if the stock is low.
4. **Issuing Blood**: When blood is issued to a recipient, the system automatically updates
the inventory and records the details of the transaction, ensuring accurate tracking.
3. Entity-Relationship (ER) Diagram
The ER diagram for the Blood Bank Management System illustrates the key entities and
their relationships. The major entities include:
- **Donor**: Stores details about individuals who donate blood, including their blood type
and contact details.
- **Recipient**: Stores details about patients or hospitals requesting blood.
- **Blood Stock**: Tracks the quantity of blood available by type and the expiration date.
- **Blood Donation**: Logs each blood donation made by donors.
- **Blood Request**: Logs each blood request made by recipients.
Below is an ER diagram that visually represents these entities and their relationships.
Figure 1: ER Diagram of Blood Bank Management System
4. Relational Database Design
Based on the ER diagram, the relational database design includes the following tables:
1. **Donor Table**: This table holds information about the blood donors, including their
unique ID, name, blood type, and contact information. It ensures that donors are uniquely
identifiable and records their donation history.
- Donor_ID (Primary Key)
- Name
- Blood_Type
- Age
- Contact
2. **Recipient Table**: This table records information about the patients or hospitals who
are requesting blood.
- Recipient_ID (Primary Key)
- Name
- Blood_Type
- Age
- Contact
3. **Blood_Stock Table**: Stores the available blood units, categorized by blood type and
monitored for expiration.
- Blood_Type
- Quantity
- Expiry_Date
4. **Blood_Donation Table**: Logs each blood donation made by the donor, including the
date and blood type.
- Donation_ID (Primary Key)
- Donor_ID (Foreign Key)
- Blood_Type
- Date_of_Donation
5. **Blood_Request Table**: Logs each request for blood, including the recipient and the
date of request.
- Request_ID (Primary Key)
- Recipient_ID (Foreign Key)
- Blood_Type
- Date_of_Request
5. Normalization of Tables
Normalization is essential to eliminate redundancy and ensure data consistency. Below is
the step-by-step normalization of the Donor table:
1. **First Normal Form (1NF)**: Ensures that the table has only atomic values, meaning that
each column contains indivisible values. For example, the 'Contact' column is split into
'Phone' and 'Email' to follow 1NF.
2. **Second Normal Form (2NF)**: Eliminates partial dependencies by ensuring that all
non-key attributes are fully dependent on the primary key.
3. **Third Normal Form (3NF)**: Removes transitive dependencies, ensuring that non-key
attributes depend only on the primary key.
6. SQL Queries and Output
Below are the SQL queries executed on the Blood Bank Management System database:
1. **Create Table Queries**:
```SQL
CREATE TABLE Donor (
Donor_ID INT PRIMARY KEY,
Name VARCHAR(50),
Blood_Type VARCHAR(3),
Age INT,
Contact VARCHAR(15)
);
```
2. **Insert Data Queries**:
```SQL
INSERT INTO Donor (Donor_ID, Name, Blood_Type, Age, Contact)
VALUES (1, 'John Doe', 'O+', 28, '1234567890');
```
3. **Select Query**: Retrieve donors with the 'O+' blood type:
```SQL
SELECT * FROM Donor WHERE Blood_Type = 'O+';
```
4. **Join Query**: Show donors who donated blood in the last month:
```SQL
SELECT Donor.Name, Blood_Donation.Date_of_Donation
FROM Donor
JOIN Blood_Donation ON Donor.Donor_ID = Blood_Donation.Donor_ID
WHERE Date_of_Donation > '2024-09-01';
```
5. **Update Query**: Update blood stock after a donation:
```SQL
UPDATE Blood_Stock SET Quantity = Quantity + 1 WHERE Blood_Type = 'O+';
```
6. **Delete Query**: Remove expired blood from the stock:
```SQL
DELETE FROM Blood_Stock WHERE Expiry_Date < CURDATE();
```
7. Conclusion
The Blood Bank Management System is designed to efficiently manage blood donations,
stock levels, and blood requests. It simplifies the process of tracking donors, maintaining
accurate records, and ensuring that blood is available for patients in need. In the future, the
system could be integrated with hospital systems, allowing for real-time matching of donors
and recipients based on more than just blood type. This project highlights the importance of
automation in healthcare management, particularly for life-saving resources like blood.
8. References
1. Database Management Systems by Raghu Ramakrishnan
2. SQL for Data Management by John Viescas
3. Entity-Relationship Modeling for Database Design by Peter Chen