×
FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
X
softetechnologies
Candidate key - RDBMS Foreign key - RDBMS
Primary key - RDBMS - SQL
1485    Arnab De    21/11/2021

Primary Keyis an unique attribute or set of unique attributes that can uniquely identify a tuple in a relation.

Primary key is auniqueandnot null attribute in a tuple. i.e. we cannot insert a tuple with blank or duplicate value in a primary key attribute.

Lets consider, a relation called emp

Emp
Emp_SSN Emp_No Emp_Name
1234544434 E-001 Pradipta Pal
5345232444 E-002 Abhijit Ganguly
4645673422 E-003 Suman Banerjee
softetechnologies

In the above relation called (Emp), Emp_SSN is a Primary Key. Here every Emp_SSN is unique and not null.

A Primary key is selected from a set of candidate keys. This is done by database admin or database designer. We can say that either {Emp_SSN} or {Emp_Number} can be chosen as a primary key for the table Employee.

softetechnologies
Candidate key - RDBMS Foreign key - RDBMS
softetechnologies
Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
Enter New Comment
Comment History
No Comment Found Yet.
Sri Sri Ramakrishna Paramahamsa
It is easy to talk on religion, but difficult to practice it.
Sri Sri Ramakrishna Paramahamsa
2137
60.53
Today So Far
Total View (Lakh)
softetechnologies
26/05/2018     44696
01/01/2018     36866
25/06/2018     36808
28/06/2017     34888
02/08/2017     33478
01/08/2017     27832
06/07/2017     27605
15/05/2017     27175
14/07/2017     22932
11/09/2018     21655
softetechnologies