Re: Hospital ERD

From: Roy Hann <rhann_at_globalnet.co.uk>
Date: Wed, 4 Feb 2004 11:23:10 +0000 (UTC)
Message-ID: <bvqkmu$saq$1_at_sparta.btinternet.com>


"Portroe" <fb_at_oooi.com> wrote in message news:bvqi77$sea$05$1_at_news.t-online.com...
> Charge Nurse, Medical Director, personnel officer, Doctor etc of course
> all have differing functions, and differing interactions with the other
> attributes
>
> the Charge nurse will have hundreds of connected records over a month,
> ie. medication ordered, The Medical director significantly less etc
>
> is there a source for Sample ERDs where I can see how people typically
> cope with multiple subclasses 'diagramatically' ?

It ain't rocket science.

You just put all the common attributes in one table (the super table), and have 1-to-0-or-1 relationships with one or more subtables that have the distinct attributes. If the subtables in turn can have further subtables, repeat.

Of course the big problem is that none of the graphical conventions were designed by anyone who had much of a clue what they were really doing, so they can't represent the very important restriction that a table can't simultaneously have two (or more) subtables directly referencing it (if that's what is required). i.e. you can't draw a diagram that shows that a staff member cannot simultaneously be a phlebotomist and a neurosurgeon, or salaried and casual.

SQL is similarly botched when it comes to imposing suitable constraints. You end up doing "tricks" with keys, which I dislike intensely.

Roy Hann Received on Wed Feb 04 2004 - 12:23:10 CET

Original text of this message