Experiment-11-Hospital_Management_System
Experiment-11-Hospital_Management_System
Patients Table
Doctors Table
Appointments Table
Medications Table
-- Insert Departments
INSERT INTO departments (department_name) VALUES ('Cardiology');
INSERT INTO departments (department_name) VALUES ('Neurology');
INSERT INTO departments (department_name) VALUES ('Orthopedics');
-- Insert Doctors
INSERT INTO doctors (first_name, last_name, specialization, phone,
department_id)
VALUES ('John', 'Doe', 'Cardiologist', '1234567890', 1);
INSERT INTO doctors (first_name, last_name, specialization, phone,
department_id)
VALUES ('Jane', 'Smith', 'Neurologist', '0987654321', 2);
-- Insert Patients
INSERT INTO patients (first_name, last_name, dob, gender, phone, address)
VALUES ('Alice', 'Brown', DATE '1985-06-25', 'Female', '5551234567', '123
Elm St');
INSERT INTO patients (first_name, last_name, dob, gender, phone, address)
VALUES ('Bob', 'Davis', DATE '1990-11-13', 'Male', '5557654321', '456 Oak
St');
-- Insert Appointments
INSERT INTO appointments (patient_id, doctor_id, appointment_date,
diagnosis)
VALUES (1, 1, SYSDATE, 'Heart Checkup');
INSERT INTO appointments (patient_id, doctor_id, appointment_date,
diagnosis)
VALUES (2, 2, SYSDATE, 'Neurological Consultation');
-- Insert Medications
INSERT INTO medications (patient_id, medication_details)
VALUES (1, 'Aspirin 100mg daily');
INSERT INTO medications (patient_id, medication_details)
VALUES (2, 'Neurobion 500mg daily');
Step 3: Queries
Retrieve Patient Details