Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General DB Topics / DB Theory / February 2004

Tip: Looking for answers? Try searching our database.

Functional dependencies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Papastefanos Serafeim - 11 Feb 2004 20:40 GMT
Let's say that I have a relation with
the attributes A,B,C,D,E.
Is there a standard way to find the
candidate keys of that relation if I
am given a set of functional
dependencies for those attributes,
like A->B, BC->E, ED->A ?
I don't want the answer, I want to
know if there is a standard way to
find it.

Thanks for any help
Signature

Papastefanos Serafeim
serafeim at otenet dot gr

Jan Hidders - 12 Feb 2004 19:46 GMT
> Let's say that I have a relation with
> the attributes A,B,C,D,E.
[quoted text clipped - 6 lines]
> know if there is a standard way to
> find it.

Yes, there is. The algorithm is described on

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

The page is a mess but you can find it under the header "Algorithm
(deriving candidate keys from FDs)". Basically it amounts to using the
following rule to derive smaller superkeys:

   if    C is a superkey and the FD X->Y holds
   then  (C - Y) + X is also a superkey

The algorithm starts with a set singleton set that contains the superkey
that contains all columns, and then applies this rule to derive smaller
superkeys. If it finds a smaller superkey that is a strict subset then
the original superkey is removed from the set. Once you obtain a
superkey for which you cannot derive a superkey that is a strict subset,
you have found a candidate key.

Good luck,

-- Jan Hidders
Papastefanos Serafeim - 12 Feb 2004 23:39 GMT
Thanks !

Signature

Papastefanos Serafeim
serafeim at otenet dot gr

> > Let's say that I have a relation with
> > the attributes A,B,C,D,E.
[quoted text clipped - 28 lines]
>
> -- Jan Hidders
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.