KUMARI MEGHA
1 min readOct 19, 2022

Primary key

A primary key is the key (attribute) that uniquely identify tuples within the relation.

A single Database contain many different types of key (here primary key in the relation means attribute), some of them are candidate key, alternate key etc. Let’s focus on primary key, first of all we should know that every relation does have a primary key. Now how to decide that which attribute is the primary attribute in our database. For an example in the simple database, a table name ship has been made by the user with the attributes named as ‘ship_id’, ‘ship_name’, ‘date_of_manufacture’, ‘ship_color' and ‘ship_size’. Which among these can be made as primary key attribute. As primary key in a relation means a uniquely identified attribute which does not contain any duplicate values in the same relation, so in the ship table primary key is the ‘ship_id’. ‘ship_name’ can also be made as primary key in this table but for this ship table it has only one primary key and that is ‘ship_id’. How can ‘ship_name’ be as a primary key? that is related to another topic. This is all about primary key.

Hope you💕 love it.

KUMARI MEGHA

Love to hear with you, your FEELINGS in my WORDS 😇.