dbTalk Databases Forums  

Identifying candidate keys and primary keys

comp.databases.theory comp.databases.theory


Discuss Identifying candidate keys and primary keys in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
noagbodjivictor@gmail.com
 
Posts: n/a

Default Identifying candidate keys and primary keys - 04-13-2008 , 04:29 AM






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.

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...

thanks for any help.

Reply With Quote
  #2  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM







<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #3  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #4  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #5  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #6  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #7  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #8  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #9  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
  #10  
Old   
Brian Selzer
 
Posts: n/a

Default Re: Identifying candidate keys and primary keys - 04-13-2008 , 06:05 AM




<noagbodjivictor (AT) gmail (DOT) com> wrote

Quote:
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)?

Quote:
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

Quote:
thanks for any help.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.