SQL Database Concepts Question:
Download Questions PDF

Explain candidate key, alternate key, and composite key?

Answer:

- Candidate Key is a key which provides the uniqueness of the column(s). It identifies each row of a table as unique. It can become the primary key of the table as well. Every tabular relationship will have atleast one candidate key.
- Alternate Key is a type of candidate key which is formed when there are more than one candidate key and one of them is a primary key then other keys will act as an alternate keys. Unique keys also termed as alternate keys which prevent incorrect data from entering the table.
- Composite Key is a special type of candidate key as it is formed by combining two or more columns. This gives assurance of uniqueness of data when the columns are joined together.

Download Basic SQL Server Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know what is bit data type and whats the information that can be stored inside a bit column?Do you know what are ACID properties?