What is the purpose of a trigger in a database? MCQ with Answer and Explanation

What is the purpose of a trigger in a database?
A. To index a column
B. To join tables
C. To automatically execute a set of actions in response to certain events on a table
D. To create a backup
Answer: Option C
Solution (By JKExamLibrary)
A trigger is a stored program that automatically runs when a specified event (INSERT, UPDATE, DELETE) occurs on a table.

This question belongs to: Computer Database Management System (DBMS)

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
Which of the following is a true statement about indexes?
A. Indexes are only used for primary keys
B. Indexes cannot be created on views
C. Indexes always improve performance
D. Indexes improve the speed of SELECT queries but can slow down INSERT, UPDATE, and DELETE operations

Correct Answer: Option D


Explanation:
Indexes speed up data retrieval but require additional maintenance during data modifications, which can slow down DML operations.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
The intentional process of introducing redundant data into a normalized database structure to optimize read query performance is called what?
A. Fragmentation
B. Denormalization
C. Decomposition
D. Normalization

Correct Answer: Option B


Explanation:
Denormalization is a strategy applied to normalized databases where redundant data is selectively added to speed up complex read queries by minimizing costly table joins.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
Which SQL keyword is placed immediately inside a SELECT statement or an aggregate function to eliminate duplicate rows from the output?
A. UNIQUE
B. SINGLE
C. DISTINCT
D. DIFFERENT

Correct Answer: Option C


Explanation:
The DISTINCT keyword is used to remove all duplicate values or records from the output of an SQL SELECT query.

This question belongs to: Computer Database Management System (DBMS)