Managing Database Triggers for Error Handling and Examples

Slide Note
Embed
Share

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.


Uploaded on Oct 08, 2024 | 0 Views


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


  1. LES TRIGGERS Les triggers - FG 1

  2. Les triggers - FG 2

  3. Les triggers - FG 3

  4. Les triggers - FG 4

  5. Les triggers - FG 5

  6. Les triggers - FG 6

  7. Les triggers - FG 7

  8. Les triggers - FG 8

  9. Les triggers - FG 9

  10. Les triggers - FG 10

  11. Les triggers - FG 11

  12. Les triggers - FG 12

  13. GESTION DES ERREURS Les triggers - FG 13

  14. EXEMPLE GESTION ERREUR Les triggers - FG 14

  15. 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

  16. 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. 17 SLAM3 - BDD TAB 2016

Related