Movatterモバイル変換


[0]ホーム

URL:


PPTX, PDF12,281 views

Distributed DBMS - Unit 5 - Semantic Data Control

The document discusses semantic data control in database systems, focusing on data security, access control, and integrity management. It outlines approaches such as discretionary and multilevel access control, and emphasizes the importance of semantic integrity constraints to maintain database consistency. Additionally, it covers both centralized and distributed integrity control mechanisms for enforcing constraints across different data environments.

Embed presentation

Downloaded 39 times
UNIT-5Semantic Data Control
Outlines…• Introduction of Semantic Data Control• View Management• Authentication Control• Semantic Integrity Control• Cost of Enforcing Semantic Integrity1/11/2017 2Prof. Dhaval R. Chandarana
Data Security• Data security is an important function of a database system thatprotects data against unauthorized access.• Data security includes two aspects: data protection and accesscontrol.• Data protection is required to prevent unauthorized users fromunderstanding the physical content of data.• The main data protection approach is data encryption.• Access control must be refined so that different users have differentrights on the same database objects.• There are two main approaches to database access controldiscretionary (or authorization control) mandatory or multilevel.1/11/2017 3Prof. Dhaval R. Chandarana
Discretionary Access Control• Three main actors are involved in discretionary access control.1. The subject (e.g., users, groups of users) who trigger the executionof application programs.2. Operations, which are embedded in application programs.3. The database objects, on which the operations are performed.1/11/2017 4Prof. Dhaval R. Chandarana
Authorization control• Authorization control consists of checking whether a given triple(subject, operation, object) can be allowed to proceed.• The introduction of a subject in the system is typically done by a pair(user name, password).• The objects to protect are subsets of the database. Relational systemsprovide finer and more general protection granularity than do earliersystems.• A right expresses a relationship between a subject and an object for aparticular set of operations.GRANT <operation type(s)> ON <object> TO <subject(s)>REVOKE <operation type(s)> FROM <object> TO <subject(s)>1/11/2017 5Prof. Dhaval R. Chandarana
Multilevel Access Control• Discretionary access control has some limitations. One problem isthat a malicious user can access unauthorized data through anauthorized user.• For instance, consider user A who has authorized access to relations Rand S and user B who has authorized access to relation S only. If Bsomehow manages to modify an application program used by A so itwrites R data into S, then B can read unauthorized data withoutviolating authorization rules.• Multilevel access control answers this problem and further improvessecurity by defining different security levels for both subjects anddata objects.1/11/2017 6Prof. Dhaval R. Chandarana
Multilevel Access Control• process has a security level also called clearance derived from that of theuser.• In its simplest form, the security levels are Top Secret (TS), Secret (S),Confidential (C) and Unclassified (U), and ordered as TS > S >C >U, where“>” means “more secure”.• Access in read and write modes by subjects is restricted by two simplerules:Rule 1 (called “no read up”)• protects data from unauthorized disclosure, i.e., a subject at a givensecurity level can only read objects at the same or lower security levels.Rule 2 (called “no write down”)• protects data from unauthorized change, i.e., a subject at a given securitylevel can only write objects at the same or higher security levels.1/11/2017 7Prof. Dhaval R. Chandarana
Distributed Access Control• The additional problems of access control in a distributedenvironment stem from the fact that objects and subjects aredistributed and that messages with sensitive data can be read byunauthorized users.• These problems are: remote user authentication, management ofdiscretionary access rules, handling of views and of user groups, andenforcing multilevel access control.• Remote user authentication is necessary since any site of adistributed DBMS may accept programs initiated, and authorized, atremote sites.1/11/2017 8Prof. Dhaval R. Chandarana
Distributed Access Control• Three solutions are possible for managing authentication1. Authentication information is maintained at a central site for globalusers which can then be authenticated only once and then accessedfrom multiple sites.2. The information for authenticating users (user name and password)is replicated at all sites in the catalog.3. Intersite communication is thus protected by the use of the sitepassword. Once the initiating site has been authenticated, there isno need for authenticating their remote users.1/11/2017 9Prof. Dhaval R. Chandarana
Semantic Integrity Control• Another important and difficult problem for a database system is howto guarantee database consistency.• A database state is said to be consistent if the database satisfies a setof constraints, called semantic integrity constraints.• Maintaining a consistent database requires various mechanisms suchas concurrency control, reliability, protection, and semantic integritycontrol, which are provided as part of transaction management.• Semantic integrity control ensures database consistency by rejectingupdate transactions that lead to inconsistent database states, or byactivating specific actions on the database state, which compensatefor the effects of the update transactions.1/11/2017 10Prof. Dhaval R. Chandarana
Semantic Integrity Control• Two main types of integrity constraints can be distinguished:structural constraints and behavioral constraints.• Structural constraints express basic semantic properties inherent to amodel. Examples of such constraints are unique key constraints in therelational model, or one-to-many associations between objects in theobject-oriented model.• Behavioral constraints are essential in the database design process.They can express associations between objects, such as inclusiondependency in the relational model, or describe object propertiesand structures.1/11/2017 11Prof. Dhaval R. Chandarana
Centralized Semantic Integrity Control• Specification of Integrity Constraints• triggers (event-condition-action rules) can be used to automaticallypropagate updates, and thus to maintain semantic integrity.• We can distinguish between three types of integrity constraints:predefined, precondition, or general constraints.• EMP(ENO, ENAME, TITLE)• PROJ(PNO, PNAME, BUDGET)• ASG(ENO, PNO, RESP, DUR)1/11/2017 12Prof. Dhaval R. Chandarana
Centralized Semantic Integrity Control• Predefined constraints are based on simple keywords. Through them,it is possible to express concisely the more common constraints of therelational model, such as non-null attribute, unique key, foreign key,or functional dependency.• Employee number in relation EMP cannot be null.ENO NOT NULL IN EMP• The project number PNO in relation ASG is a foreign key matching theprimary key PNO of relation PROJ.PNO IN ASG REFERENCES PNO IN PROJ1/11/2017 13Prof. Dhaval R. Chandarana
Centralized Semantic Integrity Control• Precondition constraints express conditions that must be satisfied by alltuples in a relation for a given update type. The update type, which mightbe INSERT, DELETE, or MODIFY, permits restricting the integrity control.• Precondition constraints can be expressed with the SQL CHECK statementenriched with the ability to specify the update type.CHECK ON <relation name > WHEN <update type>(<qualification over relation name>)• The budget of a project is between 500K and 1000K.CHECK ON PROJ (BUDGET+ >= 500000 AND BUDGET <= 1000000)• Only the tuples whose budget is 0 may be deleted.CHECK ON PROJ WHEN DELETE (BUDGET = 0)1/11/2017 14Prof. Dhaval R. Chandarana
Centralized Semantic Integrity Control• General constraints are formulas of tuple relational calculus where allvariables are quantified. The database system must ensure that thoseformulas are always true.CHECK ON list of <variable name>:<relation name>,(<qualification>)• The total duration for all employees in the CAD project is less than100.• CHECK ON g:ASG, j:PROJ (SUM(g.DUR WHERE g.PNO=j.PNO)<100 IFj.PNAME="CAD/CAM")1/11/2017 15Prof. Dhaval R. Chandarana
Distributed Semantic Integrity Control• Definition of Distributed Integrity Constraints• Assertions can involve data stored at different sites, the storage of theconstraints must be decided so as to minimize the cost of integritychecking. There is a strategy based on a taxonomy of integrity constraintsthat distinguishes three classes:• Individual constraints: single-relation single-variable constraints. Theyrefer only to tuples to be updated independently of the rest of thedatabase.• Set-oriented constraints: include single-relation multivariable constraintssuch as functional dependency and multirelation multivariable constraintssuch as foreign key constraints• Constraints involving aggregates: require special processing because of thecost of evaluating the aggregates.1/11/2017 16Prof. Dhaval R. Chandarana
Individual constraints• Consider relation EMP, horizontally fragmented across three sitesusing the predicates and the domain constraint C: ENO < “E4”. p1 : 0 ENO < “E3” p2 : ”E3” ENO “E6” p3 : ENO > “E6”• Constraint C is compatible with p1 (if C is true, p1 is true) and p2 (if Cis true, p2 is not necessarily false), but not with p3 (if C is true, thenp3 is false). Therefore, constraint C should be globally rejectedbecause the tuples at site 3 cannot satisfy C, and thus relation EMPdoes not satisfy C.1/11/2017 17Prof. Dhaval R. Chandarana
Set-oriented constraints.• Set-oriented constraint are multivariable; that is, they involve joinpredicates.• Three cases, given in increasing cost of checking, can occur:1. The fragmentation of R is derived from that of S based on a semijoin on the attribute used in the assertion join predicate.2. S is fragmented on join attribute.3. S is not fragmented on join attribute.1/11/2017 18Prof. Dhaval R. Chandarana
Set-oriented constraints.• In the first case, compatibility checking is cheap since the tuple of Smatching a tuple of R is at the same site.• In the second case, each tuple of R must be compared with at mostone fragment of S, because the join attribute value of the tuple of Rcan be used to find the site of the corresponding fragment of S.• In the third case, each tuple of R must be compared with allfragments of S. If compatibility is found for all tuples of R, theconstraint can be stored at each site.1/11/2017 19Prof. Dhaval R. Chandarana
Constraints involving aggregates• These constraints are among the most costly to test because theyrequire the calculation of the aggregate functions.• The aggregate functions generally manipulated are MIN, MAX, SUM,and COUNT.• Each aggregate function contains a projection part and a selectionpart.1/11/2017 20Prof. Dhaval R. Chandarana

Recommended

PPTX
Database , 12 Reliability
PPTX
Lec 7 query processing
PPTX
Database , 8 Query Optimization
PPTX
Replication Techniques for Distributed Database Design
PPTX
Distributed dbms architectures
PPTX
Distributed Query Processing
PDF
management of distributed transactions
PPTX
Query decomposition in data base
PPTX
Distributed DBMS - Unit 6 - Query Processing
PPTX
Query processing in Distributed Database System
PPTX
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
PPT
Ddbms1
PDF
DDBMS Paper with Solution
PPTX
object oriented methodologies
PPTX
Join ordering in fragment queries
PPTX
Replication in Distributed Systems
PPTX
Object relational database management system
PPT
Distributed Database Management System
PPT
1. Introduction to DBMS
PPT
Unit 3 object analysis-classification
PPTX
Distributed design alternatives
PPTX
Distributed database management system
PPT
Query processing-and-optimization
PPTX
Distributed concurrency control
PPT
9. Object Relational Databases in DBMS
PPTX
Distributed system architecture
PPT
1.7 data reduction
PPT
distributed shared memory
PPT
16. Concurrency Control in DBMS
PPTX
Distributed DBMS - Unit 9 - Distributed Deadlock & Recovery

More Related Content

PPTX
Database , 12 Reliability
PPTX
Lec 7 query processing
PPTX
Database , 8 Query Optimization
PPTX
Replication Techniques for Distributed Database Design
PPTX
Distributed dbms architectures
PPTX
Distributed Query Processing
PDF
management of distributed transactions
PPTX
Query decomposition in data base
Database , 12 Reliability
Lec 7 query processing
Database , 8 Query Optimization
Replication Techniques for Distributed Database Design
Distributed dbms architectures
Distributed Query Processing
management of distributed transactions
Query decomposition in data base

What's hot

PPTX
Distributed DBMS - Unit 6 - Query Processing
PPTX
Query processing in Distributed Database System
PPTX
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
PPT
Ddbms1
PDF
DDBMS Paper with Solution
PPTX
object oriented methodologies
PPTX
Join ordering in fragment queries
PPTX
Replication in Distributed Systems
PPTX
Object relational database management system
PPT
Distributed Database Management System
PPT
1. Introduction to DBMS
PPT
Unit 3 object analysis-classification
PPTX
Distributed design alternatives
PPTX
Distributed database management system
PPT
Query processing-and-optimization
PPTX
Distributed concurrency control
PPT
9. Object Relational Databases in DBMS
PPTX
Distributed system architecture
PPT
1.7 data reduction
PPT
distributed shared memory
Distributed DBMS - Unit 6 - Query Processing
Query processing in Distributed Database System
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Ddbms1
DDBMS Paper with Solution
object oriented methodologies
Join ordering in fragment queries
Replication in Distributed Systems
Object relational database management system
Distributed Database Management System
1. Introduction to DBMS
Unit 3 object analysis-classification
Distributed design alternatives
Distributed database management system
Query processing-and-optimization
Distributed concurrency control
9. Object Relational Databases in DBMS
Distributed system architecture
1.7 data reduction
distributed shared memory

Viewers also liked

PPT
16. Concurrency Control in DBMS
PPTX
Distributed DBMS - Unit 9 - Distributed Deadlock & Recovery
PPT
Transaction processing systems
PPT
Databases: Concurrency Control
PDF
Transaction Management - Lecture 11 - Introduction to Databases (1007156ANR)
PPT
Transaction Processing System
PPT
Transaction processing system
PPT
Transaction concurrency control
PPTX
12 ipt 0501 transaction processing systems 01
 
PDF
Transaction & Concurrency Control
PPT
Concurrency control
16. Concurrency Control in DBMS
Distributed DBMS - Unit 9 - Distributed Deadlock & Recovery
Transaction processing systems
Databases: Concurrency Control
Transaction Management - Lecture 11 - Introduction to Databases (1007156ANR)
Transaction Processing System
Transaction processing system
Transaction concurrency control
12 ipt 0501 transaction processing systems 01
 
Transaction & Concurrency Control
Concurrency control

Similar to Distributed DBMS - Unit 5 - Semantic Data Control

PPTX
Integrity Constraints
PPTX
DBMS Integrity rule
PPT
Data integrity
PPTX
Security and Integrity violations, Authorisation and views, Integrity Constant
PPTX
Relational Model and Relational Algebra.pptx
PPTX
Chapter 4 security part ii auditing database systems
PPT
Dbms ii mca-ch4-relational model-2013
PDF
3 - Integrity Constraints.pdf
PDF
DBMS NOTES BY KAVYA R-UNIT4-2025-SIT.pdf
PPTX
Database Terminology and DBLC.pptx
PDF
Database management system important topic.pdf
DOCX
Database Security—Concepts,Approaches, and ChallengesElisa
PPTX
Integrity Constraints explain everything in it
PPT
Database Constraints.ppt
PPTX
Relational data model
PDF
Pre-sentation.pdf
PPTX
ch20 Secuity & Admin Transparencies-6E.pptx
DOCX
Bt0066 dbms
PPTX
1 constraints
PPT
Lesson10 Database security
Integrity Constraints
DBMS Integrity rule
Data integrity
Security and Integrity violations, Authorisation and views, Integrity Constant
Relational Model and Relational Algebra.pptx
Chapter 4 security part ii auditing database systems
Dbms ii mca-ch4-relational model-2013
3 - Integrity Constraints.pdf
DBMS NOTES BY KAVYA R-UNIT4-2025-SIT.pdf
Database Terminology and DBLC.pptx
Database management system important topic.pdf
Database Security—Concepts,Approaches, and ChallengesElisa
Integrity Constraints explain everything in it
Database Constraints.ppt
Relational data model
Pre-sentation.pdf
ch20 Secuity & Admin Transparencies-6E.pptx
Bt0066 dbms
1 constraints
Lesson10 Database security

More from Gyanmanjari Institute Of Technology

PDF
WD - Unit - 6 - Database Connectivity using PHP
PDF
WD - Unit - 4 - PHP Basics
PDF
WD - Unit - 5 - Session and State Management using PHP
PDF
OSV - Unit - 7 - I/O Management & Disk scheduling
PDF
WD - Unit - 2 - HTML & CSS
PDF
WD - Unit - 3 - Java Script
PDF
CNS - Unit - 10 - Web Security Threats and Approaches
PDF
OSV - Unit - 6 - Memory Management
PDF
OSV - Unit - 8 - Unix/Linux Operating System
PDF
OSV - Unit - 4 - Inter Process Communication
PDF
WD - Unit - 1 - Introduction
PDF
OSV - Unit - 5 - Deadlock
PDF
WD - Unit - 7 - Advanced Concepts
PDF
OSV - Unit - 10 - Approaches to Virtualization
PDF
Unit -3 - JavaScript (Client Side Scripting Language)
PDF
OSV - Unit - 9 - Virtualization Concepts
PDF
Unit - 1 - Introduction to Web Design
PDF
Unit - 5 - Advance Web Designing (AJAX & jQuery)
PDF
Unit - 4 - Bootstrap (HTML, CSS, and JavaScript Framework)
PDF
Unit - 2 - Hypertext Markup Language & Cascading Style Sheets
WD - Unit - 6 - Database Connectivity using PHP
WD - Unit - 4 - PHP Basics
WD - Unit - 5 - Session and State Management using PHP
OSV - Unit - 7 - I/O Management & Disk scheduling
WD - Unit - 2 - HTML & CSS
WD - Unit - 3 - Java Script
CNS - Unit - 10 - Web Security Threats and Approaches
OSV - Unit - 6 - Memory Management
OSV - Unit - 8 - Unix/Linux Operating System
OSV - Unit - 4 - Inter Process Communication
WD - Unit - 1 - Introduction
OSV - Unit - 5 - Deadlock
WD - Unit - 7 - Advanced Concepts
OSV - Unit - 10 - Approaches to Virtualization
Unit -3 - JavaScript (Client Side Scripting Language)
OSV - Unit - 9 - Virtualization Concepts
Unit - 1 - Introduction to Web Design
Unit - 5 - Advance Web Designing (AJAX & jQuery)
Unit - 4 - Bootstrap (HTML, CSS, and JavaScript Framework)
Unit - 2 - Hypertext Markup Language & Cascading Style Sheets

Recently uploaded

PPTX
DevFest Seattle 2025 - AI Native Design Patterns.pptx
PDF
Why Buildings Crumble Before Their Time And How We Can Build a Legacy
PPTX
Intrusion Detection Systems presentation.pptx
PPTX
Computer engineering for collage studen. pptx
PDF
November_2025 Top 10 Read Articles in Computer Networks & Communications.pdf
PDF
PRIZ Academy - Thinking The Skill Everyone Forgot
PPTX
CEC369 IoT P CEC369 IoT P CEC369 IoT PCEC369 IoT PCEC369 IoT P
PDF
k-means algorithm with numerical solution.pdf
PPTX
Control Structures and Looping Basics Understanding Control Flow and Loops Co...
PDF
@Regenerative braking system of DC motor
PDF
Best Marketplaces to Buy Snapchat Accounts in 2025.pdf
PDF
OOPCodesjavapracticalkabirpawarpptinparacticalexamination
PDF
ANPARA THERMAL POWER STATION[1] sangam.pdf
PDF
Advancements in Telecommunication for Disaster Management (www.kiu.ac.ug)
PDF
Small Space Big Design - Amar DeXign Scape
PDF
Grade 11 Quarter 3 Gravitational Potentional Energy
PPTX
TRANSPORTATION ENGINEERING Unit-5.2.pptx
PPTX
Lead-acid battery.pptx.........................
PPTX
2-Photoelectric effect, phenomena and its related concept.pptx
PPTX
Presentation 1.pptx WHAT IS ARTIFICIAL INTELLIGENCE?
DevFest Seattle 2025 - AI Native Design Patterns.pptx
Why Buildings Crumble Before Their Time And How We Can Build a Legacy
Intrusion Detection Systems presentation.pptx
Computer engineering for collage studen. pptx
November_2025 Top 10 Read Articles in Computer Networks & Communications.pdf
PRIZ Academy - Thinking The Skill Everyone Forgot
CEC369 IoT P CEC369 IoT P CEC369 IoT PCEC369 IoT PCEC369 IoT P
k-means algorithm with numerical solution.pdf
Control Structures and Looping Basics Understanding Control Flow and Loops Co...
@Regenerative braking system of DC motor
Best Marketplaces to Buy Snapchat Accounts in 2025.pdf
OOPCodesjavapracticalkabirpawarpptinparacticalexamination
ANPARA THERMAL POWER STATION[1] sangam.pdf
Advancements in Telecommunication for Disaster Management (www.kiu.ac.ug)
Small Space Big Design - Amar DeXign Scape
Grade 11 Quarter 3 Gravitational Potentional Energy
TRANSPORTATION ENGINEERING Unit-5.2.pptx
Lead-acid battery.pptx.........................
2-Photoelectric effect, phenomena and its related concept.pptx
Presentation 1.pptx WHAT IS ARTIFICIAL INTELLIGENCE?

Distributed DBMS - Unit 5 - Semantic Data Control

  • 1.
  • 2.
    Outlines…• Introduction ofSemantic Data Control• View Management• Authentication Control• Semantic Integrity Control• Cost of Enforcing Semantic Integrity1/11/2017 2Prof. Dhaval R. Chandarana
  • 3.
    Data Security• Datasecurity is an important function of a database system thatprotects data against unauthorized access.• Data security includes two aspects: data protection and accesscontrol.• Data protection is required to prevent unauthorized users fromunderstanding the physical content of data.• The main data protection approach is data encryption.• Access control must be refined so that different users have differentrights on the same database objects.• There are two main approaches to database access controldiscretionary (or authorization control) mandatory or multilevel.1/11/2017 3Prof. Dhaval R. Chandarana
  • 4.
    Discretionary Access Control•Three main actors are involved in discretionary access control.1. The subject (e.g., users, groups of users) who trigger the executionof application programs.2. Operations, which are embedded in application programs.3. The database objects, on which the operations are performed.1/11/2017 4Prof. Dhaval R. Chandarana
  • 5.
    Authorization control• Authorizationcontrol consists of checking whether a given triple(subject, operation, object) can be allowed to proceed.• The introduction of a subject in the system is typically done by a pair(user name, password).• The objects to protect are subsets of the database. Relational systemsprovide finer and more general protection granularity than do earliersystems.• A right expresses a relationship between a subject and an object for aparticular set of operations.GRANT <operation type(s)> ON <object> TO <subject(s)>REVOKE <operation type(s)> FROM <object> TO <subject(s)>1/11/2017 5Prof. Dhaval R. Chandarana
  • 6.
    Multilevel Access Control•Discretionary access control has some limitations. One problem isthat a malicious user can access unauthorized data through anauthorized user.• For instance, consider user A who has authorized access to relations Rand S and user B who has authorized access to relation S only. If Bsomehow manages to modify an application program used by A so itwrites R data into S, then B can read unauthorized data withoutviolating authorization rules.• Multilevel access control answers this problem and further improvessecurity by defining different security levels for both subjects anddata objects.1/11/2017 6Prof. Dhaval R. Chandarana
  • 7.
    Multilevel Access Control•process has a security level also called clearance derived from that of theuser.• In its simplest form, the security levels are Top Secret (TS), Secret (S),Confidential (C) and Unclassified (U), and ordered as TS > S >C >U, where“>” means “more secure”.• Access in read and write modes by subjects is restricted by two simplerules:Rule 1 (called “no read up”)• protects data from unauthorized disclosure, i.e., a subject at a givensecurity level can only read objects at the same or lower security levels.Rule 2 (called “no write down”)• protects data from unauthorized change, i.e., a subject at a given securitylevel can only write objects at the same or higher security levels.1/11/2017 7Prof. Dhaval R. Chandarana
  • 8.
    Distributed Access Control•The additional problems of access control in a distributedenvironment stem from the fact that objects and subjects aredistributed and that messages with sensitive data can be read byunauthorized users.• These problems are: remote user authentication, management ofdiscretionary access rules, handling of views and of user groups, andenforcing multilevel access control.• Remote user authentication is necessary since any site of adistributed DBMS may accept programs initiated, and authorized, atremote sites.1/11/2017 8Prof. Dhaval R. Chandarana
  • 9.
    Distributed Access Control•Three solutions are possible for managing authentication1. Authentication information is maintained at a central site for globalusers which can then be authenticated only once and then accessedfrom multiple sites.2. The information for authenticating users (user name and password)is replicated at all sites in the catalog.3. Intersite communication is thus protected by the use of the sitepassword. Once the initiating site has been authenticated, there isno need for authenticating their remote users.1/11/2017 9Prof. Dhaval R. Chandarana
  • 10.
    Semantic Integrity Control•Another important and difficult problem for a database system is howto guarantee database consistency.• A database state is said to be consistent if the database satisfies a setof constraints, called semantic integrity constraints.• Maintaining a consistent database requires various mechanisms suchas concurrency control, reliability, protection, and semantic integritycontrol, which are provided as part of transaction management.• Semantic integrity control ensures database consistency by rejectingupdate transactions that lead to inconsistent database states, or byactivating specific actions on the database state, which compensatefor the effects of the update transactions.1/11/2017 10Prof. Dhaval R. Chandarana
  • 11.
    Semantic Integrity Control•Two main types of integrity constraints can be distinguished:structural constraints and behavioral constraints.• Structural constraints express basic semantic properties inherent to amodel. Examples of such constraints are unique key constraints in therelational model, or one-to-many associations between objects in theobject-oriented model.• Behavioral constraints are essential in the database design process.They can express associations between objects, such as inclusiondependency in the relational model, or describe object propertiesand structures.1/11/2017 11Prof. Dhaval R. Chandarana
  • 12.
    Centralized Semantic IntegrityControl• Specification of Integrity Constraints• triggers (event-condition-action rules) can be used to automaticallypropagate updates, and thus to maintain semantic integrity.• We can distinguish between three types of integrity constraints:predefined, precondition, or general constraints.• EMP(ENO, ENAME, TITLE)• PROJ(PNO, PNAME, BUDGET)• ASG(ENO, PNO, RESP, DUR)1/11/2017 12Prof. Dhaval R. Chandarana
  • 13.
    Centralized Semantic IntegrityControl• Predefined constraints are based on simple keywords. Through them,it is possible to express concisely the more common constraints of therelational model, such as non-null attribute, unique key, foreign key,or functional dependency.• Employee number in relation EMP cannot be null.ENO NOT NULL IN EMP• The project number PNO in relation ASG is a foreign key matching theprimary key PNO of relation PROJ.PNO IN ASG REFERENCES PNO IN PROJ1/11/2017 13Prof. Dhaval R. Chandarana
  • 14.
    Centralized Semantic IntegrityControl• Precondition constraints express conditions that must be satisfied by alltuples in a relation for a given update type. The update type, which mightbe INSERT, DELETE, or MODIFY, permits restricting the integrity control.• Precondition constraints can be expressed with the SQL CHECK statementenriched with the ability to specify the update type.CHECK ON <relation name > WHEN <update type>(<qualification over relation name>)• The budget of a project is between 500K and 1000K.CHECK ON PROJ (BUDGET+ >= 500000 AND BUDGET <= 1000000)• Only the tuples whose budget is 0 may be deleted.CHECK ON PROJ WHEN DELETE (BUDGET = 0)1/11/2017 14Prof. Dhaval R. Chandarana
  • 15.
    Centralized Semantic IntegrityControl• General constraints are formulas of tuple relational calculus where allvariables are quantified. The database system must ensure that thoseformulas are always true.CHECK ON list of <variable name>:<relation name>,(<qualification>)• The total duration for all employees in the CAD project is less than100.• CHECK ON g:ASG, j:PROJ (SUM(g.DUR WHERE g.PNO=j.PNO)<100 IFj.PNAME="CAD/CAM")1/11/2017 15Prof. Dhaval R. Chandarana
  • 16.
    Distributed Semantic IntegrityControl• Definition of Distributed Integrity Constraints• Assertions can involve data stored at different sites, the storage of theconstraints must be decided so as to minimize the cost of integritychecking. There is a strategy based on a taxonomy of integrity constraintsthat distinguishes three classes:• Individual constraints: single-relation single-variable constraints. Theyrefer only to tuples to be updated independently of the rest of thedatabase.• Set-oriented constraints: include single-relation multivariable constraintssuch as functional dependency and multirelation multivariable constraintssuch as foreign key constraints• Constraints involving aggregates: require special processing because of thecost of evaluating the aggregates.1/11/2017 16Prof. Dhaval R. Chandarana
  • 17.
    Individual constraints• Considerrelation EMP, horizontally fragmented across three sitesusing the predicates and the domain constraint C: ENO < “E4”. p1 : 0 ENO < “E3” p2 : ”E3” ENO “E6” p3 : ENO > “E6”• Constraint C is compatible with p1 (if C is true, p1 is true) and p2 (if Cis true, p2 is not necessarily false), but not with p3 (if C is true, thenp3 is false). Therefore, constraint C should be globally rejectedbecause the tuples at site 3 cannot satisfy C, and thus relation EMPdoes not satisfy C.1/11/2017 17Prof. Dhaval R. Chandarana
  • 18.
    Set-oriented constraints.• Set-orientedconstraint are multivariable; that is, they involve joinpredicates.• Three cases, given in increasing cost of checking, can occur:1. The fragmentation of R is derived from that of S based on a semijoin on the attribute used in the assertion join predicate.2. S is fragmented on join attribute.3. S is not fragmented on join attribute.1/11/2017 18Prof. Dhaval R. Chandarana
  • 19.
    Set-oriented constraints.• Inthe first case, compatibility checking is cheap since the tuple of Smatching a tuple of R is at the same site.• In the second case, each tuple of R must be compared with at mostone fragment of S, because the join attribute value of the tuple of Rcan be used to find the site of the corresponding fragment of S.• In the third case, each tuple of R must be compared with allfragments of S. If compatibility is found for all tuples of R, theconstraint can be stored at each site.1/11/2017 19Prof. Dhaval R. Chandarana
  • 20.
    Constraints involving aggregates•These constraints are among the most costly to test because theyrequire the calculation of the aggregate functions.• The aggregate functions generally manipulated are MIN, MAX, SUM,and COUNT.• Each aggregate function contains a projection part and a selectionpart.1/11/2017 20Prof. Dhaval R. Chandarana

[8]ページ先頭

©2009-2025 Movatter.jp