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
- A Pune firm takes a full backup every Sunday and a differential backup every night from Monday to Saturday. The server fails on Thursday mor…
- 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…
- Two clerks at a Chennai company simultaneously update the same inventory record, and the DBMS makes each transaction behave as if it ran alo…
- A company's disaster recovery plan has never been exercised since it was written three years ago. Which approach best gives assurance that t…
- Sundaram Textiles' HR department stores employee Aadhaar numbers, bank details and salary data in its HRMS. Under the Information Technology…
- Kaveri Pharma's finance team signs its electronically filed returns using a digital signature certificate. Which statement correctly describ…