Skip to content

A simple yet functional hospital management system built in Java, designed to demonstrate core concepts like JDBC connectivity, database schema design, and real-world CRUD operations.

Notifications You must be signed in to change notification settings

blaQPablo88/Java-Hospital-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฅ Hospital Management System

A simple Java console application to manage hospital patients, doctors, and appointments using MySQL as the database.


๐Ÿ’ก Features

  • โž• Add new patients
  • ๐Ÿ“‹ View all patients
  • ๐Ÿง‘โ€โš•๏ธ View all doctors
  • ๐Ÿ“… Book appointments (one per doctor per day)
  • โŒ Prevent double-booking of doctors

๐Ÿ› ๏ธ Technologies Used

  • Java (JDK 17+ recommended)
  • MySQL (8.0+)
  • JDBC (Java Database Connectivity)
  • IntelliJ IDEA / VS Code (or any Java IDE)

๐Ÿ—ƒ๏ธ Database Setup

Run the following SQL commands to set up your database:

CREATE DATABASE hospital_manager;

USE hospital_manager;

CREATE TABLE patients(
    -> id INT AUTO_INCREMENT PRIMARY KEY,
    -> patient_name VARCHAR(255) nOT NULL,
    -> patient_age INT NOT NULL,
    -> patient_gender VARCHAR(10) NOT NULL
    -> );

CREATE TABLE doctors(
    -> id INT AUTO_INCREMENT PRIMARY KEY,
    -> doctor_name VARCHAR(255) NOT NULL,
    -> doctor_specialization VARCHAR(255) NOT NULL,
    -> );

CREATE TABLE appointments(
    -> id INT AUTO_INCREMENT PRIMARY KEY,
    -> patient_id INT NOT NULL,
    -> doctor_id INT NOT NULL,
    -> appointment_date DATE NOT NULL,
    -> FOREIGN KEY (patient_id) REFERENCES patients(id),
    -> FOREIGN KEY (doctor_id) REFERENCES doctors(id)
    -> );

About

A simple yet functional hospital management system built in Java, designed to demonstrate core concepts like JDBC connectivity, database schema design, and real-world CRUD operations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages