Check sibling questions

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

 

Answer:

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)

Get Real time Doubt solving from 8pm to 12 am!


Transcript

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)

Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 12 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.