CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Information Systems
An 'Orders' table in a Pune firm's database has a column 'CustomerID' whose values must match existing values in the 'Customers' table's primary key. Which constraint enforces this rule and prevents orders for non-existent customers?
Referential integrity enforced through a foreign key does this. It requires every CustomerID in the Orders table to match an existing primary key value in the Customers table, preventing orphan records. A unique constraint only blocks duplicates and does not link tables.
- AUnique constraint
- BReferential integrity through a foreign keyCorrect
- CCheck constraint on data type
- DDefault constraint
Explanation
A foreign key with referential integrity ensures a value in the child table must exist in the parent table's primary key. A unique constraint only prevents duplicates within the column and does not link tables, so it would not stop orphan orders.
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
- During the testing phase of a new inventory system, the vendor's team runs the software in a controlled environment, and then selected end-u…
- A company's disaster recovery plan has never been exercised since it was written three years ago. Which approach best gives assurance that t…
- Kaveri Pharma's finance team signs its electronically filed returns using a digital signature certificate. Which statement correctly describ…
- The marketing function of an e-commerce firm uses customer purchase history to send targeted offers. Which information system component is c…
- A retailer keeps a database of customer names, mobile numbers and purchase history. An employee with legitimate access copies the list and s…
- A company's disaster recovery plan states that after an outage, systems must be running within 4 hours, and no more than 30 minutes of trans…