dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersRaj.Trivedi
Minu
Nwe Nwe
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » General »

Candidate key vs composite primary key


Posted Date: 28 Sep 2009      Posted By:: Ameer     Member Level: Silver    Member Rank: 1204     Points: 1   Responses: 6



Can any one tell the exact difference between Candidate key vs Composite primary key.

for me it resembles the same.




Responses

#427657    Author: Kritika Yadav      Member Level: Gold      Member Rank: 0     Date: 28/Sep/2009   Rating: 2 out of 52 out of 5     Points: 2

Any attribute that is uniquely identify a row in a table is candidate key for the table. We select one of the candidate key as Primary key. All candidate keys which are not chosen as primary key are Alternate keys. The key which uniquely identify the rows of the table and which is made up of more than one attribute is called Composite key. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key one of them will become the primary key and the rest are called alternate keys.

Happy Programming
Kritika Yadav



 
#427677    Author: ABitSmart      Member Level: Gold      Member Rank: 21     Date: 28/Sep/2009   Rating: 2 out of 52 out of 5     Points: 2

Candidate key is not a primary key.
Primary key is a candidate key. (Composite primary key is just a primary key with multiple columns. It is no different from a primary key. The name is just to signify multiple columns)

Kind regards,
ABitSmart
DNS Web-master, DNS MVM
My blog
Thoughts.exe



 
#427680    Author: Ameer      Member Level: Silver      Member Rank: 1204     Date: 28/Sep/2009   Rating: 2 out of 52 out of 5     Points: 2

it means that composite primary key will have only two columns or more than two columns.





 
#428569    Author: David Portas      Member Level: Bronze      Member Rank: 0     Date: 30/Sep/2009   Rating: 2 out of 52 out of 5     Points: 2

There is no difference. A primary key is any candidate key.

The term "primary key" is in fact superfluous and could easily be dispensed with.



 
#428596    Author: Abhisek Panda      Member Level: Gold      Member Rank: 214     Date: 30/Sep/2009   Rating: 2 out of 52 out of 5     Points: 2

Attribute that uniquely identifies a row in a table is called candidate key for that table. We have to select one of the candidate key as Primary key which has a most unique value than other candidate keys. Rest of all candidate keys which are not chosen as primary key are called Alternate keys. Composite key have more than one attribute. When a composite key becomes primary key it is called as composite primary key.

---------------
Regards,
Abhisek Panda
DNS EDITOR
Be Happy And Make Others Happy.
Go Green and Save Your Future.
Get websites at only Rs.2000!



 
#431557    Author: kaleeswaran      Member Level: Gold      Member Rank: 0     Date: 09/Oct/2009   Rating: 2 out of 52 out of 5     Points: 2

candidate key is not a primary key...


Regards,
Kaleeswaran,
http://4xchange.blogspot.com

Regards,
Kaleeswaran
Vist this site fisrt If u go for investment...



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : How to open dot net 2005 project in dot net 2008
Previous : Will mssql server will run on linux platform?
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.