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.
An amount of ₹10000 is invested in two parts at 8% and 6% per annum simple interest. If the total interest earned after 3 years is ₹2070, determine ...
From a point located x meters away from the base of a tree, the angle of elevation to the top of the tree is 60 ∘ . If the tree is 54 mete...
Find the distance between points A(2, 3) and B(7, 8).
If z=2+3i, then arg(z)=θ lies in which quadrant?
I). 2p 2  – 13p + 21 = 0
II). q 2  – 10q + 24 = 0
The average of 15 numbers is 32. If 2 is added to each number, then the new average will be:
The area of four walls of a room is 140 cm2. If the length and breadth of the room were equal and the height of the room is 7 cm, then what i...
A square pyramid has a base side of 8 cm and a height of 15 cm. Find the total surface area of the pyramid.
Rs. 156 is to be shared among 40 students, if each girl receives Rs.4.50, and boy receive Rs.3.50. Find the ratio of number of boys and girls.