Compliance requires that every change to the salary column in the employees table be recorded in a salary_audit table with the old value, new value and time, no matter which application or user makes the change. Which approach meets this requirement?
Select an answer to reveal the explanation.
Short Explanation
A trigger is the motion-sensor light of the database: it fires on its own every time the event happens, no matter who walks by. That's what "no matter which application or user" is asking you for. The trap is the stored procedure, which only works if everybody remembers to use it.
Full Explanation
A trigger is a database object bound to a table and an event. An AFTER UPDATE trigger on employees fires automatically whenever a row is updated, and inside it the engine exposes the row's old and new values, so the trigger can insert both salaries and a timestamp into salary_audit. Because enforcement lives in the database, it captures changes from every application, script or ad hoc session, which is exactly the compliance requirement. Defining the trigger to fire only when the salary column is updated, or comparing old and new values, avoids logging unrelated changes. A stored procedure centralizes logic, but it records only the changes made through it; any application or user that updates the table directly bypasses the audit. A view presents data but records nothing, and comparing with the previous day's value cannot reveal multiple changes within a day or who made them. A nightly comparison against a backup detects only the net difference between snapshots, misses intermediate values, and records the time of the job rather than the time of each change. Exam caveat: triggers add work to every qualifying update, so audit triggers should stay lean and avoid complex logic. Operational check: update one employee's salary twice in a test environment and confirm salary_audit holds two rows with the correct old values, new values and timestamps.