Assignment 10
Assignment 10
Assignment 10
10
Aim
Objective
Theory
• Stored programs that are executed in respnse to some kind of event that occures in
database.
• Triggers fires in response to a DML statement (insert, update delete) on specified table.
• Powerful mechanism for ensuring the integrity of data
• Before|after specifies weather triger fires before of after the DML statement itself has
been executed.
• Update|insert|delete specifies DML statement to which trigger is associated
• On table_name associates the trigger with a specific table
• For each row indicates that the trigger will be executed once for every row affected by
the DML statement
• With after we are not able to modify the values about to modify the values about to be
inserted into or updated with the table in question
DELIMITER $$
CREATE TRIGGER before_employee_update
BEFORE UPDATE ON employees
FOR EACH ROW BEGIN
Output
References:
1. Raghu Ramkrishanan, Johannes Gehrke 4 th Edition “Database Management Systems” 2. Avi
Silberschatz , Henry F. Korth , S. Sudarshan, “Database System Concepts, Sixth Edition”, ISBN-
13: 978-93-3290-138-4, MCGraw Hill
Frequently Asked Questions
Q. Questions BT CO
No
1 Explain trigger concept? 2 2
2 Explain EER features? 2 2
Marking criteria.
Experiment completion (Timely)
Lab file (neatness and regularity)
Viva (from time to time)
Mock Practical Exam
Exam (end term): Practical + Viva
Assessment Methodology
Timely completion of assignment- 2marks
Program demonstration- 4 marks
Viva-voce -2 marks
Timely submission of journal- 2 marks