Types of Keys:

PHOTO EMBED

Tue Nov 28 2023 17:11:35 GMT+0000 (Coordinated Universal Time)

Saved by @nistha_jnn

Super Key – A superkey is a set of attributes that can identify each tuple uniquely in the given relation. A super key may consist of any number of attributes.
Candidate Key – A set of minimal attribute(s) that can identify each tuple uniquely in the given relation is called a candidate key.
Primary Key – A primary key is a candidate key that the database designer selects while designing the database. Primary Keys are unique and NOT NULL.
Alternate Key – Candidate keys that are left unimplemented or unused after implementing the primary key are called alternate keys.
Foreign Key – A FOREIGN KEY is a field (or collection of fields) in one table, that refers to the PRIMARY KEY in another table.The table with the foreign key is called the child table, and the table with the primary key is called the referenced or parent table.it is used to establish relationship between tables in a relational database.
Composite Key – A primary key composed of multiple attributes and not just a single attribute is called a composite key.
Unique Key – It is unique for all the records of the table. Once assigned, its value cannot be changed i.e. it is non-updatable. It may have a NULL value.
content_copyCOPY