Download presentation
Presentation is loading. Please wait.
Published byKelly King Modified over 9 years ago
2
This presentation prepared for MIS 421 / MBA 575 at Western Washington University. Material in this presentation drawn from Richard T. Watson, Data Management: Databases and Organization, 5 th Ed., the instructor’s experience, and other sources as noted. Some items © 2006 John Wiley & Sons. All rights reserved.
3
Data Integrity MIS 421 Dr. Steven C. Ross Fall 2011
4
Managing Organizational Memory
5
Maintaining Data Integrity Protect existence –Data are available when needed Maintain quality –Data are accurate, complete, and current Ensure confidentiality –Data are accessed only by those authorized to do so
6
Strategies for Maintaining Data Integrity Legal –Externally imposed laws, rules, and regulations Administrative –Organizational policies and procedures Technical –Functions incorporated into the system
7
Transaction Management Transaction: “a series of actions taken on the database such that they must be entirely completed or aborted.” A logical unit of work Might be a single statement or a series of statements
8
The ACID Test Atomicity –The smallest unit that must be completed, is. Consistency –The database is consistent at beginning and end of transaction. Isolation –The results of a transaction are isolated from any other transaction until complete. Durability –Once completed, the result of the transaction will not be lost.
9
Transactions in SQL BEGIN TRAN; INSERT …; UPDATE …; DELETE …; COMMIT TRAN; ROLLBACK TRAN;
10
Concurrent Update Control Protection against lost updates and phantom records Lost update –When two users make changes at the same time, both based on the original value of the data Phantom record –Status checked or statistics computed while records are being updated
11
Locking SLOCK –Shared or read lock –When an SLOCK is in place on a record … Other transactions can also issue SLOCKs, but no XLOCK will be granted Before a transaction can read a database item, it must be granted an SLOCK or XLOCK XLOCK –Exclusive or write lock –When an XLOCK is in place … No other transaction can issue either an SLOCK or XLOCK Before a transaction can write a database item, it must be granted an XLOCK
12
Locking Before locking, DBMS must know –Whether the transaction will update the database –Where the transaction begins and ends Locking granularity –Database, table, page, row, data element
13
Deadlock Occurs when users lock each other out –Usually when records are locked sequentially Prevention –Lock in advance all records affected by transaction –Two-phase protocol Locks requested during phase one Locks released during phase two Resolution –Back out of one of the processes, restart when lock available
14
Protecting Existence Goal: Data are available when needed.
15
Protecting Existence Isolation – preventive Database backup and recovery – restorative What can go wrong? –Disruptive act –Fire –IT failure –IT move/upgrade –Natural event –Power outage –Water leakage
16
Causes of Lost or Damaged Data Storage medium destruction –Damage –Overwrite or erasure Abnormal termination of an update transaction –Leaves database partially updated Incorrect data entered –By person –By program logic
17
Isolation Insulate the database –Keep data in safe places –Have multiple installations –Have security systems
18
Backup and Recovery Backup facilities Journaling facilities Recovery facility
19
Capturing Image and Log Data
20
Backup Options ObjectiveAction Complete copy of databaseDual recording of data (mirroring) Past states of the database (also known as database dumps) Database backup Changes to the databaseBefore image log or journal After image log or journal Transactions that caused a change in the state of the database Transaction log or journal
21
Recovery Strategies Switch to duplicate copy of database Backward recovery or rollback –Change current version of database to before- image state –Retry transactions Forward recovery or roll forward –Change backup version of database to after- image state Reprocess transactions –Apply transactions from transaction log
22
Maintaining Quality Goal: Data are free of defects and fit the purpose.
23
Maintaining Quality Quality data is … –Accurate –Complete –Current Data quality is … –Based on customer’s perception –Relative to task at hand
24
Fundamental Strategies for Customer-Oriented Data Quality Firm performance variation High Tracking Performance deviation e.g., airline Knowledge management Advice e.g., stock market Low Transaction processing Confirmation e.g., on-line retail Expert system Recommendation e.g., advising system LowHigh Customer uncertainty
25
Generations of Data Quality 1.Errors in existing data found and corrected. 2.Errors prevented at the source. 3.Errors are highly unlikely due to systems controls.
26
Dimensions of Data Quality Accuracy Completeness Representation consistency Organizational consistency Row consistency Timeliness Stewardship Sharing Fitness Interpretation Flexibility Precision International Accessibility Security and privacy Continuity Granularity Metadata
27
Maintaining Quality Update authorization Integrity constraints/data validation Concurrent update control
28
Update authorization Identify (authenticate) user Authorize users to perform actions on objects –Actions: INSERT, UPDATE, DELETE –Objects: tables, views, columns
29
Integrity Constraints/ Data Validation Requires clear definition of valid and invalid data Types of constraints –Data type –Field size –Acceptable values –Range of values –Character pattern –Referential integrity –Conditional –Not null –Unique
30
Ensuring Confidentiality Goal: Data are read by only certain persons.
31
Ensuring Confidentiality Data access control Encryption Monitoring
32
Model of Data Security
33
Data Access Control Identify the user (Identification or Authentication) –Match UserID with Remembered information (e.g., password) Possessed object (e.g., smart card) Personal characteristic (e.g., fingerprint) When possible, assign users to roles or groups Authorize users/roles/groups to perform actions on objects –Actions: SELECT, INSERT, UPDATE, DELETE –Objects: tables, views, columns
34
Encryption Public key encryption –Sender must have receiver’s public key –Sender uses receiver’s public key to encrypt message –Receiver uses his/her private key to decrypt message
35
Monitor Activities Persistent attempts to login Tracker queries –Use aggregate functions with multiple criteria that only apply to one record
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.