This project implements a simple Healthcare Management System where an administrator can:
- Manage doctor and appointment records.
- Search for appointments of a specific doctor.
- Perform CRUD operations (Create, Read, Update, Delete).
- Execute structured queries on the data files.
The system leverages primary and secondary indexing to optimize data retrieval and organization.
- Add New Doctor
- Add New Appointment
- Update Doctor Name (Doctor ID)
- Update Appointment Date (Appointment ID)
- Delete Appointment (Appointment ID)
- Delete Doctor (Doctor ID)
- Print Doctor Info (Doctor ID)
- Print Appointment Info (Appointment ID)
- Write Query
- Exit
- Doctor ID:
Char[15](Primary Key) - Doctor Name:
Char[30] - Address:
Char[30]
- Appointment ID:
Char[15](Primary Key) - Appointment Date:
Char[30] - Doctor ID:
Char[15](Secondary Key)
-
Primary Index
- Based on
Doctor IDfor doctors. - Based on
Appointment IDfor appointments.
- Based on
-
Secondary Index
- Based on
Doctor ID(for appointments). - Based on
Doctor Name(for doctors).
- Based on
-
Linked List for secondary indexes.
-
Add Records
- Check the availability list before writing.
- If the record already exists, it won't be added.
-
Delete Records
- Records are marked with a
*instead of being physically deleted. - Updates the availability list accordingly.
- Records are marked with a
-
Update Records
- Non-key fields can be updated, ensuring they do not exceed allocated sizes.
SELECT ALL FROM Doctors WHERE Doctor ID='xxx';- Uses the primary index.
SELECT ALL FROM Appointments WHERE Doctor ID='xxx';- Uses the secondary index.
SELECT Doctor Name FROM Doctors WHERE Doctor ID='xxx';- Uses the secondary index.
- Binary Search for efficient index lookup.
- Bind secondary indexes to the primary index (not directly to file addresses).