100% found this document useful (1 vote)
477 views

SQL Project PDF

This document describes a blood bank management system project that aims to develop a software system to manage operations of blood banks. It discusses objectives like ensuring adequate blood bag supply and inventory, managing donor and recipient information, and alerting for blood requests. It provides details on entities, attributes, relationships between entities and sample queries for the database system.

Uploaded by

Arslan Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
477 views

SQL Project PDF

This document describes a blood bank management system project that aims to develop a software system to manage operations of blood banks. It discusses objectives like ensuring adequate blood bag supply and inventory, managing donor and recipient information, and alerting for blood requests. It provides details on entities, attributes, relationships between entities and sample queries for the database system.

Uploaded by

Arslan Amin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

SQL PROJECT

BLOOD BANK MANAGEMENT SYSTEM

Abstract:
• This project aims to develop a Blood Bank Management System. A Blood Bank Management
System can be used in any clinic, hospital, labs or any emergency situation which requires blood units for
survival. Our system can be used to find required type of blood in emergency situations from either blood
bank or even blood donors.
• Current system uses a grapevine communication for finding blood in cases of emergency may it
be by a donor or blood bank. The intentions of proposing such a system are to abolish the panic caused
during an emergency due to unavailability of blood.

INTRODUCTION:
• Blood banks collect, store and provide collected blood to the patients who are in need of
blood. The people who donate blood are called 'donors'. The banks then group the blood which they
receive according to the blood groups. They also make sure that the blood is not contaminated. The main
mission of the blood bank is to provide the blood to the hospitals and health care systems which saves the
patient's life. No hospital can maintain the health care system without pure and adequate blood.
• The major concern each blood bank has is to monitor the quality of the blood and
monitor the people who donates the blood, that is 'donors'. But this a tough job. The existing system will
not satisfy the need of maintaining quality blood and keep track of donors. To overcome all these
limitations, we introduced a new system called 'Blood Donation Management System'.
• The 'Blood Bank Management System' allows us to keep track of quality of blood
and also keeps track of available blood when requested by the acceptor. The existing systems are Manual
systems which are time consuming and not so effective. 'Blood Bank Management system' automates the
distribution of blood. This database consists of thousands of records of each blood bank.
• By using this system searching the available blood becomes easy and saves lot of
time than the manual system. It will hoard, operate, recover and analyse information concerned with the
administrative and inventory management within a blood bank. This system is developed in a manner that
it is manageable, time effective, cost effective, flexible and much man power is not required.

OBJECTIVE:
• Ensures hospitals have good supply or inventories of blood bags.
• List the availability of blood bags at any given time.
• Ability to manage the information of its blood donor.
• Alerts for blood requirement from registered donors.
• It eliminates costs associated with unnecessary transfusions as well as any associated adverse events.
ER DIAGRAM

Blood Specimen
Specimen_No (PK)
Checks
B_group (pk) Disease Finder
Status dfind_ID (pk)
Dfind_id (fk) dfind_name
M_id (fk) dfind_mobile

Deals With

BB Manager
Hospital info
M_id (pk) Gives Orders hosp_ID (pk)
to
m_Name hosp_name
hosp_needed_Bgrp
M_mobile
hosp_needed_qnty
Requests
to

Recipient Blood Donor


reci_ID (pk) Records Recording staff Registers bd_ID (pk)
With
reci_name bd_name
reco_ID (pk)
reci_age
bd_age
reci_Brgp reco_Name bd_sex
reci_Bqnty
reco_mobile bd_Bgroup
reco_ID
bd_reg_date
City_ID
M_id (fk) reco_ID (FK)
reci_sex City_ID
reci_reg_date
INFORMATION OF ENTITIES
In total we have seven entities and information of each entity is mentioned below: -

1.BB Manager: -
The blood bank manager is the person who takes care of the available blood samples in the
blood bank, he is also responsible for handling blood requests from recipients and hospitals. Blood
manager has a unique identification number (m_ID) used as primary key along with name and phone
number of blood bank manager will be stored in data base under BB_Manager entity.

2. Blood Donor: -
The donor is the person who donates blood, on donation a donor id (bd_ID) is generated
and used as primary key to identify the donor information. Other than that name, age, sex, blood group,
phone number and registration dates will be stored in database under Blood Donor entity.
3. Blood Specimen: -
In data base, under Blood Specimen entity we will store the information of blood samples
which are available in the blood bank. In this entity specimen_number and b_group together will be
primary key along with status attribute which will show if the blood is contaminated on not.

4. Disease Finder: -
In data base, under Disease Finder entity we will store the information of the doctor who
checks the blood for any kind of contaminations. To store that information, we have unique identification
number (dfind_ID) as primary key. Along with name and phone number of the doctor will also be stored
under same entity.

5. Hospital Info: -
In the data base, under Hospital Info entity we will store the information of hospitals. In
this hosp_ID and hosp_needed_Bgrp together makes the primary key. We will store hospital name and the
blood quantity required at the hospital.
6. Recipient: -
The Recipient is the person who receives blood from blood bank, when blood is given to a
recipient a recipient ID (reci_ID) is generated and used as primary key for the recipient entity to identify
blood recipients’ information. Along with it name, age, sex, blood group (needed), blood quantity(needed),
phone number, and registration dates are also stored in the data base under recipient entity.

7. Recording Staff: -
The recording staff is a person who registers the blood donor and recipients and the
Recording Staff entity has reco_ID which is primary key along with recorder’s name and recorder’s phone
number will also be stored in the data base under Recording Staff entity.
CONTENTS OF TABLES
1.BB Manager: -

2. Blood Donor: -

3. Blood Specimen: -
4. Disease Finder: -

5. Hospital Info: -

6. Recipient: -

7. Recording Staff: -
QUERIES
1.Display all the details of all the Blood Donor where Blood is O+ :
Queries:
MariaDB [donor]> select * from blood_donor where bd_Bgroup=(select bd_Bgroup blood_donor where
bd_Bgroup="O+");

2.Where
Queries:
MariaDB [donor]> select * from bloodspecimen where dfind_ID=(select dfind_id from diseasefinder where
dfind_id=11);

3.Show all the details of bb manager and raw recipient associated with reci age having grate than 21
Queries:
MariaDB [donor]> select * from bb_manager where m_id in (select M_id from recipient where
reci_age>21);
4. Create a View of recipients and donor’s names having the same blood group registered on the same
date and the name of recording staff name.
Queries:
MariaDB [donor]> CREATE VIEW Blood_Recipient_SameBGrp AS select
Blood_Donor.bd_name,Recipient.reci_name,reco_Name from Recording_Staff inner join Blood_Donor on
Recording_Staff.reco_ID = Blood_Donor.reco_ID inner join Recipient on Recording_Staff.reco_ID =
Recipient.reco_ID where Blood_Donor.bd_Bgroup = Recipient.reci_Brgp and Blood_Donor.bd_reg_date =
Recipient.reci_reg_date; select* from Blood_Recipient_SameBGrp;

5. Show the blood specimen verified by disease finder shivam which are pure (status=1).
Queries:
MariaDB [donor]> Select specimen_number,b_group from BloodSpecimen,DiseaseFinder WHERE
BloodSpecimen.dfind_ID= DiseaseFinder.dfind_ID AND dfind_name='shivam' AND status=1;

6. Show the pure blood specimen handled by BB_Manager who also handles a recipient needing the
same blood group along with the details of the BB_Manager and Recipient.
Queries:
MariaDB [donor]> select BB_Manager.M_id,m_Name,Recipient.reci_name,
Recipient.reci_Brgp,BloodSpecimen.b_group from BB_Manager,Recipient,BloodSpecimen where
Recipient.M_id = BloodSpecimen.M_id and Recipient.reci_Brgp = BloodSpecimen.b_group and
Recipient.M_id = BB_Manager.M_id and status = 1;
7. Show the donors having the same blood groups required by the recipient staying in the same city
along with recipient details.
Queries:
MariaDB [donor]> Select bd_ID,bd_name,reci_ID,reci_name FROM Blood_Donor,Recipient WHERE
bd_Bgroup=reci_Brgp AND Blood_Donor.City_ID= Recipient.City_ID;

8. view

Queries:
MariaDB [donor]> create view doctor as select hosp_name,hosp_needed_bgrp from hospital_info;

9.join

Queries
select * from bb_manager left join bloodspecimen on bb_manager.m_id=bloodspecimen.m_id;
10. Finds any value that starts with ‘s’.

Queries:
select * from recording_staff where reco_name like "s%";

11.limit and offset.

Queries:
MariaDB [donor]> select * from bloodspecimen limit 6 offset 9;

CONCLUSION
Prior to this project, a general study of blood bank management system was conducted from recent researches of
various authors and facts were gathered in which helped to uncover the misfits that the system was facing. After
proper analysation of these problems, a solution was then developed in order to meet up the needs of a more
advanced system. This system is known as the centralized blood bank repository which helped in eliminating all
the problems that the previous systems were facing. With this system, Blood banks/ Centers, Hospitals, Patients and
Blood donors will be brought together to enjoy a large number of functionalities and access a vast amount of
information, thereby making blood donation and reception a lot easier and faster.

Before implementing the database, in the design phase, We have explored various features, operations of a
blood bank to figure out required entities, attributes and the relationship among entities to make an
efficient Entity Relationship Diagram(ERD). After analyzing all the requirements, I have created our ERD and then
converted the ERD to relational model and normalized the tables.

Using SQL Server I have created the tables for my database and inserted some sample values in the tables. Finally,
I have executed sample queries on the database to check its performance to retrieve useful information
accurately and speedily.

You might also like