• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 390
  • Last Modified:

relational database and functional dependencies

Can one infer the primary key from a group of functional dependencies?

Consider the relation R(A, B, C, D, E, G, H) and the FD set F={AB¿C, AC¿B, AD¿E,
B¿D, BC¿A, E¿G}

the question then asks if R is in 3NF and BCNF.  I can answer the question in regards to a primary key, but one is not given.  so this begs the question, can a primary key be derived from FDs?

0
jjackson2004
Asked:
jjackson2004
  • 6
  • 4
1 Solution
 
jjackson2004Author Commented:
Those question marks should be ->  or right arrows.
0
 
ste5anSenior DeveloperCommented:
hi,

when I understand you and you're problem description is correct, then the answer is simple: the PK contains only the attributes without dependency - which is obviously and easy to spot.

mfG
--> stefan <--

p.s.: I hope it's not a kind of homework question...
0
 
jjackson2004Author Commented:
I suppose if it was obvious I would not be asking.  They all have dependencies except for H and it would seem hard to accept it is the primary key.
0
Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial Now!

 
ste5anSenior DeveloperCommented:
So what about G? E depends on G, but G has no dependency. So, (G, H) should be a candidate key.
0
 
jjackson2004Author Commented:
ok, I see that.   is that the only candidate key?
0
 
jjackson2004Author Commented:
but I thought e->g meant that g is dependent on e, not e is dependent on g
0
 
ste5anSenior DeveloperCommented:
btw, not that I read it wrong, does AB->C means C depends on AB or AB depends on C?
0
 
jjackson2004Author Commented:
AB defines or implies C
0
 
ste5anSenior DeveloperCommented:
Ah, sorry, I'm completely wrong: You have to evaluate the FD to find all super keys:

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

And then the minimal of it.
0
 
jjackson2004Author Commented:
He deserves points for being only person whom took the time to assist me.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now