SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what is a candidate key

    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

  2. #2
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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)

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Free Science Homework Help
    http://www.physicsforums.com

  5. #5
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  6. #6
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Edit:Ooops, I'm mistaken re: superkey. In any rate, SuperKey is probably not good terminology. I wouldn't use it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •