Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏥 Hospital Patient Management System

SQL Database MySQL DBMS


Overview

This project is a SQL-based database system designed to manage hospital patient records efficiently.
It includes tables for patients, doctors, appointments, and treatments, allowing users to easily retrieve and analyze hospital data.


Features

  • Store and manage patient information
  • Track doctor schedules and appointments
  • Manage treatment details and billing
  • Generate reports and query patient history

Tools & Technologies

  • SQL (MySQL)

Prerequisites

  • MySQL 8.0 or higher
  • MySQL Workbench or any SQL client

Project Structure

Hospital-Patient-Management-System/

  • schema.sql - Contains SQL statements for creating database tables
  • insert.sql - Contains SQL statements for inserting sample data
  • queries.sql - Contains SQL queries for retrieving and analyzing data
  • README.md - Project documentation

How to Run

  1. Clone this repository or download the files
  2. Open MySQL Workbench and connect to your local server
  3. Create a new database:
   CREATE DATABASE hospital_db;
   USE hospital_db;
  1. Run the SQL scripts in this order:
    • First: schema.sql (creates the database tables)
    • Second: insert.sql (inserts sample data)
    • Third: queries.sql (run sample queries to test)

Sample Queries

View all patients:

SELECT * FROM patients;

Get appointment details with patient and doctor names:

SELECT p.name AS patient_name, d.name AS doctor_name, a.appointment_date
FROM appointments a
JOIN patients p ON a.patient_id = p.patient_id
JOIN doctors d ON a.doctor_id = d.doctor_id;

Learning Outcomes

  • Understanding of relational database design
  • SQL joins, aggregations, and relationships
  • Organizing a database project professionally

About

SQL-based Hospital Patient Management System with complete database design, ER diagrams, and queries for managing patients, doctors, appointments, medical records, and billing operations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors