Skip to content

CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Information Systems

A company secretary reviews a customer table in which each customer has a unique customer ID, and an orders table that stores the customer ID of the customer placing each order. In relational database terminology, the customer ID column in the orders table is called a:

The customer ID column in the orders table is a foreign key. It refers to the primary key of the customer table and links each order to its customer, thereby enforcing referential integrity between the two tables.

  1. APrimary key of the orders table only
  2. BForeign key referring to the customer tableCorrect
  3. CCandidate key of the customer table
  4. DComposite key of both tables

Explanation

A foreign key is a column in one table that refers to the primary key of another table, creating a link between them. Here the customer ID in the orders table points to the customer table. It is not the primary key of orders, because order identity is normally given by an order number.

Did you get it right without looking?

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

More Information Systems questions