SlideShare une entreprise Scribd logo
1  sur  32
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/1
Outline
• Introduction
• Background
• Distributed Database Design
• Database Integration
• Semantic Data Control
• Distributed Query Processing
• Multidatabase Query Processing
• Distributed Transaction Management
➡ Transaction Concepts and Models
➡ Distributed Concurrency Control
➡ Distributed Reliability
• Data Replication
• Parallel Database Systems
• Distributed Object DBMS
• Peer-to-Peer Data Management
• Web Data Management
• Current Issues
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/2
Transaction
A transaction is a collection of actions that make consistent transformations
of system states while preserving system consistency.
➡ concurrency transparency
➡ failure transparency
Database in a
consistent
state
Database may be
temporarily in an
inconsistent state
during execution
Begin
Transaction
End
Transaction
Execution of
Transaction
Database in a
consistent
state
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/3
Transaction Example –
A Simple SQL Query
Transaction BUDGET_UPDATE
begin
EXEC SQL UPDATE PROJ
SET BUDGET = BUDGET 1.1
WHERE PNAME = “CAD/CAM”
end.
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/4
Example Database
Consider an airline reservation example with the relations:
FLIGHT(FNO, DATE, SRC, DEST, STSOLD, CAP)
CUST(CNAME, ADDR, BAL)
FC(FNO, DATE, CNAME,SPECIAL)
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/5
Example Transaction – SQL
Version
Begin_transaction Reservation
begin
input(flight_no, date, customer_name);
EXEC SQL UPDATE FLIGHT
SET STSOLD = STSOLD + 1
WHERE FNO = flight_no AND DATE = date;
EXEC SQL INSERT
INTO FC(FNO, DATE, CNAME, SPECIAL);
VALUES (flight_no, date, customer_name, null);
output(“reservation completed”)
end . {Reservation}
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/6
Termination of Transactions
Begin_transaction Reservation
begin
input(flight_no, date, customer_name);
EXEC SQL SELECT STSOLD,CAP
INTO temp1,temp2
FROM FLIGHT
WHERE FNO = flight_no AND DATE = date;
if temp1 = temp2 then
output(“no free seats”);
Abort
else
EXEC SQL UPDATE FLIGHT
SET STSOLD = STSOLD + 1
WHERE FNO = flight_no AND DATE = date;
EXEC SQL INSERT
INTO FC(FNO, DATE, CNAME, SPECIAL);
VALUES (flight_no, date, customer_name, null);
Commit
output(“reservation completed”)
endif
end . {Reservation}
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/7
Example Transaction –
Reads & Writes
Begin_transaction Reservation
begin
input(flight_no, date, customer_name);
temp Read(flight_no(date).stsold);
if temp = flight(date).cap then
begin
output(“no free seats”);
Abort
end
else begin
Write(flight(date).stsold, temp + 1);
Write(flight(date).cname, customer_name);
Write(flight(date).special, null);
Commit;
output(“reservation completed”)
end
end. {Reservation}
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/8
Characterization
• Read set (RS)
➡ The set of data items that are read by a transaction
• Write set (WS)
➡ The set of data items whose values are changed by this transaction
• Base set (BS)
➡ RS WS
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/9
Formalization
Let
➡ Oij(x) be some operation Oj of transaction Ti operating on entity x, where
Oj {read,write} and Oj is atomic
➡ OSi = j Oij
➡ Ni {abort,commit}
Transaction Ti is a partial order Ti = { i, ≺i} where
 i = OSi {Ni}
 For any two operations Oij , Oik OSi , if Oij = R(x) and Oik = W(x) for any
data item x, then either Oij ≺i Oik or Oik ≺i Oij
 Oij OSi, Oij ≺i Ni
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/10
Example
Consider a transaction T:
Read(x)
Read(y)
x x + y
Write(x)
Commit
Then
= {R(x), R(y), W(x), C}
≺ = {(R(x), W(x)), (R(y), W(x)), (W(x), C), (R(x), C), (R(y), C)}
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/11
Assume
≺ = {(R(x),W(x)), (R(y),W(x)), (W(x), C), (R(x), C), (R(y), C)}
DAG Representation
R(x)
C
R(y)
W(x)
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/12
Principles of Transactions
ATOMICITY
➡ all or nothing
CONSISTENCY
➡ no violation of integrity constraints
ISOLATION
➡ concurrent changes invisible serializable
DURABILITY
➡ committed updates persist
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/13
Atomicity
• Either all or none of the transaction's operations are performed.
• Atomicity requires that if a transaction is interrupted by a failure, its
partial results must be undone.
• The activity of preserving the transaction's atomicity in presence of
transaction aborts due to input errors, system overloads, or deadlocks is
called transaction recovery.
• The activity of ensuring atomicity in the presence of system crashes is
called crash recovery.
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/14
Consistency
• Internal consistency
➡ A transaction which executes alone against a consistent database leaves it in a
consistent state.
➡ Transactions do not violate database integrity constraints.
• Transactions are correct programs
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/15
Consistency Degrees
• Degree 0
➡ Transaction T does not overwrite dirty data of other transactions
➡ Dirty data refers to data values that have been updated by a transaction prior
to its commitment
• Degree 1
➡ T does not overwrite dirty data of other transactions
➡ T does not commit any writes before EOT
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/16
Consistency Degrees (cont’d)
• Degree 2
➡ T does not overwrite dirty data of other transactions
➡ T does not commit any writes before EOT
➡ T does not read dirty data from other transactions
• Degree 3
➡ T does not overwrite dirty data of other transactions
➡ T does not commit any writes before EOT
➡ T does not read dirty data from other transactions
➡ Other transactions do not dirty any data read by T before T completes.
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/17
Isolation
• Serializability
➡ If several transactions are executed concurrently, the results must be the same
as if they were executed serially in some order.
• Incomplete results
➡ An incomplete transaction cannot reveal its results to other transactions
before its commitment.
➡ Necessary to avoid cascading aborts.
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/18
Isolation Example
• Consider the following two transactions:
T1: Read(x) T2: Read(x)
x x+1 x x+1
Write(x) Write(x)
Commit Commit
T1: Read(x) T1: Read(x)
T1: x x+1 T1: x x+1
T1: Write(x) T2: Read(x)
T1: Commit T1: Write(x)
T2: Read(x) T2: x x+1
T2: x x+1 T2: Write(x)
T2: Write(x) T1: Commit
T2: Commit T2: Commit
• Possible execution sequences:
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/19
SQL-92 Isolation Levels
Phenomena:
• Dirty read
➡ T1 modifies x which is then read by T2 before T1 terminates; T1 aborts T2 has
read value which never exists in the database.
• Non-repeatable (fuzzy) read
➡ T1 reads x; T2 then modifies or deletes x and commits. T1 tries to read x again
but reads a different value or can’t find it.
• Phantom
➡ T1 searches the database according to a predicate while T2 inserts new tuples
that satisfy the predicate.
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/20
SQL-92 Isolation Levels (cont’d)
• Read Uncommitted
➡ For transactions operating at this level, all three phenomena are possible.
• Read Committed
➡ Fuzzy reads and phantoms are possible, but dirty reads are not.
• Repeatable Read
➡ Only phantoms possible.
• Anomaly Serializable
➡ None of the phenomena are possible.
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/21
Durability
• Once a transaction commits, the system must guarantee that the results of
its operations will never be lost, in spite of subsequent failures.
• Database recovery
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/22
Characterization of Transactions
• Based on
➡ Application areas
✦ Non-distributed vs. distributed
✦ Compensating transactions
✦ Heterogeneous transactions
➡ Timing
✦ On-line (short-life) vs batch (long-life)
➡ Organization of read and write actions
✦ Two-step
✦ Restricted
✦ Action model
➡ Structure
✦ Flat (or simple) transactions
✦ Nested transactions
✦ Workflows
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/23
Transaction Structure
• Flat transaction
➡ Consists of a sequence of primitive operations embraced between a begin and
end markers.
Begin_transaction Reservation
…
end.
• Nested transaction
➡ The operations of a transaction may themselves be transactions.
Begin_transaction Reservation
…
Begin_transaction Airline
…
end. {Airline}
Begin_transaction Hotel
…
end. {Hotel}
end. {Reservation}
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/24
Nested Transactions
• Have the same properties as their parents may themselves have other
nested transactions.
• Introduces concurrency control and recovery concepts to within the
transaction.
• Types
➡ Closed nesting
✦ Subtransactions begin after their parents and finish before them.
✦ Commitment of a subtransaction is conditional upon the commitment of the
parent (commitment through the root).
➡ Open nesting
✦ Subtransactions can execute and commit independently.
✦ Compensation may be necessary.
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/25
Workflows
• “A collection of tasks organized to accomplish some business process.”
• Types
➡ Human-oriented workflows
✦ Involve humans in performing the tasks.
✦ System support for collaboration and coordination; but no system-wide
consistency definition
➡ System-oriented workflows
✦ Computation-intensive & specialized tasks that can be executed by a computer
✦ System support for concurrency control and recovery, automatic task execution,
notification, etc.
➡ Transactional workflows
✦ In between the previous two; may involve humans, require access to
heterogeneous, autonomous and/or distributed systems, and support selective
use of ACID properties
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/26
Workflow Example
T1 T2
T3
T4
T5
Customer
Database
Customer
Database
Customer
Database
T1: Customer request
obtained
T2: Airline reservation
performed
T3: Hotel reservation
performed
T4: Auto reservation
performed
T5: Bill generated
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/27
Transactions Provide…
• Atomic and reliable execution in the presence of failures
• Correct execution in the presence of multiple user accesses
• Correct management of replicas (if they support it)
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/28
Transaction Processing Issues
• Transaction structure (usually called transaction model)
➡ Flat (simple), nested
• Internal database consistency
➡ Semantic data control (integrity enforcement) algorithms
• Reliability protocols
➡ Atomicity & Durability
➡ Local recovery protocols
➡ Global commit protocols
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/29
Transaction Processing Issues
• Concurrency control algorithms
➡ How to synchronize concurrent transaction executions (correctness criterion)
➡ Intra-transaction consistency, Isolation
• Replica control protocols
➡ How to control the mutual consistency of replicated data
➡ One copy equivalence and ROWA
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/30
Architecture Revisited
Scheduling/
Descheduling
Requests
Transaction Manager
(TM)
Distributed
Execution Monitor
With other
SCs
With other
TMs
Begin_transaction,
Read, Write,
Commit, Abort
To data
processor
Results
Scheduler
(SC)
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/31
Centralized Transaction
Execution
Begin_Transaction,
Read, Write, Abort, EOT
Results &
User Notifications
Scheduled
Operations
Results
Results
…
Read, Write,
Abort, EOT
User
Application
User
Application
Transaction
Manager
(TM)
Scheduler
(SC)
Recovery
Manager
(RM)
Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/32
Distributed Transaction Execution
Begin_transaction,
Read, Write, EOT,
Abort
User application
Results &
User notifications
Read, Write,
EOT, Abort
TM
SC
RM
SC
RM
TM
Local
Recovery
Protocol
Distributed
Concurrency Control
Protocol
Replica Control
Protocol
Distributed
Transaction Execution
Model

Contenu connexe

Tendances

Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMSMegha Patel
 
Database ,14 Parallel DBMS
Database ,14 Parallel DBMSDatabase ,14 Parallel DBMS
Database ,14 Parallel DBMSAli Usman
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlAbDul ThaYyal
 
Transactions (Distributed computing)
Transactions (Distributed computing)Transactions (Distributed computing)
Transactions (Distributed computing)Sri Prasanna
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency ControlDamian T. Gordon
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query OptimizationAli Usman
 
2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOLKABILESH RAMAR
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Ra'Fat Al-Msie'deen
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESAAKANKSHA JAIN
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control TechniquesRaj vardhan
 
Databases: Locking Methods
Databases: Locking MethodsDatabases: Locking Methods
Databases: Locking MethodsDamian T. Gordon
 
Overview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed DatabasesOverview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed DatabasesMeghaj Mallick
 
Load Balancing in Parallel and Distributed Database
Load Balancing in Parallel and Distributed DatabaseLoad Balancing in Parallel and Distributed Database
Load Balancing in Parallel and Distributed DatabaseMd. Shamsur Rahim
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Gyanmanjari Institute Of Technology
 
Recovery in Multi database Systems
Recovery in Multi database SystemsRecovery in Multi database Systems
Recovery in Multi database SystemsMoutasm Tamimi
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query ProcessingMythili Kannan
 
Introduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and RecoveryIntroduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and RecoveryAjit Nayak
 

Tendances (20)

Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
Database ,14 Parallel DBMS
Database ,14 Parallel DBMSDatabase ,14 Parallel DBMS
Database ,14 Parallel DBMS
 
Chapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency controlChapter 12 transactions and concurrency control
Chapter 12 transactions and concurrency control
 
Transactions (Distributed computing)
Transactions (Distributed computing)Transactions (Distributed computing)
Transactions (Distributed computing)
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency Control
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query Optimization
 
2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
 
Concurrency Control Techniques
Concurrency Control TechniquesConcurrency Control Techniques
Concurrency Control Techniques
 
Databases: Locking Methods
Databases: Locking MethodsDatabases: Locking Methods
Databases: Locking Methods
 
Process synchronization in operating system
Process synchronization in operating systemProcess synchronization in operating system
Process synchronization in operating system
 
Deadlock in database
Deadlock in databaseDeadlock in database
Deadlock in database
 
Overview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed DatabasesOverview of Concurrency Control & Recovery in Distributed Databases
Overview of Concurrency Control & Recovery in Distributed Databases
 
Load Balancing in Parallel and Distributed Database
Load Balancing in Parallel and Distributed DatabaseLoad Balancing in Parallel and Distributed Database
Load Balancing in Parallel and Distributed Database
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
 
Recovery in Multi database Systems
Recovery in Multi database SystemsRecovery in Multi database Systems
Recovery in Multi database Systems
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query Processing
 
Introduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and RecoveryIntroduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and Recovery
 
Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 

En vedette

Database ,16 P2P
Database ,16 P2P Database ,16 P2P
Database ,16 P2P Ali Usman
 
Database ,2 Background
 Database ,2 Background Database ,2 Background
Database ,2 BackgroundAli Usman
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction Ali Usman
 
Ethernet Technology
Ethernet Technology Ethernet Technology
Ethernet Technology Ali Usman
 
Coyaima ie. juan xxiii manual de convivencia
Coyaima ie. juan xxiii manual de convivenciaCoyaima ie. juan xxiii manual de convivencia
Coyaima ie. juan xxiii manual de convivenciasebasecret
 
Virgen de Chiquinquirá en Colombia
Virgen de Chiquinquirá en ColombiaVirgen de Chiquinquirá en Colombia
Virgen de Chiquinquirá en ColombiaMaria Daud
 
Anwar e-sabiri(complete)
Anwar e-sabiri(complete)Anwar e-sabiri(complete)
Anwar e-sabiri(complete)Ali Usman
 
Hank Iving Media Plan
Hank Iving Media PlanHank Iving Media Plan
Hank Iving Media Planconfar90
 
Mariquita iet francisco nuñez pedrozo manual convivencia antiguo
Mariquita iet francisco nuñez pedrozo manual convivencia antiguoMariquita iet francisco nuñez pedrozo manual convivencia antiguo
Mariquita iet francisco nuñez pedrozo manual convivencia antiguosebasecret
 
College Students
College StudentsCollege Students
College Studentsconfar90
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 SemanticAli Usman
 
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQLPL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQLReactive.IO
 
Gsm (Part 3)
Gsm (Part 3)Gsm (Part 3)
Gsm (Part 3)Ali Usman
 
MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)frogd
 
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlPostgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlReactive.IO
 
Database , 17 Web
Database , 17 WebDatabase , 17 Web
Database , 17 WebAli Usman
 
InnoDB Internal
InnoDB InternalInnoDB Internal
InnoDB Internalmysqlops
 
Database ,7 query localization
Database ,7 query localizationDatabase ,7 query localization
Database ,7 query localizationAli Usman
 

En vedette (20)

Database ,16 P2P
Database ,16 P2P Database ,16 P2P
Database ,16 P2P
 
Database ,2 Background
 Database ,2 Background Database ,2 Background
Database ,2 Background
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction
 
Ethernet Technology
Ethernet Technology Ethernet Technology
Ethernet Technology
 
Coyaima ie. juan xxiii manual de convivencia
Coyaima ie. juan xxiii manual de convivenciaCoyaima ie. juan xxiii manual de convivencia
Coyaima ie. juan xxiii manual de convivencia
 
Virgen de Chiquinquirá en Colombia
Virgen de Chiquinquirá en ColombiaVirgen de Chiquinquirá en Colombia
Virgen de Chiquinquirá en Colombia
 
BrunnerForbes2
BrunnerForbes2BrunnerForbes2
BrunnerForbes2
 
Anwar e-sabiri(complete)
Anwar e-sabiri(complete)Anwar e-sabiri(complete)
Anwar e-sabiri(complete)
 
Hank Iving Media Plan
Hank Iving Media PlanHank Iving Media Plan
Hank Iving Media Plan
 
Mariquita iet francisco nuñez pedrozo manual convivencia antiguo
Mariquita iet francisco nuñez pedrozo manual convivencia antiguoMariquita iet francisco nuñez pedrozo manual convivencia antiguo
Mariquita iet francisco nuñez pedrozo manual convivencia antiguo
 
College Students
College StudentsCollege Students
College Students
 
Prezentacja.1
Prezentacja.1Prezentacja.1
Prezentacja.1
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 Semantic
 
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQLPL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
 
Gsm (Part 3)
Gsm (Part 3)Gsm (Part 3)
Gsm (Part 3)
 
MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)MySQL InnoDB 源码实现分析(一)
MySQL InnoDB 源码实现分析(一)
 
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlPostgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
 
Database , 17 Web
Database , 17 WebDatabase , 17 Web
Database , 17 Web
 
InnoDB Internal
InnoDB InternalInnoDB Internal
InnoDB Internal
 
Database ,7 query localization
Database ,7 query localizationDatabase ,7 query localization
Database ,7 query localization
 

Similaire à Database ,10 Transactions

dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...
dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...
dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...DrCViji
 
Database ,18 Current Issues
Database ,18 Current IssuesDatabase ,18 Current Issues
Database ,18 Current IssuesAli Usman
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxKoteswari Kasireddy
 
Atomic Service Transactions
Atomic Service Transactions Atomic Service Transactions
Atomic Service Transactions WSO2
 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Yaksh Jethva
 
Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011sumit_study
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency ControlDilum Bandara
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYRohit Kumar
 
1 introduction
1 introduction1 introduction
1 introductionAmrit Kaur
 
Svetlin Nakov - Database Transactions
Svetlin Nakov - Database TransactionsSvetlin Nakov - Database Transactions
Svetlin Nakov - Database TransactionsSvetlin Nakov
 
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxFALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxhritikraj888
 
Transaction conccurency
Transaction conccurencyTransaction conccurency
Transaction conccurencyEsraa Farrag
 
Dartabase Transaction.pptx
Dartabase Transaction.pptxDartabase Transaction.pptx
Dartabase Transaction.pptxBibus Poudel
 
Database Transactions and SQL Server Concurrency
Database Transactions and SQL Server ConcurrencyDatabase Transactions and SQL Server Concurrency
Database Transactions and SQL Server ConcurrencyBoris Hristov
 
1 introduction DDBS
1 introduction DDBS1 introduction DDBS
1 introduction DDBSnaimanighat
 

Similaire à Database ,10 Transactions (20)

DBMS unit-5.pdf
DBMS unit-5.pdfDBMS unit-5.pdf
DBMS unit-5.pdf
 
dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...
dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...
dokumen.tips_silberschatz-korth-and-sudarshan1-transactions-transaction-conce...
 
Lec08
Lec08Lec08
Lec08
 
Database ,18 Current Issues
Database ,18 Current IssuesDatabase ,18 Current Issues
Database ,18 Current Issues
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
 
Atomic Service Transactions
Atomic Service Transactions Atomic Service Transactions
Atomic Service Transactions
 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)
 
Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011Dbms sixth chapter_part-1_2011
Dbms sixth chapter_part-1_2011
 
Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency Control
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
 
1 introduction
1 introduction1 introduction
1 introduction
 
Svetlin Nakov - Database Transactions
Svetlin Nakov - Database TransactionsSvetlin Nakov - Database Transactions
Svetlin Nakov - Database Transactions
 
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxFALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
 
24904 lecture11
24904 lecture1124904 lecture11
24904 lecture11
 
Transaction conccurency
Transaction conccurencyTransaction conccurency
Transaction conccurency
 
Dartabase Transaction.pptx
Dartabase Transaction.pptxDartabase Transaction.pptx
Dartabase Transaction.pptx
 
DBMS 4.pdf
DBMS 4.pdfDBMS 4.pdf
DBMS 4.pdf
 
Database Transactions and SQL Server Concurrency
Database Transactions and SQL Server ConcurrencyDatabase Transactions and SQL Server Concurrency
Database Transactions and SQL Server Concurrency
 
1 introduction DDBS
1 introduction DDBS1 introduction DDBS
1 introduction DDBS
 

Plus de Ali Usman

Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer OverviewAli Usman
 
Islamic Arts and Architecture
Islamic Arts and  ArchitectureIslamic Arts and  Architecture
Islamic Arts and ArchitectureAli Usman
 
Database , 15 Object DBMS
Database , 15 Object DBMSDatabase , 15 Object DBMS
Database , 15 Object DBMSAli Usman
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data IntegrationAli Usman
 
Database, 3 Distribution Design
Database, 3 Distribution DesignDatabase, 3 Distribution Design
Database, 3 Distribution DesignAli Usman
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 IntroductionAli Usman
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor SpecificationsAli Usman
 
Fifty Year Of Microprocessor
Fifty Year Of MicroprocessorFifty Year Of Microprocessor
Fifty Year Of MicroprocessorAli Usman
 
Discrete Structures lecture 2
 Discrete Structures lecture 2 Discrete Structures lecture 2
Discrete Structures lecture 2Ali Usman
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1 Ali Usman
 
Muslim Contributions in Medicine-Geography-Astronomy
Muslim Contributions in Medicine-Geography-AstronomyMuslim Contributions in Medicine-Geography-Astronomy
Muslim Contributions in Medicine-Geography-AstronomyAli Usman
 
Muslim Contributions in Geography
Muslim Contributions in GeographyMuslim Contributions in Geography
Muslim Contributions in GeographyAli Usman
 
Muslim Contributions in Astronomy
Muslim Contributions in AstronomyMuslim Contributions in Astronomy
Muslim Contributions in AstronomyAli Usman
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor SpecificationsAli Usman
 
Ptcl modem (user manual)
Ptcl modem (user manual)Ptcl modem (user manual)
Ptcl modem (user manual)Ali Usman
 
Nimat-ul-ALLAH shah wali
Nimat-ul-ALLAH shah wali Nimat-ul-ALLAH shah wali
Nimat-ul-ALLAH shah wali Ali Usman
 
Muslim Contributions in Mathematics
Muslim Contributions in MathematicsMuslim Contributions in Mathematics
Muslim Contributions in MathematicsAli Usman
 
Osi protocols
Osi protocolsOsi protocols
Osi protocolsAli Usman
 

Plus de Ali Usman (18)

Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer Overview
 
Islamic Arts and Architecture
Islamic Arts and  ArchitectureIslamic Arts and  Architecture
Islamic Arts and Architecture
 
Database , 15 Object DBMS
Database , 15 Object DBMSDatabase , 15 Object DBMS
Database , 15 Object DBMS
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data Integration
 
Database, 3 Distribution Design
Database, 3 Distribution DesignDatabase, 3 Distribution Design
Database, 3 Distribution Design
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 Introduction
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor Specifications
 
Fifty Year Of Microprocessor
Fifty Year Of MicroprocessorFifty Year Of Microprocessor
Fifty Year Of Microprocessor
 
Discrete Structures lecture 2
 Discrete Structures lecture 2 Discrete Structures lecture 2
Discrete Structures lecture 2
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
 
Muslim Contributions in Medicine-Geography-Astronomy
Muslim Contributions in Medicine-Geography-AstronomyMuslim Contributions in Medicine-Geography-Astronomy
Muslim Contributions in Medicine-Geography-Astronomy
 
Muslim Contributions in Geography
Muslim Contributions in GeographyMuslim Contributions in Geography
Muslim Contributions in Geography
 
Muslim Contributions in Astronomy
Muslim Contributions in AstronomyMuslim Contributions in Astronomy
Muslim Contributions in Astronomy
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor Specifications
 
Ptcl modem (user manual)
Ptcl modem (user manual)Ptcl modem (user manual)
Ptcl modem (user manual)
 
Nimat-ul-ALLAH shah wali
Nimat-ul-ALLAH shah wali Nimat-ul-ALLAH shah wali
Nimat-ul-ALLAH shah wali
 
Muslim Contributions in Mathematics
Muslim Contributions in MathematicsMuslim Contributions in Mathematics
Muslim Contributions in Mathematics
 
Osi protocols
Osi protocolsOsi protocols
Osi protocols
 

Dernier

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Dernier (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Database ,10 Transactions

  • 1. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/1 Outline • Introduction • Background • Distributed Database Design • Database Integration • Semantic Data Control • Distributed Query Processing • Multidatabase Query Processing • Distributed Transaction Management ➡ Transaction Concepts and Models ➡ Distributed Concurrency Control ➡ Distributed Reliability • Data Replication • Parallel Database Systems • Distributed Object DBMS • Peer-to-Peer Data Management • Web Data Management • Current Issues
  • 2. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/2 Transaction A transaction is a collection of actions that make consistent transformations of system states while preserving system consistency. ➡ concurrency transparency ➡ failure transparency Database in a consistent state Database may be temporarily in an inconsistent state during execution Begin Transaction End Transaction Execution of Transaction Database in a consistent state
  • 3. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/3 Transaction Example – A Simple SQL Query Transaction BUDGET_UPDATE begin EXEC SQL UPDATE PROJ SET BUDGET = BUDGET 1.1 WHERE PNAME = “CAD/CAM” end.
  • 4. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/4 Example Database Consider an airline reservation example with the relations: FLIGHT(FNO, DATE, SRC, DEST, STSOLD, CAP) CUST(CNAME, ADDR, BAL) FC(FNO, DATE, CNAME,SPECIAL)
  • 5. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/5 Example Transaction – SQL Version Begin_transaction Reservation begin input(flight_no, date, customer_name); EXEC SQL UPDATE FLIGHT SET STSOLD = STSOLD + 1 WHERE FNO = flight_no AND DATE = date; EXEC SQL INSERT INTO FC(FNO, DATE, CNAME, SPECIAL); VALUES (flight_no, date, customer_name, null); output(“reservation completed”) end . {Reservation}
  • 6. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/6 Termination of Transactions Begin_transaction Reservation begin input(flight_no, date, customer_name); EXEC SQL SELECT STSOLD,CAP INTO temp1,temp2 FROM FLIGHT WHERE FNO = flight_no AND DATE = date; if temp1 = temp2 then output(“no free seats”); Abort else EXEC SQL UPDATE FLIGHT SET STSOLD = STSOLD + 1 WHERE FNO = flight_no AND DATE = date; EXEC SQL INSERT INTO FC(FNO, DATE, CNAME, SPECIAL); VALUES (flight_no, date, customer_name, null); Commit output(“reservation completed”) endif end . {Reservation}
  • 7. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/7 Example Transaction – Reads & Writes Begin_transaction Reservation begin input(flight_no, date, customer_name); temp Read(flight_no(date).stsold); if temp = flight(date).cap then begin output(“no free seats”); Abort end else begin Write(flight(date).stsold, temp + 1); Write(flight(date).cname, customer_name); Write(flight(date).special, null); Commit; output(“reservation completed”) end end. {Reservation}
  • 8. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/8 Characterization • Read set (RS) ➡ The set of data items that are read by a transaction • Write set (WS) ➡ The set of data items whose values are changed by this transaction • Base set (BS) ➡ RS WS
  • 9. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/9 Formalization Let ➡ Oij(x) be some operation Oj of transaction Ti operating on entity x, where Oj {read,write} and Oj is atomic ➡ OSi = j Oij ➡ Ni {abort,commit} Transaction Ti is a partial order Ti = { i, ≺i} where  i = OSi {Ni}  For any two operations Oij , Oik OSi , if Oij = R(x) and Oik = W(x) for any data item x, then either Oij ≺i Oik or Oik ≺i Oij  Oij OSi, Oij ≺i Ni
  • 10. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/10 Example Consider a transaction T: Read(x) Read(y) x x + y Write(x) Commit Then = {R(x), R(y), W(x), C} ≺ = {(R(x), W(x)), (R(y), W(x)), (W(x), C), (R(x), C), (R(y), C)}
  • 11. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/11 Assume ≺ = {(R(x),W(x)), (R(y),W(x)), (W(x), C), (R(x), C), (R(y), C)} DAG Representation R(x) C R(y) W(x)
  • 12. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/12 Principles of Transactions ATOMICITY ➡ all or nothing CONSISTENCY ➡ no violation of integrity constraints ISOLATION ➡ concurrent changes invisible serializable DURABILITY ➡ committed updates persist
  • 13. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/13 Atomicity • Either all or none of the transaction's operations are performed. • Atomicity requires that if a transaction is interrupted by a failure, its partial results must be undone. • The activity of preserving the transaction's atomicity in presence of transaction aborts due to input errors, system overloads, or deadlocks is called transaction recovery. • The activity of ensuring atomicity in the presence of system crashes is called crash recovery.
  • 14. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/14 Consistency • Internal consistency ➡ A transaction which executes alone against a consistent database leaves it in a consistent state. ➡ Transactions do not violate database integrity constraints. • Transactions are correct programs
  • 15. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/15 Consistency Degrees • Degree 0 ➡ Transaction T does not overwrite dirty data of other transactions ➡ Dirty data refers to data values that have been updated by a transaction prior to its commitment • Degree 1 ➡ T does not overwrite dirty data of other transactions ➡ T does not commit any writes before EOT
  • 16. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/16 Consistency Degrees (cont’d) • Degree 2 ➡ T does not overwrite dirty data of other transactions ➡ T does not commit any writes before EOT ➡ T does not read dirty data from other transactions • Degree 3 ➡ T does not overwrite dirty data of other transactions ➡ T does not commit any writes before EOT ➡ T does not read dirty data from other transactions ➡ Other transactions do not dirty any data read by T before T completes.
  • 17. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/17 Isolation • Serializability ➡ If several transactions are executed concurrently, the results must be the same as if they were executed serially in some order. • Incomplete results ➡ An incomplete transaction cannot reveal its results to other transactions before its commitment. ➡ Necessary to avoid cascading aborts.
  • 18. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/18 Isolation Example • Consider the following two transactions: T1: Read(x) T2: Read(x) x x+1 x x+1 Write(x) Write(x) Commit Commit T1: Read(x) T1: Read(x) T1: x x+1 T1: x x+1 T1: Write(x) T2: Read(x) T1: Commit T1: Write(x) T2: Read(x) T2: x x+1 T2: x x+1 T2: Write(x) T2: Write(x) T1: Commit T2: Commit T2: Commit • Possible execution sequences:
  • 19. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/19 SQL-92 Isolation Levels Phenomena: • Dirty read ➡ T1 modifies x which is then read by T2 before T1 terminates; T1 aborts T2 has read value which never exists in the database. • Non-repeatable (fuzzy) read ➡ T1 reads x; T2 then modifies or deletes x and commits. T1 tries to read x again but reads a different value or can’t find it. • Phantom ➡ T1 searches the database according to a predicate while T2 inserts new tuples that satisfy the predicate.
  • 20. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/20 SQL-92 Isolation Levels (cont’d) • Read Uncommitted ➡ For transactions operating at this level, all three phenomena are possible. • Read Committed ➡ Fuzzy reads and phantoms are possible, but dirty reads are not. • Repeatable Read ➡ Only phantoms possible. • Anomaly Serializable ➡ None of the phenomena are possible.
  • 21. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/21 Durability • Once a transaction commits, the system must guarantee that the results of its operations will never be lost, in spite of subsequent failures. • Database recovery
  • 22. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/22 Characterization of Transactions • Based on ➡ Application areas ✦ Non-distributed vs. distributed ✦ Compensating transactions ✦ Heterogeneous transactions ➡ Timing ✦ On-line (short-life) vs batch (long-life) ➡ Organization of read and write actions ✦ Two-step ✦ Restricted ✦ Action model ➡ Structure ✦ Flat (or simple) transactions ✦ Nested transactions ✦ Workflows
  • 23. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/23 Transaction Structure • Flat transaction ➡ Consists of a sequence of primitive operations embraced between a begin and end markers. Begin_transaction Reservation … end. • Nested transaction ➡ The operations of a transaction may themselves be transactions. Begin_transaction Reservation … Begin_transaction Airline … end. {Airline} Begin_transaction Hotel … end. {Hotel} end. {Reservation}
  • 24. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/24 Nested Transactions • Have the same properties as their parents may themselves have other nested transactions. • Introduces concurrency control and recovery concepts to within the transaction. • Types ➡ Closed nesting ✦ Subtransactions begin after their parents and finish before them. ✦ Commitment of a subtransaction is conditional upon the commitment of the parent (commitment through the root). ➡ Open nesting ✦ Subtransactions can execute and commit independently. ✦ Compensation may be necessary.
  • 25. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/25 Workflows • “A collection of tasks organized to accomplish some business process.” • Types ➡ Human-oriented workflows ✦ Involve humans in performing the tasks. ✦ System support for collaboration and coordination; but no system-wide consistency definition ➡ System-oriented workflows ✦ Computation-intensive & specialized tasks that can be executed by a computer ✦ System support for concurrency control and recovery, automatic task execution, notification, etc. ➡ Transactional workflows ✦ In between the previous two; may involve humans, require access to heterogeneous, autonomous and/or distributed systems, and support selective use of ACID properties
  • 26. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/26 Workflow Example T1 T2 T3 T4 T5 Customer Database Customer Database Customer Database T1: Customer request obtained T2: Airline reservation performed T3: Hotel reservation performed T4: Auto reservation performed T5: Bill generated
  • 27. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/27 Transactions Provide… • Atomic and reliable execution in the presence of failures • Correct execution in the presence of multiple user accesses • Correct management of replicas (if they support it)
  • 28. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/28 Transaction Processing Issues • Transaction structure (usually called transaction model) ➡ Flat (simple), nested • Internal database consistency ➡ Semantic data control (integrity enforcement) algorithms • Reliability protocols ➡ Atomicity & Durability ➡ Local recovery protocols ➡ Global commit protocols
  • 29. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/29 Transaction Processing Issues • Concurrency control algorithms ➡ How to synchronize concurrent transaction executions (correctness criterion) ➡ Intra-transaction consistency, Isolation • Replica control protocols ➡ How to control the mutual consistency of replicated data ➡ One copy equivalence and ROWA
  • 30. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/30 Architecture Revisited Scheduling/ Descheduling Requests Transaction Manager (TM) Distributed Execution Monitor With other SCs With other TMs Begin_transaction, Read, Write, Commit, Abort To data processor Results Scheduler (SC)
  • 31. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/31 Centralized Transaction Execution Begin_Transaction, Read, Write, Abort, EOT Results & User Notifications Scheduled Operations Results Results … Read, Write, Abort, EOT User Application User Application Transaction Manager (TM) Scheduler (SC) Recovery Manager (RM)
  • 32. Distributed DBMS © M. T. Özsu & P. Valduriez Ch.10/32 Distributed Transaction Execution Begin_transaction, Read, Write, EOT, Abort User application Results & User notifications Read, Write, EOT, Abort TM SC RM SC RM TM Local Recovery Protocol Distributed Concurrency Control Protocol Replica Control Protocol Distributed Transaction Execution Model