rules in active databases and integrity constraints
DESCRIPTION
Rules in active databases and integrity constraints. Recap integrity constraints. normal forms express FDs, MVDs, JDs candidate and foreign keys entity integrity referential integrity; foreign key rules business (enterprise) integrity constraint rules domain constraints - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Rules in active databases and integrity constraints](https://reader036.vdocuments.us/reader036/viewer/2022082612/56813c0d550346895da57e6f/html5/thumbnails/1.jpg)
Rules and integrity constraints
1
Rules in active databases and
integrity constraints
![Page 2: Rules in active databases and integrity constraints](https://reader036.vdocuments.us/reader036/viewer/2022082612/56813c0d550346895da57e6f/html5/thumbnails/2.jpg)
Rules and integrity constraints
2
Recap integrity constraints
normal forms• express FDs, MVDs, JDs
candidate and foreign keys• entity integrity
• referential integrity; foreign key rules
business (enterprise) integrity constraint rules• domain constraints
• attribute constraints
• relation constraints
• database constraints
![Page 3: Rules in active databases and integrity constraints](https://reader036.vdocuments.us/reader036/viewer/2022082612/56813c0d550346895da57e6f/html5/thumbnails/3.jpg)
Rules and integrity constraints
3
Integrity constraints - issues
declarative do not specify when to be applied and what action to take in
case of violation, because they are known by default application
• NF, attribute and relation constraints and CK - instantaneously
• database constraints and FK - deferred until end of transaction
action• relation constraints and CK - reject
• database constraints - ROLLBACK transaction
• FK - FK rules
![Page 4: Rules in active databases and integrity constraints](https://reader036.vdocuments.us/reader036/viewer/2022082612/56813c0d550346895da57e6f/html5/thumbnails/4.jpg)
Rules and integrity constraints
4
Examples
provide examples of integrity constraints and consider the two issues application reaction to violation
![Page 5: Rules in active databases and integrity constraints](https://reader036.vdocuments.us/reader036/viewer/2022082612/56813c0d550346895da57e6f/html5/thumbnails/5.jpg)
Rules and integrity constraints
5
Recap rules in active databases
general model event condition action
in the rest of this lecture rules are considered only from the point of view of enforcing integrity constraints
![Page 6: Rules in active databases and integrity constraints](https://reader036.vdocuments.us/reader036/viewer/2022082612/56813c0d550346895da57e6f/html5/thumbnails/6.jpg)
Rules and integrity constraints
6
Rules in active databases - issues
procedural specify when to be checked
• what event (UPDATE, DELETE, INSERT)
• on which object
specify the action to be taken
![Page 7: Rules in active databases and integrity constraints](https://reader036.vdocuments.us/reader036/viewer/2022082612/56813c0d550346895da57e6f/html5/thumbnails/7.jpg)
Rules and integrity constraints
7
Activity
(possible topic for the last coursework) compare, from the point of view of integrity constraint
enforcement:• normal forms
• keys (candidate and foreign)
• domain, attribute, relation and database constraints (conditional expressions written explicitly)
• rules (from active databases)