can someone give me a good definition of what a candidate key is and how differs from a foriegn key? Also what is a superkey?
| SitePoint Sponsor |
can someone give me a good definition of what a candidate key is and how differs from a foriegn key? Also what is a superkey?
Free Science Homework Help
http://www.physicsforums.com





This is a good book which gives you a great founding in data management/DBMS fundamentals:
Practical Issues in Database Management
(that shouldn't have a referer link)
Matt - Sybase DBA / PHP fanatic
Sybase/MySQL/Oracle | I don't like MySQL
Download Sybase | DBForums.com - for all your RDBMS talk


while you are waiting for the book to arrive...
a candidate key is any column or combination of columns that uniquely identifies each row
a candidate key may therefore be the primary key ("candidate" -- get it?)
a foreign key, on the other hand, is a column that refers to the primary key of some (other) table
a superkey is found only in tables declared in the EssCue-Ell database on the planet krypton
all of the above except that last part are true
what about this?
http://databases.about.com/cs/admini...g/superkey.htm
Free Science Homework Help
http://www.physicsforums.com


hmmm, that sort of makes sense
first time i've heard of it, though
okay, well, let's put it a little more accurately -- i might have heard of it, but i don't remember hearing of it
it doesn't come up all that often





Edit:Ooops, I'm mistaken re: superkey. In any rate, SuperKey is probably not good terminology. I wouldn't use it.
Matt - Sybase DBA / PHP fanatic
Sybase/MySQL/Oracle | I don't like MySQL
Download Sybase | DBForums.com - for all your RDBMS talk
Bookmarks