Skip to content

CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Database Management

In a bank's database, the customer table has the column AccountNo as its unique identifier, and the loan table has a column AccountNo that must match an existing customer. In relational terminology, AccountNo in the loan table is a:

It is a foreign key referencing the customer table. A foreign key is a column in one table that points to the primary key of another and enforces referential integrity, so every loan record must link to an existing customer account.

  1. APrimary key of the loan table
  2. BForeign key referencing the customer tableCorrect
  3. CCandidate key of the customer table only
  4. DComposite attribute

Explanation

A foreign key is a column in one table that refers to the primary key of another table and enforces referential integrity. Here the loan table's AccountNo must match a customer record. It would be the loan table's primary key only if it uniquely identified loan rows, which is not stated.

Did you get it right without looking?

One question tells you little. A timed set on Database Management shows your real accuracy, how long you take and where you lose marks.

More Database Management questions