Tuesday 25 August 2015

Keys - Primary,Candidate,Foreign,Composite,Super,Alternate

Different Type of Keys -

1) Primary Key - A primary key is a column in a table that uniquely identifies the rows/tuple/record in that table with this property it cannot have null value.

In other words ,we can say that primary key is a candidate key that is most appropriate to become main key of the table.
Image result for primary key in dbms
2) Candidate Key - Candidate keys are defined as the set of fields from which primary key can be selected.

In otherwords we can say ,candidate key is known as nominee's for primary key field.


3) Super Key - Super Key is a superset of Candidate key.

4) Alternate Key - The candidate key which are not selected for primary key are known as alternative keys.

Alternate keys are known as Secondary keys.

5) Composite Key - If a table is not having a primary key then we use the composite keys which comes with the combination of two columns which uniquely identify the record or tuple.

In otherwords we can say,key that consists of two or more attributes that uniquely identify an entity occurance is called Composite key.



6) Foreign Key - A foreign key is a column or group of columns in a relational database table that provides a link between data in two tables.

1 comment:

  1. Jyoti Casino Resort - Rajasthan - JTM Hub
    JYoti Casino Resort. JYoti Casino Resort 대전광역 출장안마 is located in Rajasthan 안동 출장마사지 and is 울산광역 출장마사지 owned by the Bijari Group. The 광주광역 출장마사지 hotel is located in 고양 출장안마 Jyoti

    ReplyDelete