Define candidate key, alternate key, composite key.

Answer Posted / shruti singh

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.
As for Example:In a class we have to select Class Monitor.
So A, B,C and D stand for that post. So A,B,C and D are
candidate for monitor so these are candidate key. We select
B as monitor so B is primary key and A,C and D can be
monitor but not selected as a monitor so they are
alternative choise. So A,C and D are alternate key.
When two students of class work together in a project than
they are composite key for the class.

I TRIED TO EXPLAIN THESE KEY, IF YOU LIKE PLEASE DO
RESPONSE. iF YOU LIKE TO ASK ANY OTHRE QUE RELATED TO SQL
SERVER YOU CAN..

Is This Answer Correct ?    541 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between TRUNCATE and DROP?

633


Difference between report and query parameter. Why do we need different type of parameter?

579


What is ms sql server reporting services?

520


Explain external key management in sql server 2008

510


Do you know what are the properties of the relational tables?

579






Write a program using SQL queries to find a unique entry in a table.

552


What is the purpose of sql profiler in sql server? : sql server database administration

632


How do you rename a table in sql server?

498


Which command is used for user defined error messages?

569


When a primary key constraint is included in a table, what other constraints does this imply?

607


Is mysql better than sql server?

545


How do I determine how many instances of sql server are installed on a computer?

539


What is optimization and its types?

543


Which are the new data types introduced in sql server 2008?

518


What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?

3769