Top Banner
Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall
24

Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Dec 14, 2015

Download

Documents

Rylee Fullam
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

Managing Multi-user Databases

David M. Kroenke

Database Processing

© 2000 Prentice Hall

Page 2: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Multi-User Issues

• Concurrency Control• Database Reliability• Database Security• Database Administration

Page 307

Page 3: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Common Multi-User DBMS

• Windows 2000– Access 2000– SQL Server– ORACLE

• UNIX– ORACLE– Sybase– Informix

Page 307

Page 4: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Concurrency Control

“making sure that one user’s work does not inappropriately influence another’s”

The need for atomic transactions “logical work performed as a unit”

Page 308

Page 5: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Concurrent Processing Problems

• Lost update problem• Inconsistent read problem

Page 312

Page 6: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Remedy for inconsistencies caused by concurrent

processing• Resource Locking“disallow sharing by locking data

that are retrieved for update”

Page 312

Page 7: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Lock Terminology

• Implicit locks placed by the DBMS• Explicit locks placed by command• Lock granularity the size of the lock• Exclusive lock from access of any type• Shared lock from change but not read

Page 312

Page 8: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Serializable Transactions

“a scheme for processing concurrent transactions”

Strategies– two-phased locking– COMMIT and ROLLBACK

commands

Page 313

Page 9: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Deadlock

“deadly embrace”; each transaction waiting for a resource that the other person has locked

Page 314

Page 10: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Lock Styles

Optimistic assumption is made that no conflict will occur

Pessimistic assumption is made that conflict will occur

Page 314

Page 11: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Transaction Isolation Levels

Page 317Figure 12-8 © 2000 Prentice Hall

Page 12: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Summary of Cursor Types

Page 319Figure 12-9© 2000 Prentice Hall

Page 13: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Database Recovery

• Via Reprocessing• Via Rollback/Rollforward

Page 320

Page 14: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Recovery Terminology

Log records of the data changes in chronological order

Before-images/After-images copy of every record before / after it was changed

Checkpoint a point of synchronization between the database and the transaction log

Page 321

Page 15: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Database Security

Page 324Figure 12-13 © 2000 Prentice Hall

Page 16: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Model of ORACLE Security

Page 325Figure 12-14a © 2000 Prentice Hall

Page 17: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Model of SQL Server Security

Page 327Figure 12-15a © 2000 Prentice Hall

Page 18: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Database Administration

• DBA database administrator– manages the database structure– manages data activity– manages the DBMS– manages the data repository

Page 329

Page 19: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Managing the Database Structure

• Configuration Control• Documentation

Page 330

Page 20: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Managing the Database Structure

Page 331Figure 12-16 © 2000 Prentice Hall

Page 21: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Managing Data Activity

Data dictionary names and formats of the data items, and their relationships

Data proponents key database users

Page 331

Page 22: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Managing Data Activity

Page 332Figure 12-17 © 2000 Prentice Hall

Page 23: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Managing the DBMS

Page 333Figure 12-18 © 2000 Prentice Hall

Page 24: Chapter 12 Managing Multi-user Databases David M. Kroenke Database Processing © 2000 Prentice Hall.

Chapter 12

© 2000 Prentice Hall

Managing the Data Repository

Data repositories collections of metadata about databases, database applications, Web pages, users, and other application components– active– passive

Page 334