1) There are two types of key,
and
*
Answers
Answer:
Ther are two types of keys and 5 types of lock
Answer:
Candidate Key - The candidate keys in a table are defined as the set of keys that is minimal and can uniquely identify any data row in the table.
Primary Key - The primary key is selected from one of the candidate keys and becomes the identifying key of a table. It can uniquely identify any data row of the table.
Super Key - Super Key is the superset of primary key. The super key contains a set of attributes, including the primary key, which can uniquely identify any data row in the table.
Composite Key - If any single attribute of a table is not capable of being the key i.e it cannot identify a row uniquely, then we combine two or more attributes to form a key. This is known as a composite key.
Secondary Key - Only one of the candidate keys is selected as the primary key. The rest of them are known as secondary keys.
Foreign Key - A foreign key is an attribute value in a table that acts as the primary key in another table. Hence, the foreign key is useful in linking together two tables. Data should be entered in the foreign key column with great care, as wrongly entered data can invalidate the relationship between the two tables.
An example to explain the different keys is