This document discusses database transaction management and concurrency control. It describes the properties of transactions, interference problems that can arise from simultaneous database access like lost updates, and tools used by DBMS to prevent these issues like locks and two-phase locking. Recovery tools are also covered, including transaction logs, checkpoints, and database backups that allow recovering data after failures.
ACID properties
Atomicity, Consistency, Isolation, Durability
Transactions should possess several properties, often called the ACID properties; they should be enforced by the concurrency control and recovery methods of the DBMS.
ACID properties
Atomicity, Consistency, Isolation, Durability
Transactions should possess several properties, often called the ACID properties; they should be enforced by the concurrency control and recovery methods of the DBMS.
This presentation discusses the following topics:
Introduction to Query Processing
Need for Query processing
Architecture of Query Processing
Query Processing Steps
Phases in a typical query processing
Represented in relational structures
Translating SQL Queries into Relational Algebra
Query Optimization
Importance of Query Optimization
Actions of Query Optimization
DDBMS, characteristics, Centralized vs. Distributed Database, Homogeneous DDBMS, Heterogeneous DDBMS, Advantages, Disadvantages, What is parallel database, Data fragmentation, Replication, Distribution Transaction
The objective is to explain how a software design may be represented as a set of interacting objects that manage their own state and operations and to introduce various models that describe an object-oriented design.
This will tell about the three of the Protocols(Lock-Based Protocols, Timestamp-Based Protocols, Validation-Based Protocols) of Concurrency Control used in the database management system.
This presentation discusses the following topics:
Introduction to Query Processing
Need for Query processing
Architecture of Query Processing
Query Processing Steps
Phases in a typical query processing
Represented in relational structures
Translating SQL Queries into Relational Algebra
Query Optimization
Importance of Query Optimization
Actions of Query Optimization
DDBMS, characteristics, Centralized vs. Distributed Database, Homogeneous DDBMS, Heterogeneous DDBMS, Advantages, Disadvantages, What is parallel database, Data fragmentation, Replication, Distribution Transaction
The objective is to explain how a software design may be represented as a set of interacting objects that manage their own state and operations and to introduce various models that describe an object-oriented design.
This will tell about the three of the Protocols(Lock-Based Protocols, Timestamp-Based Protocols, Validation-Based Protocols) of Concurrency Control used in the database management system.
Transaction is a unit of program execution that accesses and possibly updates various data items.
Usually, a transaction is initiated by a user program written in a high-level data-manipulation language or programming language (for example, SQL,COBOL, C, C++, or Java), where it is delimited by statements (or function calls) of the form begin transaction and end transaction.
Transaction management and concurrency is an action or series of actions. It is performed by a single user to perform operations for accessing the contents of the database.
Distributed database system is collection of loosely coupled sites that are independeant of each other.
Distributed transaction model
Concurrency control
2 phase commit protocol
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
2. Course Learning Outcome
CLO2 : Develop a database using a
concurrency control and data recovery
technique to manage the database system.
3. Learning Outcome
¨ Describe the properties of database transaction:
a. Atomic
b. Consistent
c. Isolated
d. Durable
¨ Perform a transaction of a given database using SQL statements.
¨ Use START TRANSACTION and COMMIT statements.
¨ State the purpose of concurrency control.
¨ Explain the interference problems arise from simultaneous access to database:
a. Lost update
b. Uncommitted dependency
c. Inconsistent retrieval
¨ Describe the tools used by DBMS to prevent the interference problems : locks, Two-Phase
Locking (2PL) protocol.
¨ Describe the recovery tools:
a. Transaction log
b. Checkpoint
c. Database back-up
4. What is Transaction ?
¨ A transaction is a unit of work that should be
processed reliably without interference from other
users and without loss of data due to failures.
¨ Examples of transactions are withdrawing cash at
an ATM, making an airline reservation and
registering for a course.
5.
6.
7.
8.
9.
10.
11. Concurrency Control
¨ The purpose of concurrency control is to prevent
two different users (or two different connections by
the same user) from trying to update the same
data at the same time. Concurrency control can
also prevent one user from seeing out-of-date
data while another user is updating the same data.
12. Concurrency Control
The following examples explain why concurrency control is needed. For both examples,
suppose that your checking account contains $1,000. During the day you deposit $300 and
spend $200 from that account. At the end of the day your account should have $1,100.
¨ Example 1: No concurrency control
At 11:00 AM, bank teller #1 looks up your account and sees that you have $1,000. The
teller subtracts the $200 check, but is not able to save the updated account balance ($800)
immediately. At 11:01 AM, another teller #2 looks up your account and still sees the $1,000
balance. Teller #2 then adds your $300 deposit and saves your new account balance as
$1,300. At 11:09 AM, bank teller #1 returns to the terminal, finishes entering and saving
the updated value that is calculated to be $800. That $800 value writes over the $1300. At
the end of the day, your account has $800 when it should have had $1,100 ($1000 + 300 -
200).
¨ Example 2: Concurrency control
When teller #1 starts working on your account, a lock is placed on the account. When teller
#2 tries to read or update your account while teller #1 is updating your account, teller #2
will not be given access and gets an error message. After teller #1 has finished the update,
teller #2 can proceed. At the end of the day, your account has $1,100 ($1000 - 200 +
300).
14. Lost Update
¨ Successfully completed update is overridden by
another user.
¨ Lost updates occur when two or more transactions
select the same row and then update the row
based on the value originally selected.
¨ Each transaction is unaware of other transactions.
The last updates overwrites updates made by the
other transactions which results in lost data.
15. Uncommitted Dependency
¨ Occurs when one transaction can see intermediate
results of another transaction before it has
committed.
¨ Uncommitted dependency occurs when a second
transaction selects a row that is being updated by
another transaction.
¨ The second transaction is reading data that has not
been committed yet and may be changed by the
transaction updating the row.
16. Inconsistent Retrieval
¨ Occurs when transaction reads several values but
second transaction updates some of them during
execution of first.
17. Database Concurrency Control
Two-Phase Locking Techniques -The algorithm
(a) Locking (Growing)
(b) Unlocking (Shrinking).
¨ Locking (Growing) Phase: A transaction applies locks (read
or write) on desired data items one at a time.
¨ Unlocking (Shrinking) Phase: A transaction unlocks its locked
data items one at a time.
Requirement:
For a transaction these two phases must be mutually exclusively,
that is, during locking phase unlocking phase must not start and
during unlocking phase locking phase must not begin.
18. Slide
18-‐
18
Deadlock
¨ Deadlock prevention
¤ A transaction locks all data items it refers to before it
begins execution.
¤ This way of locking prevents deadlock since a
transaction never waits for a data item.
¤ The conservative two-phase locking uses this approach.
19. Slide
18-‐
19
Deadlock
¨ Deadlock detection and resolution
¤ In this approach, deadlocks are allowed to happen. The
scheduler maintains a wait-for-graph for detecting cycle. If a
cycle exists, then one transaction involved in the cycle is selected
(victim) and rolled-back.
¤ A wait-for-graph is created using the lock table. As soon as a
transaction is blocked, it is added to the graph. When a chain
like: Ti waits for Tj waits for Tk waits for Ti or Tj occurs, then this
creates a cycle. One of the transaction o
20. Types of Recovery Tools
¨ Transaction Log
¤ A table that contains a history of database changes.
The recovery manager uses the log table to recover
from failures.
¨ Checkpoint
¤ The act of writing a checkpoint to log and writing log
and database buffer to disk.
¨ Database Backup
¤ A copy of all or part of disk. Is used when the disk
containing the database or log is damaged.