Question 10
A child line-item record must not reference an order that does not exist. Which acceptance check should accompany the remediation?
Explanation
Correct Answer
A foreign key maintains referential integrity across transactions rather than relying on application checks. The observation “Attempting to insert an orphaned line fails while valid parent references succeed” directly confirms the chosen action worked for this situation: A child line-item record must not reference an order that does not exist.
Incorrect Answers
Ledger adds cryptographic tamper-evidence; temporal history alone is not cryptographic proof. This observation would not establish that the required result occurred for A child line-item record must not reference an order that does not exist. The confirming test is: Attempting to insert an orphaned line fails while valid parent references succeed.
SQL Server UNIQUE and filtered unique indexes differ in how missing values can be represented. This observation would not establish that the required result occurred for A child line-item record must not reference an order that does not exist. The confirming test is: Attempting to insert an orphaned line fails while valid parent references succeed.
Row-by-row function evaluation can inhibit query optimization; set-based evaluation often scales better. This observation would not establish that the required result occurred for A child line-item record must not reference an order that does not exist. The confirming test is: Attempting to insert an orphaned line fails while valid parent references succeed.