© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 11 Managing Multi-User Databases.

Slides:



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

Database Administration Chapter Six DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Database Administration Chapter Six DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Transaction Management and Concurrency Control
Prentice Hall © COS 346 Day Agenda Questions? Assignment 8 Due Assignment 9 posted –Due April 2:05 PM Quiz 2 Today –SQL Chaps 2-19.
10 1 Chapter 10 Transaction Management and Concurrency Control Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Transaction Management and Concurrency Control
Transaction Management and Concurrency Control
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 4-1 David M. Kroenke Database Processing Chapter 9 Managing Multi- User.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 9-1 COS 346 Day 19.
© 2002 by Prentice Hall 1 SI 654 Database Application Design Winter 2003 Dragomir R. Radev.
© 2002 by Prentice Hall 1 SI 654 Database Application Design Winter 2004 Dragomir R. Radev.
DBMS Functions Data, Storage, Retrieval, and Update
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 COS 346 Day 18.
Database Administration Part 2 Chapter Six CSCI260 Database Applications.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 9-1 COS 346 Day 19.
Database Administration
Database Administration Chapter Six DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
9 Chapter 9 Transaction Management and Concurrency Control Hachim Haddouti.
Database Administration Part 1 Chapter Six CSCI260 Database Applications.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Transaction Management and Concurrency Control
10/5/1999Database Management -- R. Larson Data Administration and Database Administration University of California, Berkeley School of Information Management.
1 IT420: Database Management and Organization Transactions 31 March 2006 Adina Crăiniceanu
© 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 CHAPTER 11: DATA AND DATABASE ADMINISTRATION Modern Database Management 11 th Edition Jeffrey.
Database Administration
DBSQL 7-1 Copyright © Genetic Computer School 2009 Chapter 7 Transaction Management, Database Security and Recovery.
Multi-user Database Processing Architectures Architectures Transactions Transactions Security Security Administration Administration.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 9-1 Managing Multiuser Databases.
Recovery & Concurrency Control. What is a Transaction?  A transaction is a logical unit of work that must be either entirely completed or aborted. 
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 10 Transaction Management.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Nine: Managing Multiuser Databases 9-1 KROENKE.
1 IT420: Database Management and Organization Session Control Managing Multi-user Databases 24 March 2006 Adina Crăiniceanu
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 9/1 Copyright © 2004 Please……. No Food Or Drink in the class.
© 2002 by Prentice Hall 1 Database Administration David M. Kroenke Database Concepts 1e Chapter 6 6.
Fundamentals, Design, and Implementation, 9/e Chapter 9 Managing Multi-User Databases.
1 IT420: Database Management and Organization Managing Multi-user Databases 29 March 2006 Adina Crăiniceanu
MBA 664 Database Management Dave Salisbury ( )
TM 13-1 Copyright © 1999 Addison Wesley Longman, Inc. Data and Database Administration.
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 6-1 Chapter Objectives Understand the need for and importance of database.
Chapter 20 Transaction Management Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation and Management, 4 th Edition,
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Nine: Managing Multiuser Databases 9-1 KROENKE.
Transaction Processing Concepts
9 1 Chapter 9_B Concurrency Control Database Systems: Design, Implementation, and Management, Rob and Coronel.
10 1 Chapter 10_B Concurrency Control Database Systems: Design, Implementation, and Management, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
©Bob Godfrey, 2002, 2005 Lecture 17: Transaction Integrity and Concurrency BSA206 Database Management Systems.
3 Database Systems: Design, Implementation, and Management CHAPTER 9 Transaction Management and Concurrency Control.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Nine: Managing Multiuser Databases.
Chapter 5 Managing Multi-user Databases 1. Multi-User Issues Database Administration Concurrency Control Database Security Database Recovery Page 307.
Chapter 13 Managing Transactions and Concurrency Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
9 1 Chapter 9 Transaction Management and Concurrency Control Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
SYSTEMS IMPLEMENTATION TECHNIQUES TRANSACTION PROCESSING DATABASE RECOVERY DATABASE SECURITY CONCURRENCY CONTROL.
CSC314 Day 16 Transaction processing Concurrency Control 1.
Copyright © 2016 Pearson Education, Inc. CHAPTER 12: DATA AND DATABASE ADMINISTRATION Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman,
TM 13-1 Copyright © 1999 Addison Wesley Longman, Inc. Data and Database Administration.
David M. Kroenke and David J
Transaction Management and Concurrency Control
Database Administration
Managing Multi-user Databases
Chapter 9 Managing Multi-User Databases
Multi-User Databases Chapter 9.
Database Processing: David M. Kroenke’s Chapter Nine: Part One
Database Processing: David M. Kroenke’s Chapter Nine: Part Two
Chapter 10 Transaction Management and Concurrency Control
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Database Administration
Database Processing: David M. Kroenke’s Chapter Nine: Part Two
Presentation transcript:

© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 11 Managing Multi-User Databases

© 2002 by Prentice Hall 2 Multi-User Databases Serving the needs of multiple users and multiple applications adds complexity in… –design, –development, and –migration (future updates)

© 2002 by Prentice Hall 3 Multi-User Database Issues Interdependency –Changes required by one user may impact others Concurrency –People or applications may try to update the same information at the same time

© 2002 by Prentice Hall 4 Multi-User Database Issues Record Retention –When information should be discarded Backup/Recovery –How to protect yourself from losing critical information

© 2002 by Prentice Hall 5 Common Multi-User DBMS Windows 2000 –Access 2000 –SQL Server –ORACLE UNIX –ORACLE –Sybase –Informix

© 2002 by Prentice Hall 6 Role of the Database Administrator Organizations typically hire a database administrator (DBA) to handle the issues and complexities associated with multi-user databases. A DBA facilitates the development and use of one or more databases.

© 2002 by Prentice Hall 7 Data Administrator versus Database Administrator Data Administrator –Handle the database functions and responsibilities for the entire organization. Database Administrator (DBA) –Handle the functions associated with a specific database, including those applications served by the database.

© 2002 by Prentice Hall 8 The Characteristics of a DBA Technical –The DBA is responsible for the performance and maintenance of one or more databases. Diplomatic –The DBA must coordinate the efforts, requirements, and sometimes conflicting goals of various user groups to develop community-wide solutions.

© 2002 by Prentice Hall 9 Technical Skills of the DBA Managing the database structure Controlling concurrent processing Managing processing rights and responsibilities Developing database security Providing database recovery Managing the database management system (DBMS) Maintaining the data repository

© 2002 by Prentice Hall 10 Managing the Database Structure Managing the database structure includes configuration control and documentation regarding: –The allocation of space –Table creation –Indices creation –Storage procedures –Trigger creation

© 2002 by Prentice Hall 11 Configuration Control Post-implementation changes Procedures & Policies Address unanticipated problems

© 2002 by Prentice Hall 12 The Need for Documentation Crucial when trying to understand problems Backups and Restores Documentation provides the “paper” trail for changes

© 2002 by Prentice Hall 13 Documentation All structural changes must be carefully documented with the following: –Reason for change –Who made the changes –Specifically what was changed –How and when the changes were implemented –How were the changes tested and what were the results

© 2002 by Prentice Hall 14 Documentation Aids Version Control and Computer Assisted Software Engineering (CASE) tools automate and/or manage many tedious documentation tasks. Printing the data dictionaries after structural changes also helps eliminate many tedious documentation tasks

© 2002 by Prentice Hall 15 Controlling Concurrency Processing Concurrency control ensures that one user’s actions do not adversely impact another user’s actions At the core of concurrency is accessibility.

© 2002 by Prentice Hall 16 Aspects of Concurrency Control Rollback/Commit: Ensuring all actions are successful before posting to the database Multitasking: Simultaneously serving multiple users Lost Updates: When one user’s action overwrites another user’s request

© 2002 by Prentice Hall 17 Rollback/Commit Involve logical units of work (LUW). Commit when entire LUW successful. Rollback if any part of LUW is unsuccessful

© 2002 by Prentice Hall 18 Lost Update Problem When two or more users are attempting to update the same piece of data at the same time. Resource locking scenarios are designed to address this problem

© 2002 by Prentice Hall 19 Resource Locking A resource lock prevents a user from reading and/or writing to a piece of data The size of the piece of data (e.g., database, table, field) is termed the lock granularity

© 2002 by Prentice Hall 20 Types of Resource Locks Implicit versus Explicit Exclusive versus Shared

© 2002 by Prentice Hall 21 Two-Phased Resource Locking Two-phased locking, whereby locks are obtained as they are needed –A growing phase, whereby the transaction continues to request additional locks –A shrinking phase, whereby the transaction begins to release the locks

© 2002 by Prentice Hall 22 Deadlocks When two transactions are waiting on one another to release resources.

© 2002 by Prentice Hall 23 Avoiding Deadlocks Strategy 1: –Wait until all resources are available, then lock them all before beginning Strategy 2: –Establish and use clear locking orders/sequences Strategy 3: –Once detected, the DBMS will rollback one transaction

© 2002 by Prentice Hall 24 Resource Locking Strategies Optimistic Locking –Read data –Process transaction –Issue update –Look for conflict –If conflict occurred, rollback and repeat or else commit Pessimistic Locking –Lock required resources –Read data –Process transaction –Issue update –Release locks

© 2002 by Prentice Hall 25 Consistent Transactions Consistent transactions are often referred to by the acronym ACID –Atomic –Consistent –Isolated –Durable

© 2002 by Prentice Hall 26 ACID: Atomic A transaction consists of a series of steps. Each step must be successful for the transaction to be saved. This ensures that the transaction completes everything it intended to do before saving the changes.

© 2002 by Prentice Hall 27 ACID: Consistent No other transactions are permitted on the records until the current statement finishes This ensures that the transaction integrity has statement level consistence among all records

© 2002 by Prentice Hall 28 ACID: Isolation Within multi-user environments, different transactions may be operating on the same data. As such, the sequencing of uncommitted updates, rollbacks, and commits continuously change the data content. The 1992 ANSI SQL standards define four isolation levels and specify respective issues.

© 2002 by Prentice Hall 29 Summary of Isolation Levels

© 2002 by Prentice Hall 30 ACID: Durable Once committed, durable transactions are saved to the data permanently

© 2002 by Prentice Hall 31 Set-at-a-Time Versus Row-at-a-Time SQL statements act as filters for the entire data set. A cursor may be defined within a SQL statement to point to a particular record. Several types of cursors have been defined. The cursor type defines how the cursor behaves.

© 2002 by Prentice Hall 32 Types of Cursors

© 2002 by Prentice Hall 33 Database Security Database security strives to ensure… –Only authorized users perform authorized activities at authorized times

© 2002 by Prentice Hall 34 Managing Processing Rights and Responsibilities Processing rights define who is permitted to do what, when The individuals performing these activities have full responsibility for the implications of their actions Individuals are identified by a username and a password

© 2002 by Prentice Hall 35 Granting of Processing Rights Database users are known as an individual and as a member of one or more role Access and processing rights/privileges may be granted to an individual and/or a role Users possess the compilation of rights granted to the individual and all the roles for which they are members

© 2002 by Prentice Hall 36 Granting Privileges

© 2002 by Prentice Hall 37 Providing Database Recovery Common causes of database failures… –Hardware failures –Programming bugs –Human errors/mistakes –Malicious actions Since these issues are impossible to completely avoid, recovery procedures are essential

© 2002 by Prentice Hall 38 Database Recovery Characteristics Continuing business operations (Fall- back procedures/Continuity planning) Restore from backup Replay database activities since backup was originally made

© 2002 by Prentice Hall 39 Fall-back Procedures/ Continuity Planning The business will continue to operate even when the database is inaccessible The fall-back procedure defines how the organization will continue operations Careful attention must be paid to… –saving essential data –continuing to provide quality service

© 2002 by Prentice Hall 40 Restoring from Backup In the event that the system must be rebuilt or reloaded, the database is restored from the last full backup. Since it is inevitable that activities occurred since the last full backup was made, subsequent activities must be replayed/restored.

© 2002 by Prentice Hall 41 Recovery via Reprocessing This is a brunt-force technique. Simply re-type all activities since the backup was performed. This procedure is costly because of the effort involved in re-entering the data. This procedure is risky in that human error is likely and in that paper record-keeping may not be accurate.

© 2002 by Prentice Hall 42 Recovery via Rollback/Rollforward Most database management systems provide a mechanism to record activities into a log file.

© 2002 by Prentice Hall 43 Rollforward Activities recorded in the log files may be replayed. In doing so, all activities are re-applied to the database. This procedure is used to resynchronize restored database data. This procedure is termed a Rollforward.

© 2002 by Prentice Hall 44 Rollback Since log files save activities in sequence order, it is possible to undo activities in reserve order that they were originally executed. This is performed to correct/undo erroneous or malicious transaction(s). This procedure is known as a Rollback.

© 2002 by Prentice Hall 45 Managing the Database Management System (DBMS) In addition to controlling and maintaining the users and the data, the DBA must also maintain and monitor the DBMS itself. –Performance statistics (performance tuning/optimizing) –System and data integrity –Establishing, configuring, and maintaining database features and utilities

© 2002 by Prentice Hall 46 Maintaining the Data Repository The data repository contains metadata. Metadata is data about data. The data repository specifies the name, type, size, format, structure, definitions, and relationships among the data. They also contain the details about applications, users, add-on products, etc.

© 2002 by Prentice Hall 47 Types of Data Repositories Active data repository –The development and management tools automatically maintain and upkeep the metadata. Passive data repository –People manually maintain and upkeep the metadata

© 2002 by Prentice Hall 48 David M. Kroenke Database Processing Eighth Edition Chapter 11 Managing Multi-User Databases