I have newly learned about ER diagrams and how powerful they are.
I am trying to make a very basic ER diagram for hospital and there are few questions and doubts in my mind.
This is the ER diagram that I've made:
I want tests to be stored in hospital database as well as in the patient's report file(all the tests of a specific patient should be stored in his/her report file).
The ternary relationship test should signify that:
- A patient and a doctor maintains only one report
- A doctor makes a report for specific patient
- A patient and his report can have tests from N no of doctors.
Q1- But I am confused how to achive this using ternary relation?
Q2- What is the difference between 3 binary relationship and 1 ternary relationship(and also which of them carrys more information)?
Q3- Can a relationship can have it's own prime(key) attribute?
Q4- If we have concept of surrogate key then why does weak entity exists in first place?
Q5- How to conclude which entity should be made weak and whichshould be not?
Q6- Any good source to learn EER ,advanced topics of database designing(relational algebra,etc..) and about ternary relationships(I have searched youtube and google but none of them was satisfactory)?