Managing Semantic Integrity Controls in Database Systems

semantic integrity n.w
1 / 15
Embed
Share

Explore the concept of semantic integrity control in database management systems through centralized and distributed approaches, focusing on specification, enforcement, and examples of integrity constraints. Learn about predefined and precondition constraints, their significance, and how they are applied to ensure data accuracy and consistency.

  • Database
  • Integrity Control
  • Constraints
  • Semantic
  • Management

Uploaded on | 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. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

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.

E N D

Presentation Transcript


  1. SEMANTIC INTEGRITY CONTROL 5.3.1-5.3.2[189-194] PRIYANKAA RAJENDRAN PRESENTATION ID: #23

  2. OUTLINE.. 1. Centralized Semantic Integrity Control Specification of Integrity Constraints Integrity Enforcement 2. Distributed Semantic Integrity Control

  3. CENTRALIZED SEMANTIC INTEGRITY CONTROL A semantic integrity manager has two main components: a language for expressing and manipulating integrity assertions, and an enforcement mechanism that performs specific actions to enforce database upon update transactions.

  4. SPECIFICATION OF INTEGRITY CONSTRAINTS Standard SQL language allows one to specify, read, or drop integrity constraints In RDBMS, integrity constraints are defined as assertions (assertion is a particular expression of tuple relational calculus, in which each variable is either universally or existentially quantified) An assertion can be seen as a query qualification that is either true or false for each tuple in the Cartesian product of the relations determined by the tuple variables. There are three types integrity constraints: predefined, precondition, and general constraints

  5. INTEGRITY CONSTRAINTS Examples of Integrity constraints based on the following database:

  6. PREDEFINED CONSTRAINTS Predefined constraints are based on simple keywords. It is possible to express concisely the more common constraints of the relational model, such as non-null attribute, unique key, foreign key, or functional dependency - Involves the view SYSAN and the relation ASG(ENO,PNO,RESP,DUR)

  7. EXAMPLES OF PREDEFINED CONSTRAINTS CONTD.

  8. PRECONDITION CONSTRAINTS Precondition constraints express conditions that must be satisfied by all tuples in a relation for a given update type. The update type, which might be INSERT, DELETE, or MODIFY, permits restricting the integrity control. Precondition constraints can be expressed with the SQL CHECK statement enriched with the ability to specify update type. The syntax of the CHECK statement is

  9. EXAMPLES OF PRECONDITION CONSTRAINTS

  10. GENERAL CONSTRAINTS General constraints are formulas of tuple relational calculus where all variables are quantified. General constraints are more concise than precompiled constraints since the former may involve more than one relation. At least three precompiled constraints are necessary to express a general constraint on three relations. A general constraint may be expressed with the following syntax:

  11. EXAMPLES OF GENERAL CONSTRAINTS

  12. INTEGRITY ENFORCEMENT A constraint is violated when it becomes false in the new database by the update transaction. Two basic methods permit the rejection of inconsistent update transactions. The update transaction u is executed, causing a change of the database state D to Du. The enforcement algorithm verifies, by applying tests derived from the constraints, that all relevant constraints hold in state Du If the state Du is inconsistent, the DBMS can try to reach another consistent state, Du by modifying Du with compensation actions, or to restore state D by undoing u. Since these tests are applied after having changed the database state, they are generally called posttests. This approach may be inefficient if a large amount of work (the update of D) must be undone in the case of an integrity failure.

  13. INTEGRITY ENFORCEMENT CONTD. The second method is based on the prevention of inconsistencies. The tuples subject to the update transaction are either directly available (in the case of insert) or must be retrieved from the database (in the case of deletion or modification). The enforcement algorithm verifies that all relevant constraints will hold after updating those tuples. This is generally done by applying to those tuples tests that are derived from the integrity constraints. Given that these tests are applied before the database state is changed, they are generally called pretests. The preventive approach is more efficient than the detection approach since updates never need to be undone because of integrity violation

  14. QUERY MODIFICATION ALGORITHM The query modification algorithm is an example of a preventive method that is particularly efficient at enforcing domain constraints. It adds the assertion qualification to the query qualification by an AND operator so that the modified query can enforce integrity.

  15. THANK YOU !

Related


More Related Content