Consider a table with following structure: Employee(Emp_id, Emp_name, Dept, Desig, basic) In this table which attribute can be used as a primary key?
A primary key is an attribute which can uniquely identify the records in a relation/table.
Checking the options
(a) Emp_id - No two employees can have the same employee id, so it can be used as a primary key.
(b) Emp_name - 2 or more employees can have the same name, so it cannot be used as a primary key.
(c) Dept - There could be more than 1 employee in a department, so it cannot be used as a primary key.
(d) Desig - There could be more than 1 employee with the same designation, so it cannot be used as a primary key.
From the above explanation, it is clear that only Emp_id can be used as a primary key.
So, the correct answer is (A)
Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 13 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.
Hi, it looks like you're using AdBlock :(
Displaying ads are our only source of revenue. To help Teachoo create more content, and view the ad-free version of Teachooo... please purchase Teachoo Black subscription.