Database Administration

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.
Getting Started (Excerpts) Chapter One DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 11 Managing Multi-User Databases.
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
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.
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.
Ch 10: Transaction Management and Concurrent Control.
1 IT420: Database Management and Organization Session Control Managing Multi-user Databases 24 March 2006 Adina Crăiniceanu
Concurrency Control. Objectives Management of Databases Concurrency Control Database Recovery Database Security Database Administration.
Transactions and Locks A Quick Reference and Summary BIT 275.
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
© 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 8 Slide 1 IT 390 Business Database Administration Unit 8:
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 6-1 Chapter Objectives Understand the need for and importance of database.
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Nine: Managing Multiuser Databases 9-1 KROENKE.
Module 11: Managing Transactions and Locks
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
Module 14: Managing Transactions and Locks. Overview Introducing Transactions and Locks Managing Transactions Understanding SQL Server Locking Architecture.
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.
Locks, Blocks & Isolation Oh My!. About Me Keith Tate Data Professional for over 14 Years MCITP in both DBA and Dev tracks
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,
Chapter 8 Database Redesign
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.
Transaction Management
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
Transactions and Concurrency
Database Processing: David M. Kroenke’s Chapter Nine: Part Two
Concurrency Control.
Transactions, Properties of Transactions
Presentation transcript:

Database Administration DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition Chapter Six Database Administration

Chapter Objectives Understand the need for and importance of database administration Learn different ways of processing a database Understand the need for concurrency control, security, and backup and recovery Learn typical problems that can occur when multiple users process a database concurrently Understand the use of locking and the problem of deadlock Understand the use of locking and the problem of deadlock DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Chapter Objectives (continued) Learn the difference between optimistic and pessimistic locking Know the meaning of ACID transaction Learn the four 1992 ANSI standard isolation levels Understand the need for security and learn a generalized model of database security Know the difference between DBMS and application security Know the difference between recovery via reprocessing and recovery via rollback/rollforward DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Chapter Objectives (continued) Understand the nature of the tasks required for recovery using rollback/rollforward Know basic administrative and managerial DBA functions DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Database Processing Environment A database processing environment is complicated and multi-faceted Multiple users Multiple queries Multiple forms Multiple reports Multiple application programs DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Processing Constraints Enforcing referential integrity Cascading deletion Cascading modifications Data type constraints Data size constraints Data value constraints Null constraints Uniqueness constraints DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Internet Application Processing Internet Application Processing is more complicated than traditional application processing Specifically, with Internet Application Processing … The network becomes an integral part of the application DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

The Database Processing Environment DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Stored Procedures and Triggers A stored procedure is a module similar to subroutine or function that performs database actions Stored in the database itself A trigger is a stored procedure that is automatically invoked by the DBMS when a specified activity occurs BEFORE, AFTER and INSTEAD OF DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Control, Security and Reliability Three necessary database administration functions Concurrency control Security Backup and Recovery DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Concurrency Control Concurrency control ensures that one user’s actions do not adversely impact another user’s actions At the core of concurrency is accessibility. In one extreme, data becomes inaccessible once a user touches the data. This ensures that data that is being considered for update is not shown. In the other extreme, data is always readable. The data is even readable when it is locked for update. DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Concurrency Control (continued) Interdependency Changes required by one user may impact others Concurrency People or applications may try to update the same information at the same time Record retention When information should be discarded DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Need for Atomic Transactions A database operation typically involves several transactions. These transactions are atomic and are sometimes called logical units of work (LUW). Before an operation is committed to the database, all LUWs must successfully complete. If one or more LUW is unsuccessful, a rollback is performed and no changes are saved to the database. DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Lost Update Problem If two or more users are attempting to update the same piece of data at the same time, it is possible that one update may overwrite another update. DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Concurrency Issues Dirty reads Inconsistent reads Phantom reads The transaction reads a changed record that has not been committed to the database Inconsistent reads The transaction re-reads a data set and finds that the data has changed Phantom reads The transaction re-reads a data set and finds that a new record has been added DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Resource Locking To avoid concurrency issues, resource locking will disallow transactions from reading, modifying, and/or writing to a data set that has been “locked” DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Implicit versus Explicit Resource Locking Implicit locks are issued automatically by the DBMS based on an activity Explicit locks are issued by users requesting exclusive rights to the data DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Serializable Transactions (Two-Phased 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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Deadlock As a transaction begins to lock resources, it may have to wait for a particular resource to be released by another transaction On occasions, two transactions may indefinitely wait on each another to release resources. This condition is known as a deadlock or a deadly embrace DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Optimistic versus Pessimistic Locking Read data Process transaction Issue update Look for conflict If conflict occurred, rollback and repeat Else commit Pessimistic Locking Lock required resources Read data Process transaction Issue commit Release locks DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Consistent Transactions Consistent transactions are often referred to by the acronym ACID Atomic Consistent Isolated Durable DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

ACID: Consistent No other transactions are permitted on the records until the current transaction finishes This ensures that the transaction integrity has statement level consistency among all records DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

ACID: Isolation Within multiuser 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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

ACID: Durable A durable transaction is one in which all committed changes are permanent DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

1992 ANSI SQL Isolation levels DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Database Security Database Security strives to ensure: Only authorized users Perform authorized activities At authorized times DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Database Security Guidelines Run the DBMS behind a firewall Apply the latest operating system and DBMS service packs and patches Limit DBMS functionality to needed features Protect the computer that runs the DBMS Manage accounts and passwords DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

DBMS Security (Granting Permissions) Database users are known as an individual and as a member of one or more role Granting 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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Application Security Beyond providing generic access limitations to users, an application may introduce specific access rights for particular users. DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

A Model of DBMS Security DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Database Backup and 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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Recovery via Reprocessing In reprocessing, all activities since the backup was performed are redone This is a brunt-force technique This procedure is costly in 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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Recovery via Rollback and Rollforward Most database management systems provide a mechanism to record activities into a log file DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

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 DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Rollback Since log files save activities in sequence order, it is possible to undo activities in reverse order that they were originally executed This is performed to correct/undo erroneous or malicious transaction(s) This procedure is known as a Rollback DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

Database Administration DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition End of Presentation on Chapter Six Database Administration