Download CHAP13

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Serializability wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Concurrency control wikipedia , lookup

Transcript
Data and Database Administration
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-1
Definitions
• Data Administration: A high-level function that is
responsible for the overall management of data
resources in an organization, including
maintaining corporate-wide definitions and
standards.
• Database Administration: A technical function that
is responsible for physical database design and for
dealing with technical issues such as security
enforcement, database performance, and backup
and recovery.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-2
Data Administration Functions
•
•
•
•
•
Data policies, procedures, standards.
Planning.
Data conflict (ownership) resolution.
Internal marketing of DA concepts.
Managing the data repository.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-3
Database Administration
Functions
• Selection of hardware and software.
• Managing data security, privacy, and
integrity.
• Data backup and recovery.
• Fig. 13-1 is a list of DA and DBA functions.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-4
Data Security
• Data Security: Protection of the data against
accidental or intentional loss, destruction, or
misuse.
• Fig. 13-2.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-5
Possible locations of data security threats
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-6
Threats to Data Security
• Accidental losses attributable to:
– Human error.
– Software failure.
– Hardware failure.
• Theft and fraud.
• Improper data access:
– Loss of privacy (personal data).
– Loss of confidentiality (corporate data).
• Loss of data integrity.
• Loss of availability (through, e.g. sabotage).
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-7
Data Management Software
Security Features
Views or subschemas.
Authorization rules.
Fig. 13-3, 4, 5.
User-defined procedures.
E.g. trigger an authorization procedure which
asks additional identification questions.
Encryption.
Authentication schemes.
Biometric devices.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-8
Authorization matrix
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-9
Backup and Recovery
Basic Recovery Facilities
Backup Facilities
Journalizing Facilities
Fig. 13-6
Transaction Log - time, records, input values.
Database Change Log - before & after images.
Checkpoint Facility
Restart point after a failure.
Recovery Manager
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-10
Database
audit trail
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-11
Recovery and Restart Procedures
• Switch - Mirrored databases.
• Restore/Rerun - Reprocess transactions
against the backup.
• Transaction Integrity - Commit or abort all
transaction changes.
• Backward Recovery (Rollback) - Apply
before images. Fig. 13-7.
• Forward Recovery (Roll Forward) - Apply
after images (preferable to restore/rerun.)
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-12
Basic recovery techniques
(a) Rollback
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-13
(b) Rollforward
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-14
Types of Database Failure
•
•
•
•
•
Fig. 13-8.
Aborted transactions.
Incorrect data.
System failure (database intact.)
Database destruction
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-15
Concurrency Control
• Concurrency Control - The process of
managing simultaneous operations against a
database so that data integrity is maintained
and the operations do not interfere with
each other in a multi-user environment.
• Lost Update Problem - Fig. 13-9.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-16
Concurrency Control Techniques
• Serializability - Finish one transaction
before starting another.
• Locking Mechanisms - Fig. 13-10.
– Locking level:
•
•
•
•
•
Database
Table
Block or page
Record
Field
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-17
Concurrency Control Techniques
– Types of locks:
• Shared lock - Read but not update permitted. Used
when just reading to prevent another user from
placing an exclusive lock on the record.
• Exclusive lock - No access permitted. Used when
preparing to update.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-18
Deadlock
• Deadlock - Transactions wait for each other
to release needed resources. Fig. 13-11, 12.
• Deadlock prevention:
– Lock all records required at the beginning of a
transaction
– Two-phase locking protocol
• Growing phase.
• Shrinking phase.
– May be difficult to determine all needed
resources in advance.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-19
Deadlock
• Deadlock Resolution:
– Allow deadlocks to occur.
– Mechanisms for detecting and breaking them.
• Resource usage matrix.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-20
Concurrency Control Techniques
• Versioning:
– Optimistic approach to concurrency control.
– Assumption is that simultaneous updates will
be infrequent.
– Each transaction can attempt an update as it
wishes.
– The system will reject an update when it senses
a conflict.
– Fig. 13-13.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-21
Managing Data Quality
• Data Steward - Liaisons between IT and
business units.
• Five Data Quality Issues:
Security policy and disaster recovery.
Personnel controls.
Physical access controls.
Maintenance controls (hardware & software.)
Data protection and privacy.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-22
Data Dictionaries and
Repositories
•
•
•
•
•
Passive data dictionary.
Active data dictionary.
Relational catalog.
Repository (CASE tools).
Information Repository Dictionary System
(IRDS) - standards for dictionary storage
and access.
Copyright © 1999 Addison Wesley Longman, Inc.
TM 13-23