|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello everyone,
I have modelled Entity relationship diagram (logical design) for a database that works with hospital environment. I wonder weather I have normalised data or not. The Design can be viewed or downloaded from: URL Regards, Tony Radoni Last edited by tonyradoni : December 28th, 2003 at 06:17 PM. |
|
#2
|
|||
|
|||
|
It is normalized. However for any given event_id, you'll need to visit up to 6 tables to find who was involved with the event.
Personally, I would replace tables Nurse, Anaesthetist, Consultant, Doctor and Surgeon with just one table: Personnel ------------ Personnel_id primary key Personnel_type tinyint (1 = Nurse, 2 = Anaest., 3= consultant, 4 = doctor, 5 = surgeon) Last Name First Name On_Call_Tel etc. Then you can replace tables Nurse_event, Anaesthetist_event and Surgeon_Event with one table: Personnel_Event ------------------- ID primary key Personnel_id Event_id -Matt. |
|
#3
|
|||
|
|||
|
I generally agree with madmatt75, although there is really no need to force an attribute like Personnel_type into an INT or TINYINT. (Yes, there is a slight performance gain on very large databases, but there is a corresponding loss of data readability--let the data speak for itself as much as possible). Also, you might want an external "validation table", detailing the available Personnel types, in which case the Personnel_type column has a foreign key lookup to the validation table. (This foreign key can be INT or it can be a VARCHAR, as I mentioned for readability).
__________________
The real n-tier system: FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL Amazon wishlist -- rycamor (at) gmail.com |
|
#4
|
|||
|
|||
|
lOOKS PRETTY GOOD TO ME.
PS WHAT DID YOU USE TO CTEATE YOUR ERD |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Erd |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|