Question
Which of the following is true about triggers in a
relational database?Solution
Triggers are database objects that automatically execute predefined actions in response to specific events, such as INSERT, UPDATE, or DELETE operations. They are used to enforce complex business rules, maintain audit trails, or synchronize tables. For instance, a trigger can automatically log changes to a table in an audit table whenever a record is updated. Triggers are associated with a table or a view and fire without manual intervention, making them ideal for automation. While powerful, they should be used judiciously to avoid performance bottlenecks in high-transaction environments. Why Other Options Are Incorrect :
- Triggers can be manually executed by database administrators : Triggers are event-driven and cannot be executed manually.
- Triggers replace indexes for optimizing queries : Indexes are designed to optimize query performance, while triggers are for automating responses to events.
- Triggers are only used for logging data changes : While logging is a common use case, triggers have broader applications like enforcing business rules.
- Triggers can only be defined for INSERT operations : Triggers can be defined for INSERT, UPDATE, DELETE, or even complex conditions.
рдирд┐рдореНрди рдореЗрдВ рд╕реЗ рдХрд┐рд╕ рд░рд╛рдЬреНрдп рдХреА рд░рд╛рдЬрднрд╛рд╖рд╛ рдЕрдВрдЧреНрд░реЗрдЬреА рдирд╣реАрдВ рд╣реИ -
рдЕрдирд┐рд╡рд╛рд░реНрдп рд╢рдмреНрдж рдХрд╛ рд╕рдорд╛рдирд╛рд░реНрдереА рд╢рдмреНрдж рд╣реИ тАУ
2023-24 рдореЗрдВ рд╣рд┐рдВрджреА рдХреЗ рдкреНрд░рдпреЛрдЧ рдХреЗ рд▓рд┐рдП рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдореЗрдВ рд╕реЗ рдХрд┐рд╕ рдХреНрд╖реЗрддя┐╜...
рд░рд╛рдЬрднрд╛рд╖рд╛ рдЖрдпреЛрдЧ рдХрд╛ рдЧрдарди рдХрд┐рд╕рдХреЗ рджреНрд╡рд╛рд░рд╛ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ ?
рд╕рдВрд╡рд┐рдзрд╛рди рдХреЗ рдХрд┐рд╕ рдЕрдиреБрдЪреНрдЫреЗрдж рдореЗрдВ рд╕рдВрдШ рдХреА рд░рд╛рдЬрднрд╛рд╖рд╛ рдФрд░ рд▓рд┐рдкрд┐ рдХрд╛ рдЙрд▓реНрд▓...
рдЗрдирдореЗрдВ рд╕реЗ рдХрд┐рд╕ рд╢рдмреНрдж рдХреЗ рдкрд░реНрдпрд╛рдпрд╡рд╛рдЪреА рдЧрд▓рдд рд╣реИрдВ ?
рд░рд╛рдЬрднрд╛рд╖рд╛ рдЕрдзрд┐рдирд┐рдпрдо 1963 рдХреЗ рдЕрдиреБрд╕рд╛рд░ -
рд╣рдорд╛рд░реЗ рджреЗрд╢ рдореЗрдВ рднрд╛рд╖рд╛ рдХрд╛ рдлрд╛рд░реНрдореВрд▓рд╛ рд╣реИ ?
рдЕрдиреБрдЪреНрдЫреЗрдж 343 рдХреЗ рд╡рд┐рд╖рдп рдореЗрдВ рдХреНрдпрд╛ рд╕рд╣реА рдХрдерди рд╣реИ?
рдпреВрдирд┐рдХреЛрдб рдореЗрдВ рд╣рд┐рдиреНрджреА рдХрд╛ рдХреМрди рд╕рд╛ реЮреЙрдиреНрдЯ рдкреНрд░рдпреЛрдЧ рдореЗрдВ рд▓рд╛рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ ?