Construct an E-R diagram for a hospital with a set of patients and a set of medical doctors. Associate with each patient a log of the various tests and examinations conducted.
Question
Construct an E-R diagram for a hospital with a set of patients and a set of medical doctors. Associate with each patient a log of the various tests and examinations conducted.
Solution
Creating an E-R (Entity-Relationship) diagram for a hospital involves the following steps:
-
Identify Entities: In this case, the entities would be "Patients", "Medical Doctors", "Tests", and "Examinations".
-
Identify Relationships: The relationships could be "Patients are examined by Medical Doctors", "Medical Doctors conduct Tests on Patients", and "Medical Doctors conduct Examinations on Patients".
-
Identify Attributes: For "Patients", attributes could be "Patient ID", "Name", "Age", "Gender", "Address", etc. For "Medical Doctors", attributes could be "Doctor ID", "Name", "Specialization", etc. For "Tests" and "Examinations", attributes could be "Test/Examination ID", "Name", "Result", "Date", etc.
-
Draw the E-R Diagram: Start by drawing rectangles for each entity and write down their attributes. Then, draw lines to connect the entities that have relationships. Label each line with the relationship.
-
Create a Log: To associate each patient with a log of the various tests and examinations conducted, create a separate entity named "Log". This entity could have attributes like "Log ID", "Patient ID", "Test ID", "Examination ID", "Date", etc. Connect this entity with "Patients", "Tests", and "Examinations" entities.
Remember, the E-R diagram is a conceptual and visual tool, so it's best to use a software tool or even pen and paper to draw it out.
Similar Questions
This question contains a brief UoD that provides contextual information regarding a system or organisation. You will need to create an Entity Relational (ER) diagram, or Extended Entity Relational (EER) diagram based on the UoD. If the UoD is unclear regarding specific aspects of the brief you may note assumptions on your ER diagram. However, please beware that your assumptions must not conflict with or violate any aspects of the UoD. In a busy medical facility, individuals are treated and identified by a unique code, and their names and home addresses are kept on record. There are two types of individuals, one who stays in the facility and is assigned a room number (Inpatient), and the other who visits the facility and is given a date for their next appointment (Outpatient). Additionally, the medical facility keeps medical records for all patients. Each record is associated with a unique number, the date it was created, and a diagnosis. The medical facility also maintains a detailed catalog of health professionals, each with their unique identifiers and specialty fields. These professionals are involved in the administration of various treatments, each of which is given a unique code, a name, and a detailed description. A treatment can be administered by a health professional to an individual at a given date and time.
Assuming Mr. Moi only wants a database system that would keep records of medicine{names ofmedicine, amount in grams in stock}, purchase{medicine bought, amount in grams bought, whoattended to customer, when it was sold, contact and name of customer that bought the medicine}a. Draw a normalized ER diagram with only the most important data from question 1 bearing in _mind the information that Mr. Moi wants.
Considering the tables of the Hospital database given below, identify candidate keys, primarykeys, and foreign keys. Also, give an example of derived attributes for patient and doctor.patients (patient-id, name, Date of Birth, insurance, date-admitted, date-checked-out)doctors (doctor-id, NIC, name, date of birth, specialization)test (testid, test_name, date, time, result)doctor-patient (patient-id, doctor-id)test-log (testid, patient-id)performed-by (testid, doctor-id)
) Construct an E-R diagram for a car-insurance company whose customers ownone or more cars each. Each car has associated with it zero to any number of recorded accidents.
In an E-R diagram, attributes are represented by
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.