Answers

Question and Answer:

  Home  Basic SQL Server

⟩ Explain candidate key, alternate key, and composite key?

- 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.

 165 views

More Questions for you: