Re: Identifying candidate keys and primary keys




<noagbodjivictor@xxxxxxxxx> wrote in message
news:fc37fe0e-476b-4a0b-8396-ab81c9a5f4a1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello guys, this one is for one of my assignments. I want explanations
and hints only.

I'm still confused with the concepts of candidate keys and primary
key. We have a patient medication form from an hospital with these:

Heading: Patient number, Full name, Bed number, Ward number, Ward
name.
Then a table with this columns: drug number, name, description,
dosage, method of admin, units per day, start date, finish date.

I have to find all the candidate keys and primary keys. I think
candidate keys are the minimal superkeys.

I have found {Patient number, Ward number, Ward name}. I have excluded
{Patient number, Ward number, Ward name, Full name} and {Patient
number, Ward number, Ward name, Full name, Bed number} which are also
superkeys but contain more attributes.


Can a patient be in more than one ward (at the same time)?

This means that I have found only one candidate key, and this is also
the primary key I have found (a composite).

Since the question was "identify all the candidate keys" I thought
maybe I dont really understand the concepts...


http://en.wikipedia.org/wiki/Candidate_key

thanks for any help.




.



Relevant Pages

  • Re: Identifying candidate keys and primary keys
    ... Patient number, Full name, Bed number, Ward number, Ward ... I have to find all the candidate keys and primary keys. ... two facts in the table could share the same Ward number and bed number ...
    (comp.databases.theory)
  • Identifying candidate keys and primary keys
    ... Patient number, Full name, Bed number, Ward number, Ward ... I have to find all the candidate keys and primary keys. ... candidate keys are the minimal superkeys. ...
    (comp.databases.theory)
  • Re: working for fun
    ...  She wanders into a ward where there are a few patients laying ... she proceeds to the next patient. ... A bit shook up now, Lizzie approaches a doctor in the ward and asks, ... The doctor replies, "No, Your Majesty, this is the Burns unit." ...
    (rec.motorcycles)
  • Re: Identifying candidate keys and primary keys
    ... We have a patient medication form from an hospital with these: ... {Patient number, Ward number, Ward name, Full name} ... I have been looking at how hospitals work here in US. ... sufficient detail for you to be able to determine the candidate keys. ...
    (comp.databases.theory)
  • Re: working for fun
    ... She wanders into a ward where there are a few patients laying ... she proceeds to the next patient. ... A bit shook up now, Lizzie approaches a doctor in the ward and asks, ... The doctor replies, "No, Your Majesty, this is the Burns unit." ...
    (rec.motorcycles)