Introduction to keys
It is a part of database management system or relational database management system and important part for creating the structure of a table. They are used to establish and identify relation between tables and help how to create integrity on tables. There are various type of keys used in a database.
- Super Keys
- Candidate Keys
- Primary Keys
- Foreign Keys
- Alternate keys
- Simple Keys
- Compound Keys
- Composite Keys
Let us explain these keys with the help of an example. Consider a relation Employee, having column ID, Emp-no, Name, Designation and City.
A Set of attributes is called a super key, if it recognizes the tuple uniquely. Every relation has at least one default super key. A super key has redundant attributes.
For example: ID + Name + City is a (more…)
This content is restricted to site members. If you are an existing user, please log in. New users may register below.