I need to design an ER diagram for a centralized healthcare management system for my college mini-project.

Firstly, I came up with the following ER diagram.


While designing the tables in the database, I found the patient table to be redundant as every person is a patient in our case so, I came up with the following ER-diagram.


Now, I am confused about which ER diagram shall I use for the project. Can you please me with the ER diagram? Thanks in advance.


I would take the approach for diagram 1. When approaching people in a database, the patients are essentially objects. They don't log in, they only have data. A doctor (or any employee) would be able to log in as users, so would have fields in their table like a login_id, password, and such. A point of confusion may come up when you have a doctor that is also a patient, but then they would have an employee_id\user_id AND a separate patient_id.

As a side note, I would move the connection for medications to be attached to the treatment actions. That would associate a drug with a prescription event, which would be connected to a patient and doctor. Drug prescriptions are events in and of themselves, not necessarily a long-term association to just a patient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.