Dbms Ex7
Dbms Ex7
Systems Lab
2. Create a BEFORE UPDATE Trigger for the “User” Table that does not allow email addresses to be
null.
3. Create a BEFORE DELETE Trigger for the “User” Table that prevents the deletion of users with
specific email domains (like "example.com").
20CS2016L - Database Management URK22CS3013
Systems Lab
4. Write an AFTER INSERT trigger to count number of new tuples inserted using each
5. Create an AFTER UPDATE Trigger for the “User” Table that signals when a users email is changed.
6. Create an AFTER DELETE Trigger for the “User” Table that signals when a user is deleted.
7. Create a BEFORE INSERT Trigger for the “Event” Table that ensures the events date is in the future.
20CS2016L - Database Management URK22CS3013
Systems Lab
8. Create a BEFORE UPDATE Trigger for the “Event” Table that Ensures that the events time is not set
to before 7:00 AM (assuming you use 24-hour format for your Time column).
9. Create an AFTER DELETE Trigger for the “Event” Table that signals when an event is deleted.
10. Create an AFTER UPDATE Trigger for the “Event” Table that signals when an events time is
changed.
20CS2016L - Database Management URK22CS3013
Systems Lab
11. Create a BEFORE INSERT Trigger for the “Venue” Table that ensures the name of the venue is not
empty.
12. Create a BEFORE DELETE Trigger for the “Venue” Table that Prevents deletion if the VenueID is
less than 105.
13. Create an AFTER INSERT Trigger for the “Venue” Table that signals when a new row is added to
it.
20CS2016L - Database Management URK22CS3013
Systems Lab
20CS2016L - Database Management URK22CS3013
Systems Lab
14. Create an AFTER UPDATE Trigger for the “Venue” Table that signals when a row is updated.
Result:
20CS2016L - Database Management URK22CS3013
Systems Lab
The queries have been executed successfully and the output is displayed on the screen using the concept
of functions and procedures.