0% found this document useful (0 votes)
17 views8 pages

Yashaswini (DBMS)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

Yashaswini (DBMS)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

COURSE: DATABASE MANAGEMENT SYSTEMS.


COURSE CODE: BCS403.
TITLE: MULTIVERSION TECHNIQUE BASED ON TIMESTAMP ORDERING
PRESENTED BY: YASHASWINI K {1KT22IS061} .
DEPARTMENT: INFORMATION SCIENCE AND ENGINEERING.
UNDER THE GUIDANCE OF : PROF.PRADHEEPA J

ww.skit.org.in 1
Sri Krishna Institute of Technology
(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

INTRODUCTION
• Ensures that database transactions are executed concurrently without
violating data integrity.
• Prevents conflicts and ensures serializability.
• Maintains multiple versions of database items.
• Allows transactions to access different versions to ensure
serializability.

1 2
/skit.org.in
Sri Krishna Institute of Technology
(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

TIMESTAMP ORDERING

• Transactions are ordered based on their timestamps.


• Ensures that older transactions get precedence over newer ones.
• Prevents conflicts and maintains consistency.
• Simplifies the management of concurrent transactions.

2 3
/skit.org.in
Sri Krishna Institute of Technology
(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

MULTIVERSION TECHNIQUE BASED ON TIMESTAMP ORDERING

• Multiple versions (X1, X2, …, Xk) of each data item X are maintained.
• Each version Xi has two associated timestamps:
• read_TS(Xi): The highest timestamp of transactions that have read Xi.
• write_TS(Xi): The timestamp of the transaction that wrote Xi.

3 4
/skit.org.in
Sri Krishna Institute of Technology
(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

CREATING AND MANAGING VERSIONS

• Creating New Versions:


A new version Xk+1 is created when a transaction T writes to X.
Both write_TS(Xk+1) and read_TS(Xk+1) are set to TS(T).
• Updating Read Timestamps:
When a transaction T reads version Xi, read_TS(Xi) is updated to the
larger of the current read_TS(Xi) and TS(T).

4 5
/skit.org.in
Sri Krishna Institute of Technology
(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

RULES FOR ENSURING SERIALIZABILITY

• Rule 1: Write Operations:


- If a transaction T issues a write_item(X):
- Find the version i of X with the highest write_TS(Xi) ≤ TS(T).
- If read_TS(Xi) > TS(T), abort T.
- Otherwise, create a new version Xj with read_TS(Xj) = write_TS(Xj) = TS(T).

5 6
/skit.org.in
Sri Krishna Institute of Technology
(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Rule 2: Read Operations:


- If a transaction T issues a read_item(X):
- Find the version i of X with the highest write_TS(Xi) ≤ TS(T).
- Return the value of Xi to T.
- Update read_TS(Xi) to the larger of TS(T) and the current read_TS(Xi).

6 7
/skit.org.in
Sri Krishna Institute of Technology
(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

9 8
/skit.org.in

You might also like