I need to create an ER diagram using oracle SQL developer, I have created it, but I am struggling to add the constraints, does anyone have any advice on how to do this?
I am developing a hospital data model. Thanks



I need to create an ER diagram using oracle SQL developer, I have created it, but I am struggling to add the constraints, does anyone have any advice on how to do this?
I am developing a hospital data model. Thanks



So reconsider your entities Think of it in terms of What "physical objects do you have and what can those objects do"
Start off by identifying them all and then combining like ones.
For example staff, dr, GP and patient are all "People" and share like information just There are just different "Types" of people so combine them!
Each ward has staff on it so you have People, Ward, and WardStaff Each person could have address information. A Person can be admitted to a ward A persons who has been admitted can be treated by multiple drs and have multiple ailments
Remember if you have to update information in more than one place to keep it accurate it needs to be consolidated.
Consider Cardinality between the entities: Does a ward HAVE to have nurses assigned? is a Nurce always on a ward? Can a ward have zero, one or many nurses? Can a patient have zero one or many ailments? Can a dr have zero one or many patients? Are dr's limited to wards? Do Dr's have specialties too? (can they have more than one?)
And then here's how I see them relate. Re-read the 4 pages and see if this looks right. ask what's wrong and ask what's missing. and is there too much?