Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Counterquestion - is Oracle a He or a She - or an It or a hermaphrodite
-----Original Message-----
From: Leandro Guimaraes Faria C. Dutra [mailto:ldutra_at_toyota.com.br]
Sent: Monday, August 08, 2005 7:00 AM
To: Kennedy, Jim
Cc: Niall Litchfield; oracle-l_at_freelists.org; oracle-l-bounce_at_freelists.org; psinger1_at_chartermi.net
Subject: RE: Counterquestion - is Oracle a He or a She - or an It or a hermaphrodite
oracle-l-bounce_at_freelists.org gravou em 2005-08-08 10:53:09:
> 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.)
So that's a boolean: has the question been asked? Or a field
stating where the information comes from with such a special value. No
need for a generic, context-dependent NULL, nor for a special value in the
allergy table -- perhaps I should clarify that, contrary to NULLs, special
values are no crime; it is just that this specific one is not necessary in
this case.
It is OK for natural languages to be context dependent. Not so
for a DB.
-- Leandro Guimarães Faria Corcete DUTRA Administrador de Bases de Dados +55 (11) 4390 5383 Toyota do Brasil Ltda ldutra_at_toyota.com.br São Bernardo do Campo, SP BRASIL This message (including any attachments) is confidential and may be privileged and intended solely for the use of the person/entity to whom it is addressed. If you have received it by mistake please notify the sender by returning via e-mail as well as delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is prohibited. Please note that e-mails are susceptible to change. TOYOTA DO BRASIL LTDA (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication, neither for personal, nonbusiness related information nor opinion sent through this email or even for any delay in its receipt or damage to your system. TOYOTA DO BRASIL LTDA (or its group companies) does not guarantee that the integrity of this communication has been kept nor that this communication is free of viruses, interceptions or interference. It isn't a boolean because the situation is: A. We don't know if they have any allergies or not because we didn't ask them. NULL (unknown value) B. We asked the question and the answer is NKA (No known allegies, the patient doesn't know of anything theyare allergic to.) We have a FK to NKA. C. We have a FK to one or more allergies.(sulfa drugs, ragweed, penecillian, peanuts, shellfish, etc.) One could impliment it as a boolean (did we ask or not) and then have a separate field with the fk to the allergies. But we didn't iimpliment it that way. (NKA, was a common TLA for Dr.s. CTD (circling the drain, you don't want that on your medical chart) and WNL (within normal limits) were other TLAs.) Jim -- http://www.freelists.org/webpage/oracle-lReceived on Mon Aug 08 2005 - 10:17:01 CDT