If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Functional dependencies and Primary Key

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-08, 12:28
Ace1111111 Ace1111111 is offline
Registered User
 
Join Date: Mar 2008
Posts: 5
Functional dependencies and Primary Key

Hello everyone,
I have a problem regarding functional dependencies and selecting a primary key. Any help would be greatly appreciated. My question is:

1. If we have a table in unnormalized form, what sequence of steps should we follow to determine the functional dependencies and primary key.

a. Should we first determine the primary key and after that, determine the functional dependencies? OR

b. Should we first determine the functional dependencies in the table and after that, select the primary key?

Regards
Reply With Quote
  #2 (permalink)  
Old 03-22-08, 15:04
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
i would start with b.

but it's pretty hard to say that definitively

after all, i can't see your table
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-29-08, 12:15
Ace1111111 Ace1111111 is offline
Registered User
 
Join Date: Mar 2008
Posts: 5
Thanks for the reply. I tried and strangely enough found it easier to select the primary key first and then find out the functional dependencies. But I think selecting the functional dependencies first may also be correct.
Reply With Quote
  #4 (permalink)  
Old 03-31-08, 07:49
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Why should one of those methods be correct and the other not? Either way you can achieve the same, correct result, so it is just a matter of which one works best for you isn't it?

OTOH, if this is an exam question, then the correct answer must be (b) I guess, since to select a valid primary key requires that you know something is functionally dependent on it. When you start by selecting the primary key you are really doing so based on an intuitive knowledge of functional dependencies - so in fact you did start with the FDs.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On