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.
80 percent of first number is equal to 40 percent of the second number. What is the respective ratio of the first number to the second number?
Monthly savings of ‘Q’ is 25% more than that of ‘P’ and is 48% less than monthly income of ‘P’. Monthly expenditure of ‘Q’ is Rs. 3450 a...
- The mean proportional of 5 and 45 is _____.
Ratio of income of Prashant and Palak is 9:8. Income of Chhaya is 4/5 of income of Prashant and difference between income of Palak and Chhaya is ₹2400...
80 percent of first number is equal to 70 percent of the second number. What is the respective ratio of the first number to the second number?
What is the fourth proportional to 10¹⁵, 2⁶ and 5⁶?
In an office, the ratio of the number of males to number of females is 12:7. If 4 males joined the officeand 5 females left the office, then the ratio o...
If the third proportion of 8 and 16 is “0.5k”, then find the value of (k − 4) : (k + 14).
Incomes of company A and company B are in the ratio of 3:7. Had the income of company A been more by Rs.20 lakh, the ratio of their incomes would have b...
Number of faculties in Physics and Biology in an institute is in the ratio of 3:5 respectively. If 75 more faculties join Physics, while 40 more faculti...