Security and Transaction Nhi Tran CS 157B - Dr. Lee Fall, 2003.

Slides:



Advertisements
Similar presentations
Lecture plan Transaction processing Concurrency control
Advertisements

TRANSACTION PROCESSING SYSTEM ROHIT KHOKHER. TRANSACTION RECOVERY TRANSACTION RECOVERY TRANSACTION STATES SERIALIZABILITY CONFLICT SERIALIZABILITY VIEW.
CSC271 Database Systems Lecture # 32.
Lock-Based Concurrency Control
Transaction Management Transparencies
Database Administration and Security Transparencies 1.
Lecture 11 Recoverability. 2 Serializability identifies schedules that maintain database consistency, assuming no transaction fails. Could also examine.
1 CSIS 7102 Spring 2004 Lecture 8: Recovery (overview) Dr. King-Ip Lin.
Database Systems, 8 th Edition Concurrency Control with Time Stamping Methods Assigns global unique time stamp to each transaction Produces explicit.
Security Dale-Marie Wilson, Ph.D.. Why Database Security? Data Valuable resource Must be strictly controlled and managed Corporate resource Have strategic.
Transaction Management and Concurrency Control
Concurrency Control. R/RR/W W/W User 2 ReadWrite User 1 Read Write R/W: Inconsistent Read problem. W/W: Lost Update problem.
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
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Chapter 17: Transaction Management
1 Minggu 7, Pertemuan 13 Security Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
What is a Transaction? Logical unit of work
Transaction Management
1 Transaction Management Database recovery Concurrency control.
1 Minggu 8, Pertemuan 15 Transaction Management Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
DBMS Functions Data, Storage, Retrieval, and Update
Chapter 9 Transaction Management and Concurrency Control
Chapter 8 Security Transparencies © Pearson Education Limited 1995, 2005.
9 Chapter 9 Transaction Management and Concurrency Control Hachim Haddouti.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Chapter 19 Security Transparencies © Pearson Education Limited 1995, 2005.
Transactions and Recovery
DATABASE SECURITY By Oscar Suciadi CS 157B Prof. Sin-Min Lee.
Chapter 19 Security Transparencies. 2 Chapter 19 - Objectives Scope of database security. Why database security is a serious concern for an organization.
© Pearson Education Limited, Chapter 5 Database Administration and Security Transparencies.
© 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 CHAPTER 11: DATA AND DATABASE ADMINISTRATION Modern Database Management 11 th Edition Jeffrey.
ISOM MIS3150 Data and Info Mgmt Database Security Arijit Sengupta.
DBSQL 7-1 Copyright © Genetic Computer School 2009 Chapter 7 Transaction Management, Database Security and Recovery.
1 Chapter 6 : Transaction Management Pearson Education © 2009.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 10 Transaction Management.
Chapterb19 Transaction Management Transaction: An action, or series of actions, carried out by a single user or application program, which reads or updates.
Databases Illuminated
Lecture 12 Recoverability and failure. 2 Optimistic Techniques Based on assumption that conflict is rare and more efficient to let transactions proceed.
1 Chapter 20 Transaction Management Transparencies Last Updated: 17 th March 2011 By M. Arief
11/7/2012ISC329 Isabelle Bichindaritz1 Transaction Management & Concurrency Control.
CSCI 3140 Module 6 – Database Security Theodore Chiasson Dalhousie University.
11/4/2012ISC239 Isabelle Bichindaritz1 Database Security.
II.I Selected Database Issues: 2 - Transaction ManagementSlide 1/20 1 II. Selected Database Issues Part 2: Transaction Management Lecture 4 Lecturer: Chris.
The Relational Model1 Transaction Processing Units of Work.
TM 13-1 Copyright © 1999 Addison Wesley Longman, Inc. Data and Database Administration.
Chapter 20 Transaction Management Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation and Management, 4 th Edition,
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
9 1 Chapter 9_B Concurrency Control Database Systems: Design, Implementation, and Management, Rob and Coronel.
NOEA/IT - FEN: Databases/Transactions1 Transactions ACID Concurrency Control.
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.
3 Database Systems: Design, Implementation, and Management CHAPTER 9 Transaction Management and Concurrency Control.
Chapter 13 Managing Transactions and Concurrency Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Database Security Threats. Database An essential corporate resource Data is a valuable resource Must be strictly controlled, managed and secured May have.
SYSTEMS IMPLEMENTATION TECHNIQUES TRANSACTION PROCESSING DATABASE RECOVERY DATABASE SECURITY CONCURRENCY CONTROL.
Copyright © 2016 Pearson Education, Inc. CHAPTER 12: DATA AND DATABASE ADMINISTRATION Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman,
Transaction Management and Concurrency Control
By Oscar Suciadi CS 157B Prof. Sin-Min Lee
Transaction Management Transparencies
By Oscar Suciadi CS 157B Prof. Sin-Min Lee
Transaction Management
Transaction Properties
Chapter 10 Transaction Management and Concurrency Control
Database Security Transactions
Introduction of Week 13 Return assignment 11-1 and 3-1-5
By Oscar Suciadi CS 157B Prof. Sin-Min Lee
Transaction management
Presentation transcript:

Security and Transaction Nhi Tran CS 157B - Dr. Lee Fall, 2003

Database Security is the mechanisms that protect the database against intentional or accidental threats. A threat is any situation or event, whether intentional or accidental, that will adversely affect a system and consequently an organization.

Database security is concerned with avoiding the following situations: Theft and fraud Loss of confidentiality Loss of privacy Loss of integrity Loss of availability

Computer-based security controls for multi-user environment Authorization Views Backup and recovery Integrity Encryption RAID technology

Authorization The granting of a right or privilege that enables a subject to have legitimate access to a system or a system’s object. Authentication A mechanism that determines whether a user is who he or she claims to be.

View A view is the dynamic result of one or more relational operations operating on the base relations to produce another relation.

Backup and Recovery The process of periodically taking a copy of the database and log file on to offline storage media.

Integrity Integrity constraints contribute to maintaining a secure database system by preventing data from becoming invalid, and hence giving misleading or incorrect results.

Encryption The encoding of the data by a special algorithm that renders the data unreadable by any program without the decryption key. Symmetric encryption A technique uses the same key for both encryption and decryption and relies on safe communication lines for exchanging the key. Asymmetric encryption A technique uses different keys for encryption and decryption.

RAID Redundant Array of Independent Disks RAID works on having a large disk array comprising an arrangement of several independent disks that are organized to improve reliability and at the same time increase performance. Performance is increased through data striping: the data is segmented into equal size partitions (striping unit) which are transparently distributed across multiple disks. Reliability is improved through storing redundant information across the disks using a parity scheme or an error-correcting scheme.

Functions are intended to ensure the database is reliable and remains in a consistent state: Transaction support Concurrency control service Recovery services

Transaction Support Transaction: The execution of a program that access or change the contents of database. Two possible outcomes Committed Transactions can terminate successfully. Aborted Transactions terminate unsuccessfully. Aborted transactions must be undone or roll back.

Properties of Transactions (ACID) Atomicity: A transaction is either performed in its entirety or is not performed at all. It is the responsibility of the recovery subsystem of the DBMS to ensure atomicity. Consistency: A transaction must transform the database from one consistent state to another consistent state. It is the responsibility of DBMS and the application developer to ensure consistency.

Transaction Properties (cont’d) Isolation: Transactions execute independently of one another. It is the responsibility of the concurrency control subsystem to ensure isolation. Durability: A successfully completed (committed) transaction are permanently recorded in the database. It is the responsibility of the recovery subsystem to ensure durability.

Concurrency Control: The process of managing simultaneous operations on the database without having them interfere with one another.

Potential problems caused by concurrency Lost update problem An apparently successfully completed update operation by one user can be overridden by another user. Uncommitted dependency problem It occurs when one transaction is allowed to see the intermediate results of another transaction before it has committed. Inconsistent analysis problem It occurs when a transaction reads several values from the database but a second transaction updates some of them during the execution of the first.

The objective of Serializability is to find non- serial schedules that allow transactions to execute concurrently without interfering with one another, and thereby produce a database state that could be produce by a serial execution. Schedule shows the sequence of the operations of transaction. Serial schedule: A schedule where the operations of each transaction are executed consecutively without any interleaved operations from other transactions. Non-serial schedule: A schedule where the operations from a set of concurrent transactions are interleaved.

Two methods guarantee serializability Two-phase locking Timestamping Locking A procedure used to control current access to data. When one transaction is accessing the database, a lock may deny access to other transaction to prevent incorrect results. Shared lock: If a transaction has a shared lock on a data item, it can read the item but not update it. Exclusive lock: If a transaction has an exclusive lock on a data item, it can both read and update the item.

Two-phase locking A transaction follows the two-phase locking protocol if all locking operations precede the first unlock operation in the transaction. Growing phase It acquires all the locks needed but cannot release any locks. Shrinking phase It releases its locks but cannot acquire any new locks.

Two-phase locking (cont’d) It never releases any lock until it has reached the stage where no new locks are needed. The rules are: A transaction must acquire a lock on an item before operating on the item. The lock may be read or write, depending on the type of access needed. Once the transaction releases a lock, it can never acquire any new locks.

Problems with two-phase locking Cascading rollback The situation, in which a single transaction leads to a series of rollbacks. Deadlock It occurs when two or more transactions are waiting to access data the other transaction has locked.

Solutions to the problems with two- phase locking. Cascading rollback Deadlock Rigorous 2PL Leave the release of all locks until the end of the transaction. Strict 2PL Only holds exclusive locks until the end of the transaction Timeouts The transaction requires a lock waits for at most a specified period of time Deadlock prevention DBMS looks ahead to determine if a transaction would cause a dead lock, and never allows deadlock to occur Deadlock detection and recovery DBMS allows deadlock to occur but recognizes occurrences of deadlock and break them.

Timestamping A concurrency control protocol that orders transactions in such a way that older transactions get priority in the event of conflict.

Timestamps and locking Generally, timestamping is superior in situations where either most transactions are read-only, or it is rare that concurrent transactions will try to read and write the same element. In high-conflict situations, locking performs better. Locking will frequently delay transactions as they wait for locks, and can even lead to deadlocks where several transactions for a long time, and then one has to be rolled back. But if concurrent transactions frequently read and write elements in common, then rollbacks will be frequently, introducing even more delay than a locking system.

Database Recovery The process of restoring the database to a correct state in the event of a failure. The storage of data generally includes four different types of media with an increasing degree of reliability: Main memory Magnetic disk Magnetic tape Optical disk

Causes of failure System crush due to hardware or software errors, resulting in loss of main memory Media failures, such as head crashes or unreadable media, resulting in the loss of parts of secondary storage Application software errors, such as logical errors in the program that is accessing the database, which cause one or more transactions to fail Natural physical disasters, such as fires, floods, earthquakes, or power failures Carelessness or unintentional destruction of data or facilities by operator or users Sabotage or intentional corruption or destruction of data, hardware, or software facilities.

Recovery Techniques Maintain a log file containing transactions records that identify the start/end of transactions and the before-and after-images of the write operation. Using deferred update, writes are done initially to the log only and log records are used to perform actual updates to the database. If the system fails, it examines the log to determine which transactions it needs to redo, but there is no need to undo any writes. Using immediate updates, an update may be made to the database itself any time after a long record is written. The log can be used to undo and redo transactions in the event of failure.

Thank You! Have a Nice Day! *_*