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
Rules and integrity constraints
1
Rules in active databases and
integrity constraints
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
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
Rules and integrity constraints
4
Examples
provide examples of integrity constraints and consider the two issues application reaction to violation
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
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
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)