RE: Counterquestion - is Oracle a He or a She - or an It or a hermaphrodite

  • From: "Kennedy, Jim" <jim_kennedy@xxxxxxxxxx>
  • To: "Niall Litchfield" <niall.litchfield@xxxxxxxxx>
  • Date: Mon, 8 Aug 2005 06:53:09 -0700



-----Original Message-----
From: Niall Litchfield [mailto:niall.litchfield@xxxxxxxxx]
Sent: Mon 8/8/2005 5:27 AM
To: Kennedy, Jim
Cc: psinger1@xxxxxxxxxxxxx; oracle-l@xxxxxxxxxxxxx
Subject: Re: Counterquestion - is Oracle a He or a She - or an It or a 
hermaphrodite
 
Comments below
On 8/6/05, Kennedy, Jim <jim_kennedy@xxxxxxxxxx> wrote: 
> 
> 
> 
> I explain NULLS in the following manner.
> 
> Imagine a medical application where your medical data is stored in a
> database. Imagine that your Dr. has never asked you if you have
> allergies or not. Further imagine that you become unconcouse and go to
> the emergency room. The Dr. in the emergency room looks at your
> electronic medical data. Given the information in your electronic chart
> what should the Dr. assume about your allergic reactions?:
> A. You are Alergic to something.
> B. You are not allergic to anything.
> C. It is unknown if you are or are not allergic to anything.
> 
> The Dr. should assume C. You have not been asked the question so the
> data in that column is NULL and the Dr. should make NO assumptions about
> your medical condition visa vis allergys. In medicine even if they
> asked you the question "Are you allergic to anything?" and you answered
> "No" the correct value to store is NKA - No Known Allergies. After
> this explanation most people understand what a NULL is.
> Jim

 Isn't this a great example of how a better design is a better solution? 
Wouldn't 
 PATIENT
=======
PATIENT_PK
....................
 ALLERGEN
=========
ALLERGEN_PK
........................
 KNOWN_ALLERGIES
================
PATIENT_PK -- foreign key
ALLERGEN_PK -- foreign key
IDENTIFIED_DATE
.....

Be a better design? Then the doctor would just pull up a list of known 
allergies (which might of course be empty). This is a lot different, and I'd 
argue better, than pulling up a NKA or NULL value. 

-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com


Sorry if I wasn't clear enough.  NULL!=NKA.  They are very different.  NKA 
means the Dr. asked the question and the patient said I don't have any 
allergies. (So they don't have any known allergies.  They still might be 
allergic to something, but there aren't any known allergies.)

So yes, if the person has one or more allergies there was an allergy table.  If 
they didn't have any known allergies NKA was one of the entries on the allergy 
table.  But if they hadn't been asked then the key was NULL.(we don't know if 
they are or are not allergic to anything and we have not asked them the 
question.)


Jim

Other related posts: