📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Can a primary key also be a foreign key in the same table?

A. Yes, in a 1:1 relationship or a weak entity table, the primary key can also reference another table ✅
B. No, never
C. Only if it is composite
D. Only if it allows NULLs

Correct Answer: A. Yes, in a 1:1 relationship or a weak entity table, the primary key can also reference another table

Explanation

A primary key can double as a foreign key, for example in a 1:1 extension table or a weak entity whose key includes the owner's key.