Data Base Ass

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Unity University

College of Engineering, Technology and Computational Science


Department of Computer Science and MIS
BLOOD DONATION SYSTEM DATABSE PROJECT

By
Hundaol Worku UU89778R
Kalyistna Ketema UU89784R
Kirubel Abebe UU89851R
Kirubel Shewaferahu UU89734R
Tsegazeab Berihun UU89693R

Instructor
MR.

08-07-2023
Blood donation system database project

1. Introduction

Blood donation system database is a computer system that is used to store and
manage data related to blood donation. This data can include information about blood
donors, blood recipients, and blood inventory. The database can be used to track blood
donations, identify blood donors who are compatible with a particular recipient, and
manage blood inventory levels.

A blood donation system database can be used to improve the efficiency and
effectiveness of blood donation programs. For example, the database can be used to
automate the process of matching blood donors with recipients. This can help to ensure
that blood is available when it is needed, and that it is matched to the correct recipient.
The database can also be used to track blood donation trends, which can help to
identify areas where blood donation programs can be improved.

Blood donation is a life-saving act that can help patients in need. However, blood banks
often struggle to manage the donation and distribution of blood. This can lead to
shortages of blood, which can have a devastating impact on patients.

A blood donation system database project can help to address this challenge. This type
of project can be used to manage and track the donation and distribution of blood. It can
also be used to collect and store information about donors, such as personal details,
medical history, and donation history. This information can be used to identify potential
donors, track the donation process, and ensure that blood is distributed to those who
need it most.

A blood donation system database project can be a valuable tool for blood banks and
other organizations that are involved in the donation and distribution of blood. It can
help to improve the efficiency of the donation process and ensure that blood is available
to those who need it most.
2. Background of the blood donation center and data processing

Ethiopia has a long history of blood donation, with the establishment of blood donation
centers dating back to the 1970s. The Ethiopian Red Cross Society (ERCS) is the main
organization responsible for collecting, processing, and distributing blood in the country.

The ERCS operates numerous blood donation centers across Ethiopia, including in
major cities such as Addis Ababa, Bahir Dar, Dire Dawa, and Hawassa. These centers
play a crucial role in ensuring a steady supply of safe blood for medical procedures,
emergency situations, and transfusions.

In terms of data processing, the ERCS has implemented various systems to manage
and track blood donations. These systems help in recording donor information, blood
type, screening results, and inventory management. The collected data is used to
maintain a database of eligible donors, monitor blood availability, and ensure the safety
of donated blood.

To maintain the integrity of the donated blood, the ERCS follows strict protocols for
testing, processing, and storage. Donated blood goes through a series of laboratory
tests to detect infectious diseases, such as HIV, hepatitis B and C, syphilis, and malaria.
Once the blood is deemed safe, it is processed into various components (such as red
blood cells, plasma, and platelets) and stored under appropriate conditions until
needed.

The ERCS also collaborates with healthcare facilities, hospitals, and clinics to ensure
efficient blood distribution. In emergency situations, the ERCS plays a vital role in
coordinating the mobilization and delivery of blood to areas in need.

Overall, the blood donation centers in Ethiopia, managed by the Ethiopian Red Cross
Society, play a crucial role in collecting, processing, and distributing blood to save lives
and improve healthcare services in the country.

3. Problems in the data processing unit (problem statement)

The blood donation system in Ethiopia is facing significant challenges due to the
absence of an efficient and centralized database. This lack of a comprehensive
database poses several problems, including difficulties in maintaining accurate and up-
to-date records of blood donors, their blood types, and donation history. As a result, the
process of matching blood donors with recipients in need becomes inefficient and time-
consuming, leading to potential delays and hurdles in accessing the required blood
types for patients.

One of the primary issues arises from the absence of a standardized system for
collecting and storing donor information. Currently, blood donation centers rely on
manual and paper-based methods to record donor details, which are prone to errors,
loss, and misplacement. This lack of a streamlined database makes it challenging to
track and manage donor information effectively, leading to a disorganized system that
hampers the efficient utilization of donated blood.

Furthermore, the absence of a centralized database complicates the process of blood


supply management. Without a comprehensive system in place, it becomes difficult for
blood banks and hospitals to monitor the availability of specific blood types accurately.
As a result, there is a higher risk of shortages or excesses of certain blood types,
leading to imbalances in the supply and demand of blood products.

Additionally, the lack of a reliable database hinders the ability to track donor eligibility
and donation history. Without a centralized system, it becomes difficult to verify if
potential donors meet the necessary criteria for donation or if they have previously
donated blood. This leads to redundant screening processes and potential risks
associated with accepting blood from ineligible donors, compromising the safety and
quality of the donated blood.

Overall, the absence of an efficient and centralized blood donation system database in
Ethiopia poses numerous challenges. It impedes the timely and accurate matching of
donors with recipients, complicates blood supply management, and hinders the tracking
of donor eligibility and donation history. Therefore, there is an urgent need to develop a
robust and user-friendly database that can streamline the process of managing donor
information, ensure efficient blood supply management, and ultimately save lives.

4. Project Objective

4.1 General Objective

The general objective of a blood donation system database project is to create a system
that will help blood banks and other organizations to manage and track the donation
and distribution of blood. The system should be able to:
4.2 Specific Objectives

Here are some specific objectives of a blood donation system database project:

 To create a system that is easy to use for both donors and blood bank
staff.
 To create a system that is secure and protects the privacy of donor
information.
 To create a system that provides reports on the blood donation process.
 To create a system that helps blood banks and other organizations to
manage and track the donation and distribution of blood.

The system should be designed to be scalable and should be able to be easily adapted
to changes in the blood donation process. It should also be able to be integrated with
other systems, such as hospital information systems.

The system should be developed using a sound methodology and should be thoroughly
tested before it is put into use. It should also be regularly maintained and updated to
ensure that it continues to meet the needs of blood banks and other organizations.

5. Project Scope (coverage)

The scope of developing a blood donation system database in Ethiopia includes the
following key aspects:

 Donor Management: Designing a user-friendly interface for capturing and storing


donor information, including personal details, contact information, medical
history, and eligibility criteria. Implementing a secure and centralized database to
ensure the confidentiality and integrity of donor data. Enabling efficient search
and retrieval of donor information based on various parameters such as blood
type, location, and donation history.

 Blood Inventory Management: Developing a system to track and manage the


inventory of blood units available in blood banks and hospitals. Implementing
real-time monitoring of blood supply levels, expiration dates, and blood types to
prevent shortages or wastage. Facilitating efficient communication and
coordination between blood banks and hospitals to ensure timely availability of
required blood types for patients.
 Matching and Notification: Developing algorithms and protocols to match blood
donors with recipients based on compatible blood types and other relevant
criteria. Implementing an automated notification system to alert potential donors
when their blood type is urgently needed. Ensuring compatibility with existing
communication channels (SMS, email, etc.) to reach out to donors efficiently.
 Donation History and Eligibility: Creating a comprehensive database to record
and track the donation history of each donor, including the date, location, and
type of donation. Implementing a system to verify donor eligibility based on age,
health conditions, and deferral periods. Providing access to authorized medical
professionals for reviewing donor history and eligibility during the screening
process.

 Reporting and Analytics: Developing reporting capabilities to generate various


statistical reports on blood donations, usage, and inventory levels. Providing
analytical tools to identify trends, patterns, and potential areas of improvement in
the blood donation system. Enabling data-driven decision-making to optimize the
allocation of resources and improve the overall efficiency of the blood donation
process.

 Integration and Scalability: Ensuring compatibility and integration with existing


healthcare systems, such as hospital management systems and electronic health
records. Designing the system with scalability in mind to accommodate the
potential growth in donor numbers and blood supply requirements. Allowing for
future enhancements and integration with emerging technologies, such as mobile
applications or biometric identification.

 Training and Support: Providing comprehensive training to blood bank staff and
healthcare professionals on using and managing the blood donation system
database. Offering ongoing technical support and maintenance to address any
issues or updates required in the system. Conducting regular evaluations and
user feedback sessions to continuously improve the system's functionality and
usability. By addressing these aspects, the developed blood donation system
database in Ethiopia aims to streamline the blood donation process, improve
efficiency in matching donors with recipients, enhance blood supply
management, ensure donor eligibility and safety, and ultimately contribute to
saving lives.

6. Project Benefits (to the user, the organization and to you, as


student practitioners)

The development of a blood donation system database in Ethiopia offers several


benefits to various stakeholders involved:

6.1 Benefits to Users (Donors and Recipients):

 Easy Registration: Donors can easily register their information, making it


convenient for them to participate in the blood donation process.
 Timely Notifications: Donors can receive notifications when their blood type is
urgently needed, allowing them to contribute promptly and potentially save lives.
 Efficient Matching: Recipients in need of specific blood types can be quickly
matched with compatible donors, ensuring timely access to the required blood.
 Improved Safety: Donors can have their eligibility and donation history verified,
ensuring the safety and quality of donated blood for recipients.
 Enhanced Convenience: Donors can access their donation history and records,
making it easier for them to track their contributions and participate in future
donations.

6.2 Benefits to Organizations (Blood Banks, Hospitals, and Healthcare


Facilities):

 Efficient Donor Management: Organizations can maintain a centralized database


of donor information, enabling efficient management and retrieval of donor
records.
 Streamlined Blood Inventory: Organizations can effectively track and manage
blood inventory, minimizing shortages, wastage, and ensuring optimal utilization.
 Enhanced Coordination: Blood banks and hospitals can communicate
seamlessly, facilitating the timely availability of required blood types for patients.
 Improved Reporting and Analytics: Organizations can generate reports and
analyze data to identify trends, optimize resource allocation, and make informed
decisions.
 Increased Efficiency: The system automates various processes, reducing manual
efforts, improving accuracy, and enhancing overall operational efficiency.

6.3 Benefits to Student Practitioners:

 Hands-on Experience: Developing a blood donation system database provides


an opportunity for students to gain practical experience in database design,
software development, and project management.
 Problem-solving Skills: Students can develop critical thinking and problem-
solving skills by addressing the challenges faced in the blood donation system.
 Collaboration and Communication: Working on a project of this nature allows
students to collaborate with stakeholders, enhancing their teamwork and
communication abilities.
 Impactful Contribution: By developing a system that saves lives and improves
healthcare services, students can make a meaningful impact on society.
 Skill Development: Students can enhance their technical skills, such as database
management, programming, and system integration, which are valuable in their
future careers.
 Overall, the blood donation system database project benefits users by providing
a convenient and efficient platform, organizations by streamlining processes and
enhancing blood supply management, and students by offering practical
experience and skill development.
7. Methodology

7.1 Fact-finding methods (interviews, questionnaires, document analysis, etc)

1. Stakeholder Interviews: we try to conduct interviews with key stakeholders in the


blood donation system in Ethiopia, such as representatives from blood banks,
healthcare professionals, and potential donors. We ask them about their specific
needs, challenges, and expectations regarding the database system, taking into
account the unique context of Ethiopia.

2. Field Visits and Observations: we visit blood banks, hospitals, and mobile
donation centers in Ethiopia to observe the current blood donation process and
observe how data is collected, managed, and shared. We take note of
infrastructure limitations, cultural considerations, or regulatory requirements that
may impact the design and implementation of the database system.

3. Review of Existing Documentation: we don’t get much documentation but we try


to the organization policies, guidelines

4. Surveys and Focus Groups: we try to design and distribute surveys or conduct
focus groups with potential donors, recipients, and healthcare providers in
Ethiopia. we gather their opinions, preferences, and suggestions regarding a
blood donation system database. Pay attention to cultural factors, language
preferences, and technological constraints that may influence the design and
usability of the system.

5. Expert Consultation: we seek advice and guidance from experts in the field of
blood donation systems or healthcare professionals in Ethiopia, engage in
discussions to understand the specific requirements, challenges, and
opportunities unique to the Ethiopian context though we don’t find much helpful
guidance

6. Data Analysis and Synthesis: Analyze the information gathered through the fact-
finding methods, identify common themes, requirements, and constraints specific
to Ethiopia. Synthesize the findings to define the specific functionalities, data
elements, and workflows that will be incorporated into the blood donation system
database.

7.2 Hardware and software technology chosen to realize the project


1. Database Management System (DBMS): Choose a reliable and robust DBMS to
manage the blood donation system database. Our options Is MySQL

2. Security Tools: we will try to implement robust security measures to protect the
database and user data. Utilize encryption techniques, access controls, and
secure coding practices. Consider using security tools like firewalls, intrusion
detection systems, and antivirus software to safeguard the system against
potential threats.

3. Testing and Quality Assurance Tools: Employ testing and quality assurance tools
to ensure the system functions as intended. This includes tools for unit testing,
integration testing, and automated testing.

We consider factors such as compatibility, scalability, security, and ease of


maintenance when selecting hardware and software technologies. Adapt the choices to
the specific needs and requirements of the blood donation system project in Ethiopia.
Questioners for the donors

Certainly! Here's a questionnaire for donors to help develop a database for a blood
donation system in Ethiopia:
1. Full Name:
2. Gender:
3. Date of Birth:
4. Contact Information:
 Phone Number:
 Email Address:
 Physical Address:
5. Blood Type: (A, B, AB, O)
6. Rh Factor: (Positive or Negative)
7. Have you donated blood before? (Yes/No)
 If yes, how many times?
 When was your last donation?
8. Have you ever been deferred from donating blood? (Yes/No)
 If yes, please provide details:
9. Do you have any chronic medical conditions? (Yes/No)
 If yes, please specify:
10. Are you currently taking any medications? (Yes/No)
 If yes, please provide details:
11. Have you traveled outside Ethiopia in the past 12 months? (Yes/No)
 If yes, please provide details of countries visited:
12. Have you had any surgeries or medical procedures in the past 6 months?
(Yes/No)
 If yes, please provide details:
13. Are you currently pregnant or have you been pregnant in the past 6 months?
(Yes/No)
 If yes, please provide details:
14. Do you have any known allergies? (Yes/No)
 If yes, please specify:
15. Are you currently experiencing any symptoms of illness? (Yes/No)
 If yes, please provide details:
16. Are you willing to be contacted for future blood donation campaigns or
emergencies? (Yes/No)
17. Do you have any additional comments or questions?
Questioners for the organization

Certainly! Here's a questionnaire for organizations to help develop a database for a


blood donation system in Ethiopia:
1. Organization Name:
2. Organization Type: (Hospital, Blood Bank, Non-profit, etc.)
3. Contact Person:
 Full Name:
 Position:
 Phone Number:
 Email Address:
4. Organization Address:
5. Does your organization currently have a blood donation program in place?
(Yes/No)
 If yes, please provide a brief overview of your existing program:
6. How many blood donors does your organization typically engage with per
month?
7. Are you currently using any system or database to manage donor information?
(Yes/No)
 If yes, please specify the system being used:
8. What specific information do you collect from blood donors during registration?
9. Are there any additional data points you would like to collect from donors? (e.g.,
medical history, previous donation dates)
10. How often do you require updates to the donor information in your database?
11. Do you have any specific reporting requirements for your blood donation
program? (e.g., donor demographics, blood supply status)
12. Are there any security measures or protocols in place to protect donor
information and ensure confidentiality?
13. Would you like the database to integrate with any existing systems or databases
within your organization?
14. Are there any specific features or functionalities you would like to see in the
database for managing your blood donation program effectively?
15. What are the anticipated challenges in implementing and maintaining a database
for your blood donation system?
16. Are there any legal or regulatory considerations that need to be taken into
account when developing the database?
Thank you for providing this information. It will assist us in developing a tailored
database for your organization's blood donation system in Ethiopia.
Conceptual model
Entities:

1. Donor: Represents an individual who is willing to donate blood.

- Attributes: Donor ID, Name, Age, Blood Type, Contact Information, Address.

2. Blood Bank: Represents a facility or organization responsible for collecting, testing, and
storing donated blood.

- Attributes: Blood Bank ID, Blood type, Location, Contact Information, orders.

3. Hospital: Represents a healthcare institution that provides medical, surgical, and nursing
care for sick or injured people

- Attributes: Hospital Name, Address, Contact Name.

4. Blood: Represents a unit of donated blood collected from a donor.

- Attributes: Unit ID, Blood Type, Expiration Date, Testing Status (e.g., tested for diseases).

5. Blood bank manager: Represents healthcare professionals or technicians responsible for


collecting blood donations.

- Attributes: employee ID, Name, Contact Number.

6. Reception: Represents an individual who will receive the donated blood.

- Attributes: Recipient ID, Name, Age, Blood Type, Medical Condition.

7. Patient: Represents an individual who need donated blood.

Relationships:

1. Donor - Blood: A donor can donate blood multiple times, so this is a one-to-many
relationship.

2. Blood - Blood Bank: Each unit of blood belongs to one blood bank (where it was collected
and stored), but a blood bank can have many units of blood. So this is a one-to-many
relationship.
3. Blood Bank - Blood Bank Manager: Each blood bank is managed by at least one blood
bank manager, and a manager can manage one or more blood banks, depending on the size
and staffing of the bank. This could be a one-to-many or many-to-many relationship based on
the specifics.

4. Blood Bank - Hospital: Blood Banks can supply blood to multiple hospitals, and hospitals
can receive blood from multiple blood banks. So, this is a many-to-many relationship.

5. Hospital - Patient: Each patient is treated in one hospital (in a specific context), but a
hospital can treat many patients. This is a one-to-many relationship.

6. Donor - Reception: Each donor can donate blood to many recipients, but each unit of
donated blood comes from one donor. So, this is also a one-to-many relationship.

ERMAPING
DONOR
DONER DONER DONER CONTACT ADDRESS
NAME NUMBER

BLOOD BANK
BLOOD TYPE Blood Bank ID CONTACT INFO ORDER LOCATION

BLOOD
BLOOD TYPE BLOOD ID TESTING STATUS EXPIRED DATE

HOSPITAL
HOSPITAL NAME ADDRESS CONTACT NUMBER

PATIENT
PATIENT NAME PATIENT ID CONTACT NUMBER

RESEPTIONIST
EMPLOYEE NAME EMPLOYEE ID CONTACT NUMBER

BLOOD BANK MANAGER


EMPLOYEE NAME EMPLOYEE ID CONTACT NUMBER

Logical model

PATIENT
Patient name Varchar(20)
Patient ID int
Contact number int
BLOOD
1 Blood type Varchar(20)

1 M Blood ID int

Tasting status Varchar(20)

Expired date Varchar(20)


HOSPITAL M
Hospital name Varchar(20)
1
Address Varchar(20)
M
Contact number Int
BLOOD BANK
Blood Bank ID int
M
DONOR Blood type Varchar(20)
Donor id Varchar(20)
Contact info Varchar(20)
Donor name Varchar(20)
Contact Varchar(20) Order Varchar(20)
1
number
location Varchar(20)
Address Varchar(20)

1
BLOOD BANK MANAGER
Employee name Varchar(20)
M employee ID int
Contact number int

RESEPTIONIST
Employee name Varchar(20)
Employee ID int
Contact number int

Normalization
To create a normalized table for the "donates" relation, follow these steps:
Step 1: Identify the distinct entities in the relation. In this case, the distinct entities are "Donor"
and "Blood".

Step 2: Create separate tables for each entity, with their respective attributes.

Table: Donor

Donor ID Donor Name Address Contact Number Donor Age

Table: Blood

Testing Status Blood Type blood ID Expiration Date

Step 3: Determine the primary key for each table. The primary key uniquely identifies each
record in a table.

In the "Donor" table, the primary key can be "Donor ID".

In the "Blood" table, the primary key can be "blood ID".

Step 4: Establish relationships between the tables using foreign keys.

Since the "donates" relation connects the "Donor" and "Blood" tables, we need to add a foreign
key column in one of the tables to reference the primary key column of the other table.

Let's add a foreign key column called "Donor ID" in the "Blood" table to establish the
relationship.

Table: Blood

Testing Status Blood Type Bloodied Expiration Date Donor ID

Step 5: Connect the tables based on the foreign key relationship. This can be done by joining
the tables using the foreign key and primary key columns.

Step 1: Identify the distinct entities in the relation. In this case, the distinct entities are "Blood
Bank" and "Blood".

Step 2: Create separate tables for each entity, with their respective attributes.

Table: Blood Bank

Blood Bank ID Location Order Contact Information


Table: Blood

blood ID Testing Status Blood Type Expiration Date

Step 3: Determine the primary key for each table. The primary key uniquely identifies each
record in a table.

In the "Blood Bank" table, the primary key can be "Blood Bank ID".

In the "Blood" table, the primary key can be "Blood ID".

Step 4: Establish relationships between the tables using foreign keys.

Since the "Blood Type" attribute in the "Blood" table is related to the "Blood Bank" table, we
need to add a foreign key column in the "Blood" table to reference the primary key column of
the "Blood Bank" table.

Let's add a foreign key column called "Blood Bank ID" in the "Blood" table to establish the
relationship.

Table: Blood

| Blood ID | Testing Status | Blood Type | Expiration Date | Blood Bank ID |

Step 5: Connect the tables based on the foreign key relationship. This can be done by joining
the tables using the foreign key and primary key columns.

Now, you have a normalized table for the "donates" relation with separate tables for "Blood
Bank" and "Blood", and a foreign key column in the "Blood" table to establish the relationship.

Donates (Blood ID, Testing Status, Blood Type, Expiration Date, Blood Bank ID)

To normalize the "Blood Bank Manager" relation, we need to follow the normalization steps:

Step 1: Identify the distinct entities in the relation. In this case, the distinct entity is "Blood Bank
Manager".

Step 2: Create a table for the entity with its attributes.

Table: Blood Bank Manager


Employee ID Name Contact Number

Step 3: Determine the primary key for the table. The primary key uniquely identifies each
record in a table.

In the "Blood Bank Manager" table, the primary key can be "Employee ID".

Step 4: Check for functional dependencies and eliminate any partial dependencies.

In this case, there are no functional dependencies or partial dependencies as all attributes are
independent.

Step 5: Check for transitive dependencies and eliminate them.

In this case, there are no transitive dependencies as there is only one attribute set.

Step 6: The table is already in its most normalized form (1NF) as it has a single attribute set and
no functional or transitive dependencies
Sample code
create database BLOOD_DONATION;
-- Donor table
CREATE TABLE Donor (
donor_id INT PRIMARY KEY,
donor_name VARCHAR(20),
donor_contact VARCHAR(20),
donor_address Varchar(20)
);

-- Blood table
CREATE TABLE Blood (
blood_id INT PRIMARY KEY,
donor_id INT,
blood_type VARCHAR(20),
expired_date DATE,

FOREIGN KEY (donor_id) REFERENCES Donor(donor_id)


);
--hospital table
CREATE TABLE Hospital(
hospital_id INT PRIMARY KEY,
hospital_name VARCHAR(20),
contact_no INT
);

-- Blood Bank table


CREATE TABLE BloodBank (
bloodbank_id INT PRIMARY KEY,
bloodbank_name VARCHAR(255),
B_location VARCHAR(255),
blood_type VARCHAR(20)
);

-- Blood Bank Manager table


CREATE TABLE Blood_Bank_Manager (
manager_id INT PRIMARY KEY,
manager_name VARCHAR(20)
);
--reseptionist table
CREATE TABLE reseptionist(
employee_id int PRIMARY KEY,
employee_name VARCHAR(20),
contact_number int
);
-- patient table
create table patient(
patient_id INT PRIMARY KEY,
patient_name VARCHAR(20),
patient_contact VARCHAR(20),
patient_address varchar(20)
);

-- Blood Bank - Blood Bank Manager relationship table (many-to-many)


CREATE TABLE Blood_Bank_Manager_Relation (
Blood_bank_id INT,
manager_id INT,
PRIMARY KEY (blood_bank_id, manager_id),
FOREIGN KEY (blood_bank_id) REFERENCES Bloodbank(bloodbank_id),
FOREIGN KEY (manager_id) REFERENCES Blood_Bank_Manager(manager_id)
);

-- Blood Bank - Hospital relationship table (many-to-many)


CREATE TABLE Bloodbank_Hospital_Relation (
Bloodbank_id INT,
hospital_id INT,
PRIMARY KEY (bloodbank_id, hospital_id),
FOREIGN KEY (bloodbank_id) REFERENCES Bloodbank(bloodbank_id),
FOREIGN KEY (hospital_id) REFERENCES Hospital(hospital_id)
);
--
select *from Blood
---sample test data
insert into Donor( donor_id, donor_name , donor_contact ) values('d001', 'abebe',
'mekelle');
insert into Donor( donor_id, donor_name , donor_contact ) values('d002', 'henok',
'addisabeba');
insert into Donor( donor_id, donor_name , donor_contact ) values('d003', 'kaleb',
'hawassa');
insert into Donor( donor_id, donor_name , donor_contact ) values('d004', 'yohannes',
'addisabeba');
insert into patient(patient_id, patient_name, patient_contact, patient_address)
values('p001','AB','094545','addis abeba');
insert into patient(patient_id, patient_name, patient_contact, patient_address)
values('p002','AC','094444','mekellee');
insert into patient(patient_id, patient_name, patient_contact, patient_address)
values('p003','AD','093333','hawasa');
insert into patient(patient_id, patient_name, patient_contact, patient_address)
values('p004','AF','096543','bahirdar'):

insert into Blood( blood_id,donor_id, blood_type, expired_date)


values('001','d001','A+','9-04-2023');
insert into Blood( blood_id,donor_id, blood_type, expired_date)
values('002','d002','O','12-01-2023');
insert into Blood( blood_id,donor_id, blood_type, expired_date)
values('003','d003','AB','11-22-2023');
insert into Blood( blood_id,donor_id, blood_type, expired_date)
values('004','d004','B-','9-13-2023');
insert into Hospital(hospital_id,hospital_name,contact_no)
values('h001','zewditu','01111111');
insert into Hospital(hospital_id,hospital_name,contact_no)
values('h002','tekuranbesa','01111111');
insert into Hospital(hospital_id,hospital_name,contact_no)
values('h003','ayder','01111111');
insert into Hospital(hospital_id,hospital_name,contact_no)
values('h004','cms','01111111');
insert into BloodBank(bloodbank_id,bloodbank_name,
B_location,blood_type)values('l001','aaa','addisabeba','A+');
insert into BloodBank(bloodbank_id,bloodbank_name,
B_location,blood_type)values('l002','bbb','addisabeba','O');
insert into BloodBank(bloodbank_id,bloodbank_name,
B_location,blood_type)values('l003','ccc','addisabeba','B-');
insert into BloodBank(bloodbank_id,bloodbank_name,
B_location,blood_type)values('l004','ddd','addisabeba','Ab');
insert into Blood_Bank_Manager(manager_id,manager_name) values('m001','kebde')
insert into
reseptionist(employee_id,employee_name,contact_number)values('e001','beza','12345');
insert into
reseptionist(employee_id,employee_name,contact_number)values('e002','abel','00345');
insert into
reseptionist(employee_id,employee_name,contact_number)values('e003','hiwot','44567');
select * from Donor
select * from BloodBank
select * from Blood
SELECT * FROM Blood WHERE expired_date=9-13-2023

You might also like