Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:
Triggers and stored routines (procedures and functions) are database-resident code artifacts. Centralizing business rules and data integrity logic in the database can reduce duplication and ensure consistent enforcement across multiple applications. This question checks whether such code is indeed stored in one place and managed centrally by the DBMS.
Given Data / Assumptions:
Concept / Approach:
When you CREATE TRIGGER or CREATE PROCEDURE/FUNCTION, the DBMS stores the definitions in the data dictionary (catalog). This central storage means that any client application that modifies data through the database benefits from the same logic without embedding duplicate rules in each client. Change management is simplified: update the routine or trigger once, and all callers observe the new behavior. Security and versioning are likewise centralized via GRANT/REVOKE and deployment scripts. Therefore, it is accurate to say that the code is stored in one location and administered centrally (within the database), not spread throughout clients.
Step-by-Step Solution:
Verification / Alternative check:
Query system views (for example, INFORMATION_SCHEMA.ROUTINES, pg_catalog.pg_proc, USER_TRIGGERS) to list and manage stored code in one place.
Why Other Options Are Wrong:
Common Pitfalls:
Duplicating business logic both in the database and in multiple services, causing divergence; failing to version-control DDL scripts used to create stored code.
Final Answer:
Correct
Discussion & Comments