Skip to main contentSkip to solution

Consider the following tables:

Project_Assigned

Reg_IdProject_No
CS101101
CS103105
IP104102
IP102104

STUDENT

Roll_noNameClassReg_ID
12SHIVAM12CS101
13SHASHANK12CS101
15NISH11CS101
11VIVEK05IP104
12KRITI06IP104

Which among the following is the foreign key in table 'Project_Assigned' ?

Solution

✅ Correct Option: 4

A foreign key must refer to the primary key (or a unique key) of another table. In STUDENT, Reg_ID is not unique, since CS101 appears three times and IP104 twice. So it cannot be a primary key, and Reg_Id in Project_Assigned cannot reference it.

Project_No has no other table to refer to. Hence Project_Assigned has no foreign key.


Option 1: Reg_Id has the same name and values as Reg_ID in STUDENT, but a matching name is not enough. The referenced column must be a primary key, and Reg_ID in STUDENT is not.

Option 3: a combination of both columns has no parent table, so it cannot be a foreign key either.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question