Keys

RGPV: DBMS: Unit 2
 

KEYS

 

Database Keys :

Keys are very important part of Relational database.

They are used to establish and identify relation between tables.

 They also ensure that each record within a table can be uniquely identified by combination of one or more fields within a table.

 

1)      Super Key :

Super Key is defined as a set of attributes within a table that uniquely identifies each record within a table. Super Key is a superset of Candidate key.

 

2)      Candidate keys:

Candidate Keys  are defined as the set of fields from which primary key can be selected. It is an attribute or set of attribute that can act as a primary key for a table to uniquely identify each record in that table.

 

3)      Primary key:

Primary Key is a candidate key that is most appropriate to become main key of the table. It is a key that uniquely identify each record in a table.

 

4)      Composite key :

Key that consist of two or more attributes that uniquely identify an entity occurance is called Composite key. But any attribute that makes up the Composite key is not a simple key in its own.

 

5)      secondary keys or alternative keys :

The candidate key which are not selected for primary key are known as secondary keys or alternative keys.

 

6)      Foreign key:

An attribute (or combination of attributes) in one table whose values must either match the primary key in another table or be null.

 

 

COMING SOON...

LEAVE A REPLY










Related topics

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.