Multiversion Concurrency Control

Multiversion Concurrency Control

Multiversion concurrency control (MCC, MVCC, multi-generational concurrency control) ist ein Verfahren aus der Datenbanktechnik, das dazu dient, konkurrierende Zugriffe auf eine Datenbank möglichst effizient auszuführen, ohne zu blockieren oder die Konsistenz der Datenbank zu gefährden.

Dabei wird sichergestellt, dass eine Transaktion nie auf Datenbankobjekte warten muss. Zu diesem Zweck werden intern verschiedene Versionen eines Objektes gehalten, die z.B. durch Zeitstempel oder fortlaufend erhöhte Transaktions-Nummern voneinander unterschieden werden. Jede Objektversion hat dann einen Zeitstempel vom Zeitpunkt ihres Schreibens durch eine beliebige Transaktion Tbel, auf diese Weise kann Transaktion Ti die jeweils aktuelle Version des Objektes lesen, deren Zeitstempel kleiner ist als TS(Ti), d.h., die von der Transaktion

\text{T}_\text{j}\text{ mit }j=\underset{\forall\,\text{bel}}{\text{maxarg}}\left\{ \text{TS}\left(T_\text{bel}\right) : \text{TS}\left(T_\text{bel}\right) < \text{TS}\left(T_i\right) \right\}

geschrieben wurde.

Jedes Objekt P besitzt ebenso einen Lese-Zeitstempel RTS(P) (read timestamp), der den Startzeitstempel TS(Tneu) derjenigen Transaktion Tneu angibt, die P zuletzt gelesen hat. Wenn Ti dieses Objekt P ändert und TS(Ti) < RTS(P)=TS(Tneu) gilt, dann wird die Transaktion Ti abgebrochen und neu gestartet. Andernfalls erstellt Ti eine neue Version von P und setzt den Lese-/Schreib-Zeitstempel von P auf TS(Ti).

Der Nachteil dieses Systems sind die Kosten, um viele verschiedene Versionen eines Objekts in der Datenbank zu halten. Auf der anderen Seite werden lesende Zugriffe nie blockiert, was sehr wichtig bei ausgelasteten Datenbanken sein kann, in denen sehr häufig nur gelesen wird.

Viele der heute erhältlichen Datenbanksysteme implementieren diese Technik:

Siehe auch

Zeitstempelverfahren

Einzelnachweise

  1. Berkeley DB Reference Guide: Degrees of Isolation
  2. CouchDB: The Definitive Guide - Eventual Consistency
  3. White paper by Roman Rokytskyy Firebird and Multi Version Concurrency Control
  4. http://developers.sones.de/wiki/doku.php
  5. Multi-Version Concurrency Control in the H2 Database Engine
  6. Bill Todd: InterBase: What Sets It Apart. 2000, abgerufen am 4 May.
  7. MySQL 5.1 Reference Manual, Section 14.2.12: Implementation of Multi-Versioning
  8. MySQL 5.1 Reference Manual, Section 14.6.1: Falcon Features
  9. ObjectStore Advanced C++ User's Guide, chapter two
  10. Oracle® Database Concepts, Chapter 13 Data Concurrency and Consistency [1] Multiversion Concurrency Control
  11. PostgreSQL 8.3 Documentation, Chapter 12: Concurrency Control

Wikimedia Foundation.

Игры ⚽ Поможем написать реферат

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Multiversion concurrency control — (abbreviated MCC or MVCC), in the database field of computer science, is a concurrency control method commonly used by database management systems to provide concurrent access to the database and in programming languages to implement… …   Wikipedia

  • Concurrency control — In information technology and computer science, especially in the fields of computer programming (see also concurrent programming, parallel programming), operating systems (see also parallel computing), multiprocessors, and databases, concurrency …   Wikipedia

  • Non-lock concurrency control — In Computer Science, in the field of databases, non lock concurrency control is a concurrency control method used in relational databases without using locking. There are several non lock concurrency control methods, which involve the use of… …   Wikipedia

  • Timestamp-based concurrency control — In computer science, in the field of databases, timestamp based concurrency control is a non lock concurrency control method, used in relational databases to safely handle transactions, using timestamps.OperationAssumptions* Every timestamp value …   Wikipedia

  • MVCC — Multiversion concurrency control (MCC, MVCC, multi generational concurrency control) ist eine Methode aus der Datenbanktechnik, konkurrierende Zugriffe auf eine relationale Datenbank möglichst effizient auszuführen, ohne die Konsistenz der… …   Deutsch Wikipedia

  • InterBase — Infobox Software name = InterBase caption = InterBase s performance monitor allows database administrators to view and control server use. developer = CodeGear latest release version = 2009 latest release date = 08 September, 2008 operating… …   Wikipedia

  • MVCC — Управление конкурентным доступом с помощью многоверсионности (англ. MVCC  MultiVersion Concurrency Control)  один из механизмов обеспечения одновременного конкурентного доступа к БД, заключающийся в предоставлении каждому… …   Википедия

  • Isolation (database systems) — In database systems, isolation is a property that defines how/when the changes made by one operation become visible to other concurrent operations. Isolation is one of the ACID (Atomicity, Consistency, Isolation, Durability) properties.Isolation… …   Wikipedia

  • Snapshot isolation — In databases, snapshot isolation is a isolation mode into Microsoft SQL Server 2005. It is similar to Multiversion concurrency control (MVCC). It guarantees that all reads made in a transaction will see a consistent snapshot of the database, and… …   Wikipedia

  • Sperrprotokoll — Sperrverfahren (Datenbanken) werden in Datenbanksystemen eingesetzt, um die Forderung der Isolation des ACID Prinzips bei Transaktionen zu erfüllen. Alle Sperrverfahren, auch Sperrprotokolle genannt, fallen in die Kategorie der pessimistischen… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”