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) Emp_id
(b) Emp_name
(c) Dept
(d) Desig
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)
Made by
Davneet Singh
Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and 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.
Please login to view more pages. It's free :)
Teachoo gives you a better experience when you're logged in. Please login :)
Solve all your doubts with Teachoo Black!
Teachoo answers all your questions if you are a Black user!