What are super, primary, candidate and foreign keys in SQL?

335 viewsSQLSQL
0

A super key is a set of attributes of a relation schema upon which all attributes of the
schema are functionally dependent. No two rows can have the same value of super key
attributes.
A Candidate key is minimal super key, i.e., no proper subset of Candidate key attributes
can be a super key.
A Primary Key is one of the candidate keys. One of the candidate keys is selected as most
important and becomes the primary key. There cannot be more that one primary keys in a
table.
Foreign key is a field (or collection of fields) in one table that uniquely identifies a row of
another table

Gautam Sarswat Changed status to publish January 11, 2023
Write your answer.

Posted

in

Tags:

Comments

Leave a Reply

A Tribute to Dilip Kumar