Managing Database Triggers for Error Handling and Examples
Explore the concept of database triggers, specifically focusing on error management scenarios and practical examples for INSERT, DELETE, and UPDATE operations in relational database systems. Learn how triggers can be utilized to maintain data integrity and handle errors effectively.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
LES TRIGGERS Les triggers - FG 1
GESTION DES ERREURS Les triggers - FG 13
EXEMPLE GESTION ERREUR Les triggers - FG 14
Exemples trigger INSERT, DELETE CREATE TRIGGER TriDelQualif AFTER DELETE ON Qualifications FOR EACH ROW BEGIN UPDATE Pilote SET nbQualif = nbQualif-1 WHERE brevet = OLD.brevet END; DELETE FROM Qualifications WHERE typa = A320 ; CREATE TRIGGER TriInsQualif AFTER INSERT ON Qualifications FOR EACH ROW BEGIN UPDATE Pilote SET nbQualif = nbQualif+1 WHERE brevet = NEW.brevet END; INSERT INTO Qualifications VALUES ( PL-2 , A380 , SYSDATE()); 15 SLAM3 - BDD TAB 2016
Exemples trigger UPDATE CREATE TRIGGER TriUpQualif AFTER UPDATE ON Qualifications FOR EACH ROW BEGIN UPDATE Pilote SET nbQualif = nbQualif-1 WHERE brevet = OLD.brevet END; UPDATE Pilote SET nbQualif = nbQualif+1 WHERE brevet = NEW.brevet UPDATE Qualifications SET brevet = PL-2 WHERE brevet = PL-3 AND typa = A330 ; 16 SLAM3 - BDD TAB 2016
17 SLAM3 - BDD TAB 2016