Skip to content

PrajitBhalala/DBMS_Mini_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Blood Bank Management System

Overview

This project is a basic Database Management System (DBMS) designed to manage the operations of a blood bank. The system aims to streamline the processes of blood donation, storage, distribution, and tracking, ensuring efficient management of blood resources and facilitating timely access for those in need. This project is based on the conceptual Entity-Relationship (ER) diagram provided (see below).

Note: This is a foundational DBMS project focusing on the database schema. Future development could involve building a user interface (web or desktop application) to interact with the database and implement more advanced features.

Core Entities and Relationships (Based on the ER Diagram)

The database schema is designed around the following key entities and their relationships:

  • Blood Specimen: Represents individual units of collected blood, identified by a unique specimen_no. Each specimen has a b_group and a status.
  • Disease Finder: Represents an entity or system responsible for checking blood specimens for diseases, identified by dfnd_ID. It has attributes dfnd_name and dfnd_phNo.
    • Checks: A Disease Finder checks one or more Blood Specimen (1:*), and each Blood Specimen is checked by exactly one Disease Finder (1:1).
    • Gives order to: A Disease Finder can give orders to one or more Hospital_Info (1:*), and a Hospital_Info can receive orders from one or more Disease Finder (*:1).
  • Hospital_Info: Stores information about hospitals, identified by hosp_ID. It includes hosp_Name, hosp_phNo, hosp_needed_Bgrp, and hosp_needed_qnty.
    • In: A Hospital_Info is located in exactly one City (1:1), and a City can contain one or more Hospital_Info (1:*).
  • City: Represents cities, identified by City_ID and having a City_Name.
  • Blood_Donor: Stores information about blood donors, identified by bd_ID. Attributes include bd_name, bd_phNo, bd_sex, bd_age, and bd_Bgroup, along with a bd_reg_date.
    • Lives in: A Blood_Donor lives in exactly one City (1:1), and a City can have one or more Blood_Donor (1:*).
    • Registers: A Recording_Staff registers one or more Blood_Donor (1:*), and each Blood_Donor is registered by exactly one Recording_Staff (1:1).
  • Recipient: Stores information about blood recipients, identified by reci_ID. Attributes include reci_name, reci_phNo, reci_sex, reci_age, and reci_Bgrp, along with a reci_date.
    • Lives in: A Recipient lives in exactly one City (1:1), and a City can have one or more Recipient (1:*).
    • Requests to: A Recipient can make one or more requests to a BB_Manager (1:*), and each request is directed to exactly one BB_Manager (1:1).
    • Records: A Recording_Staff records information for one or more Recipient (1:*), and each Recipient's information is recorded by exactly one Recording_Staff (1:1).
  • BB_Manager: Stores information about blood bank managers, identified by M_id. Attributes include m_Name and m_phNo.
    • Deals with specimen: A BB_Manager can deal with one or more Blood Specimen (1:*), and each Blood Specimen is dealt with by exactly one BB_Manager (1:1).
  • Recording_Staff: Stores information about recording staff, identified by reco_ID. Attributes include recoName and reco_phNo.

Database Schema (Conceptual - Based on the ER Diagram)

The following outlines a potential basic database schema based on the provided ER diagram. Specific data types and constraints will be defined during implementation.

  • BloodSpecimen Table:
    • specimen_no (Primary Key)
    • b_group
    • status
    • dfnd_ID (Foreign Key referencing DiseaseFinder)
    • M_id (Foreign Key referencing BB_Manager)
  • DiseaseFinder Table:
    • dfnd_ID (Primary Key)
    • dfnd_name
    • dfnd_phNo
  • HospitalInfo Table:
    • hosp_ID (Primary Key)
    • hosp_Name
    • hosp_phNo
    • hosp_needed_Bgrp
    • hosp_needed_qnty
    • City_ID (Foreign Key referencing City)
  • City Table:
    • City_ID (Primary Key)
    • City_Name
  • BloodDonor Table:
    • bd_ID (Primary Key)
    • bd_name
    • bd_phNo
    • bd_sex
    • bd_age
    • bd_Bgroup
    • bd_reg_date
    • City_ID (Foreign Key referencing City)
    • reco_ID (Foreign Key referencing Recording_Staff)
  • Recipient Table:
    • reci_ID (Primary Key)
    • reci_name
    • reci_phNo
    • reci_sex
    • reci_age
    • reci_Bgrp
    • reci_date
    • City_ID (Foreign Key referencing City)
    • reco_ID (Foreign Key referencing Recording_Staff)
    • M_id (Foreign Key referencing BB_Manager)
  • BBManager Table:
    • M_id (Primary Key)
    • m_Name
    • m_phNo
  • RecordingStaff Table:
    • reco_ID (Primary Key)
    • recoName
    • reco_phNo
  • DiseaseFinder_HospitalInfo Table (Junction Table for Many-to-Many):
    • dfnd_ID (Foreign Key referencing DiseaseFinder)
    • hosp_ID (Foreign Key referencing HospitalInfo)
    • (Potentially other attributes related to the order)
    • PRIMARY KEY (dfnd_ID, hosp_ID)

Technologies Used

  • Database Management System (DBMS): [Specify the DBMS you are using, e.g., MySQL, PostgreSQL, SQLite]
  • SQL: For defining the database schema and querying the data.
  • (Potentially in the future):
    • Programming Language (for application development): [e.g., Python, Java, PHP]
    • Web Framework (if developing a web application): [e.g., Flask, Django, Spring]
    • ORM (Object-Relational Mapper): [e.g., SQLAlchemy, Hibernate]

Setup and Installation (Database Only)

  1. Install the chosen DBMS: If you haven't already, download and install the DBMS you intend to use (e.g., MySQL Community Server, PostgreSQL).
  2. Access the DBMS: Use a command-line interface or a database administration tool (e.g., MySQL Workbench, pgAdmin) to connect to your DBMS server.
  3. Create the database: Create a new database for the blood bank system using SQL:
    -- Example for MySQL
    CREATE DATABASE blood_bank_system;
    USE blood_bank_system;
    
    -- Example for PostgreSQL
    CREATE DATABASE blood_bank_system;
    \c blood_bank_system;
  4. Create the tables: Execute SQL CREATE TABLE statements to define the schema for each table based on the conceptual schema described above, including defining primary keys and foreign key constraints.
  5. (Optional) Create the junction table: Create the DiseaseFinder_HospitalInfo table to resolve the many-to-many relationship.
  6. (Optional) Populate with initial data: You can insert some sample data into the tables for testing purposes using SQL INSERT INTO statements.

Potential Future Enhancements

  • User Interface: Develop a user-friendly interface (web or desktop) for administrators, donors, recipients, and hospital staff to interact with the system.
  • Blood Request Management: Implement a more detailed system for managing blood requests, including request dates, urgency, and status tracking.
  • Blood Issuance Tracking: Implement a mechanism to track the issuance of blood units to recipients or hospitals, linking BloodSpecimen to the respective entity and recording the date of issuance.
  • Donation Events: Create a specific entity to record donation events, linking donors to the blood specimens they donate and capturing the date of donation.
  • Advanced Search and Filtering: Implement more sophisticated search and filtering options for donors, blood units, and recipients based on various criteria.
  • Reporting and Analytics: Generate reports on blood donation statistics, inventory levels, usage patterns, and other relevant metrics.
  • User Authentication and Authorization: Implement secure user accounts with different roles and permissions for different users of the system.
  • Appointment Scheduling: Allow donors to schedule donation appointments through the system.
  • Integration with External Systems: Potentially integrate with hospital management systems or national blood registries.
  • Mobile Accessibility: Develop a mobile application for donors and recipients.

Contribution

Contributions to the conceptual design, schema improvements, and potential SQL implementations are welcome. If you have suggestions for better data modeling or additional features, please feel free to:

  1. Fork the repository (if you plan to add code/scripts).
  2. Create a new branch for your ideas or changes.
  3. Document your proposed changes or SQL scripts.
  4. Submit a pull request.

About

Blood_Bank_Management_System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published