Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!news-FFM2.ecrc.net!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
From: "Roy Hann" <rhann@globalnet.co.uk>
Newsgroups: comp.databases.theory
Subject: Re: Hospital ERD
Date: Wed, 4 Feb 2004 11:23:10 +0000 (UTC)
Organization: BT Openworld
Lines: 33
Message-ID: <bvqkmu$saq$1@sparta.btinternet.com>
References: <bvp8e4$nf$06$1@news.t-online.com> <WbGdne8h9uSDHb3dRVn-jA@comcast.com> <bvqi77$sea$05$1@news.t-online.com>
NNTP-Posting-Host: host213-122-193-169.in-addr.btopenworld.com
X-Trace: sparta.btinternet.com 1075893790 29018 213.122.193.169 (4 Feb 2004 11:23:10 GMT)
X-Complaints-To: news-complaints@lists.btinternet.com
NNTP-Posting-Date: Wed, 4 Feb 2004 11:23:10 +0000 (UTC)
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Xref: newssvr20.news.prodigy.com comp.databases.theory:23733

"Portroe" <fb@oooi.com> wrote in message
news:bvqi77$sea$05$1@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


