Vidyalelo
Database · Q33

SQL for Database Construction

Programming · Database · question 33

Q33

A trigger is a stored program that is attached to a database.

A.
True
Answer
B.
False

Answer: Option A

Solution

Answer: Option A
Solution:
The correct answer is Option A: True

Let's break down why:

What is a trigger? Imagine a trigger like a tiny program that's automatically activated when something specific happens in your database.

Stored Program: Triggers are essentially pre-written sets of SQL code. These SQL codes are stored within the database itself, waiting to be activated.

Attached to a Database: These stored program (Triggers) are linked to a particular table or the database and waits for the event to be happening.

Example: Think of it like this: You might set up a trigger to automatically update an "order history" table every time a new order is placed in the "orders" table. The "new order" event *triggers* the update.

So, because triggers are stored programs connected to a database that automatically execute in response to certain events, the statement is true.