1 / 5
What is a 'stored procedure'?
-
-
-
-
A stored procedure is reusable SQL logic stored in the database and callable with parameters.
2 / 5
A trigger fires 'AFTER INSERT'. What does that mean?
-
-
-
-
An AFTER INSERT trigger runs automatically just after a row is inserted, e.g. to write an audit record.
3 / 5
A reviewer warns a trigger has a hidden 'side effect'. What does that mean?
-
-
-
-
A side effect is an implicit change (e.g. updating another table) that isn't obvious from the triggering statement.
4 / 5
A stored procedure takes an 'IN' parameter and an 'OUT' parameter. What is the OUT parameter for?
-
-
-
-
An OUT parameter passes a result back to the caller, as opposed to an IN parameter that supplies input.
5 / 5
Which sentence correctly uses 'business logic in the database'?
-
-
-
-
Encoding rules in procedures/triggers centralises logic in the DB, with trade-offs around testing and versioning.