ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
Define candidate key, alternate key, composite key.
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 1
A candidate key is one that can identify each row of a 
table uniquely. 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. 

A key formed by combining at least two or more columns is 
called composite key. 
 
Is This Answer Correct ?    85 Yes 12 No
Swapna
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 2
candidate key is a single key of each tuple.
alternative key is secondary key . for example(A entity 
STUDENT an attribute of NAME,CLASS,ROLL.ID)the roll no is 
primary key but id is alternate key.

A key formed combined of to or more columns called comosite 
key.
 
Is This Answer Correct ?    19 Yes 9 No
Sunil Choudhary "hanumangarh"(
 
 
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 3
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 ?    98 Yes 4 No
Shruti Singh
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 4
Candidate Key is a Key which identifies each row of a table 
uniquely. Generally a Candidate Key becomes a Primary Key 
of the table. If table has more than one Candidate Keys  
then one is called Primary key and rest are called 
Alternative Keys. 
A key is formed by two or more columns is called Composite 
Keys.
 
Is This Answer Correct ?    24 Yes 4 No
Raghuram
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 5
Candidate key: If any unique data column(s)in table is 
called candidate key. may be one or more unique data column
(s).We can select any one unique (candidate key column) as 
a primary key.

Alternate key: If one table contains more then one 
candidate keys, remining candidate keys column(s) which is 
not selected as a primary key is called Alternate Key.

Composite key: One primary key Contains more then one   
columns is called Composite key.
 
Is This Answer Correct ?    17 Yes 1 No
Anvar Shadath.a
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 6
A CANDIDATE KEY ISA PRIMERY KEY. OTHER ARE ALTERNATE KEY
 
Is This Answer Correct ?    5 Yes 19 No
Jheelum
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 7
A candidate key is one that can identify each row of a 
table uniquely. 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. A key formed by 
combining at least two or more columns is called composite 
key.
 
Is This Answer Correct ?    6 Yes 0 No
Amar
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 8
How do we specify an ALTERNATE KEY while creating a table?
 
Is This Answer Correct ?    0 Yes 2 No
Mustafa
 
  Re: Define candidate key, alternate key, composite key.
Answer
# 9
A candidate key is a combination of attributes that can be uniquely used to identify a database record without any extraneous data. Each table may have one or more candidate keys. One of these candidate keys is selected as the table primary key.
 
Is This Answer Correct ?    1 Yes 0 No
Tanaji
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What is excution Plan in sql server TCS1
How do you simulate a deadlock for testing purposes  1
What is the difference between HAVING clause and the WHERE clause?  4
What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they. IBM5
What is WITH CHECK OPTION Karur-Vysya-Bank-KVB2
What are the advantages of using views. Why do we need views when we have SPs? 247Customer3
What is the difference between windows authentication and sql server authentication HCL4
when inserting to a table how many rows will be effected using triggers  1
Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table? eFunds5
What's the difference between a primary key and a unique key?  4
What is Deadlock? Satyam3
Write an SQL query if u want to select the data from one block which intern reflects in another block ? thanx,do reply Covansys1
What are the new features in SQL Server 2005? Emphasis2
can any one please send sql quries most used in applications.  1
How to link up the text file to a Database table? Allianz1
How to delete an attribute from the emp table  3
What is the role that is required for killing a process What is the role that is required for creating a linked server IBM1
Can Having clause be used without Group by clause? CTS4
can you any body tell me the how to decrease the logfile  4
As a part of your job, what are the DBCC commands that you commonly use for database maintenance? HCL1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com