Durability (database systems)

In database systems, durability is the ACID property that guarantees that the effects of transactions that have been committed will survive permanently, even in cases of failures,[1] including incidents and catastrophic events. For example, if a flight booking reports that a seat has successfully been booked, then the seat will remain booked even if the system crashes.[2]

Formally, a database system ensures the durability property if it tolerates three types of failures: transaction, system, and media failures.[1] In particular, a transaction fails if its execution is interrupted before all its operations have been processed by the system.[3] These kinds of interruptions can be originated at the transaction level by data-entry errors, operator cancellation, timeout, or application-specific errors, like withdrawing money from a bank account with insufficient funds.[1] At the system level, a failure occurs if the contents of the volatile storage are lost, due, for instance, to system crashes, like out-of-memory events.[3] At the media level, where media means a stable storage that withstands system failures, failures happen when the stable storage, or part of it, is lost.[3] These cases are typically represented by disk failures.[1]

Thus, to be durable, the database system should implement strategies and operations that guarantee that the effects of transactions that have been committed before the failure will survive the event (even by reconstruction), while the changes of incomplete transactions, which have not been committed yet at the time of failure, will be reverted and will not affect the state of the database system. These behaviours are proven to be correct when the execution of transactions has respectively the resilience and recoverability properties.[3]

Mechanisms

A simplified finite state automaton showing possible DBMS after-failure (in red) states and the transitions (in black) that are necessary to return to a running system to achieve durability.

In transaction-based systems, the mechanisms that assure durability are historically associated with the concept of reliability of systems, as proposed by Jim Gray in 1981.[1] This concept includes durability, but it also relies on aspects of the atomicity and consistency properties.[4] Specifically, a reliability mechanism requires primitives that explicitly state the beginning, the end, and the rollback of transactions,[1] which are also implied for the other two aforementioned properties. In this article, only the mechanisms strictly related to durability have been considered. These mechanisms are divided into three levels: transaction, system, and media level. This can be seen as well for scenarios where failures could happen and that have to be considered in the design of database systems to address durability.[3]

Transaction level

Durability against failures that occur at transaction level, such as canceled calls and inconsistent actions that may be blocked before committing by constraints and triggers, is guaranteed by the serializability property of the execution of transactions. The state generated by the effects of precedently committed transactions is available in main memory and, thus, is resilient, while the changes carried by non-committed transactions can be undone. In fact, thanks to serializability, they can be discerned from other transactions and, therefore, their changes are discarded.[3] In addition, it is relevant to consider that in-place changes, which overwrite old values without keeping any kind of history are discouraged.[1] There exist multiple approaches that keep track of the history of changes, such as timestamp-based solutions[5] or logging and locking.[1]

System level

At system level, failures happen, by definition,[3] when the contents of the volatile storage are lost. This can occur in events like system crashes or power outages. Existing database systems use volatile storage (i.e. the main memory of the system) for different purposes: some store their whole state and data in it, even without any durability guarantee; others keep the state and the data, or part of them, in memory, but also use the non-volatile storage for data; other systems only keep the state in main memory, while keeping all the data on disk.[6] The reason behind the choice of having volatile storage, which is subject to this type of failure, and non-volatile storage, is found in the performance differences of the existing technologies that are used to implement these kinds of storage. However, the situation is likely to evolve as the popularity of non-volatile memories (NVM) technologies grows.[7]

In systems that include non-volatile storage, durability can be achieved by keeping and flushing an immutable sequential log of the transactions to such non-volatile storage before acknowledging commitment. Thanks to their atomicity property, the transactions can be considered the unit of work in the recovery process that guarantees durability while exploiting the log. In particular, the logging mechanism is called write-ahead log (WAL) and allows durability by buffering changes to the disk before they are synchronized from the main memory. In this way, by reconstruction from the log file, all committed transactions are resilient to system-level failures, because they can be redone. Non-committed transactions, instead, are recoverable, since their operations are logged to non-volatile storage before they effectively modify the state of the database.[8] In this way, the partially executed operations can be undone without affecting the state of the system. After that, those transactions that were incomplete can be redone. Therefore, the transaction log from non-volatile storage can be reprocessed to recreate the system state right before any later system-level failure. Logging is done as a combination of tracking data and operations (i.e. transactions) for performance reasons.[9]

Media level

At media level, failure scenarios affect non-volatile storage, like hard disk drives, solid-state drives, and other types of storage hardware components.[8] To guarantee durability at this level, the database system shall rely on stable memory, which is a memory that is completely and ideally failure-resistant. This kind of memory can be achieved with mechanisms of replication and robust writing protocols.[4]

Many tools and technologies are available to provide a logical stable memory, such as the mirroring of disks, and their choice depends on the requirements of the specific applications.[4] In general, replication and redundancy strategies and architectures that behave like stable memory are available at different levels of the technology stack. In this way, even in case of catastrophic events where the storage hardware is damaged, data loss can be prevented.[10] At this level, there is a strong bond between durability and system and data recovery, in the sense that the main goal is to preserve the data, not necessarily in online replicas, but also as offline copies.[4] These last techniques fall into the categories of backup, data loss prevention, and IT disaster recovery.[11]

Therefore, in case of media failure, the durability of transactions is guaranteed by the ability to reconstruct the state of the database from the log files stored in the stable memory, in any way it was implemented in the database system.[8] There exist several mechanisms to store and reconstruct the state of a database system that improves the performance, both in terms of space and time, compared to managing all the log files created from the beginning of the database system. These mechanisms often include incremental dumping, differential files, and checkpoints.[12]

Distributed databases

In distributed transactions, ensuring durability requires additional mechanisms to preserve a consistent state sequence across all database nodes. This means, for example, that a single node may not be enough to decide to conclude a transaction by committing it. In fact, the resources used in that transaction may be on other nodes, where other transactions are occurring concurrently. Otherwise, in case of failure, if consistency could not be guaranteed, it would be impossible to acknowledge a safe state of the database for recovery. For this reason, all participating nodes must coordinate before a commit can be acknowledged. This is usually done by a two-phase commit protocol.[13]

In addition, in distributed databases, even the protocols for logging and recovery shall address the issues of distributed environments, such as deadlocks, that could prevent the resilience and recoverability of transactions and, thus, durability.[13] A widely adopted family of algorithms that ensures these properties is Algorithms for Recovery and Isolation Exploiting Semantics (ARIES).[8]

See also

References

  1. ^ a b c d e f g h Gray, Jim (1981). "The transaction concept: Virtues and limitations" (PDF). VLDB. 81: 144–154.
  2. ^ "ACID Compliance: What It Means and Why You Should Care". MariaDB. 29 July 2018. Retrieved 22 September 2021.
  3. ^ a b c d e f g Hadzilacos, Vassos (1988). "A theory of reliability in database systems". Journal of the ACM. 35 (1): 121–145. doi:10.1145/42267.42272. ISSN 0004-5411. S2CID 7052304.
  4. ^ a b c d Atzeni, Paolo, ed. (1999). Database systems: concepts, languages & architectures. New York: McGraw-Hill. pp. 311–320. ISBN 978-0-07-709500-0.
  5. ^ Svobodova, L. (1980). "MANAGEMENT OF OBJECT HISTORIES IN THE SWALLOW REPOSITORY". Mit/LCS Tr-243. USA.
  6. ^ Petrov, Oleksandr (2019). Database internals: a deep dive into how distributed data systems work (1st ed.). Beijing Boston Farnham Sebastopol Tokyo: O'Reilly. pp. 40–42. ISBN 978-1-4920-4034-7.
  7. ^ Arulraj, Joy; Pavlo, Andrew (2017-05-09). "How to Build a Non-Volatile Memory Database Management System". Proceedings of the 2017 ACM International Conference on Management of Data. SIGMOD '17. New York, NY, USA: Association for Computing Machinery. pp. 1753–1758. doi:10.1145/3035918.3054780. ISBN 978-1-4503-4197-4. S2CID 648876.
  8. ^ a b c d Petrov, Oleksandr (2019). Database internals: a deep dive into how distributed data systems work (1st ed.). Beijing Boston Farnham Sebastopol Tokyo: O'Reilly. pp. 185–195. ISBN 978-1-4920-4034-7.
  9. ^ Mohan, C.; Haderle, Don; Lindsay, Bruce; Pirahesh, Hamid; Schwarz, Peter (1992-03-01). "ARIES: a transaction recovery method supporting fine-granularity locking and partial rollbacks using write-ahead logging". ACM Transactions on Database Systems. 17 (1): 94–162. doi:10.1145/128765.128770. ISSN 0362-5915. S2CID 8759704.
  10. ^ Eich, Margaret H. (1987-02-01). "A classification and comparison of main memory database recovery techniques". 1987 IEEE Third International Conference on Data Engineering. IEEE. pp. 332–339. doi:10.1109/ICDE.1987.7272398. ISBN 978-0-8186-0762-2. S2CID 207773738.
  11. ^ Choy, Manhoi; Leong, Hong Va; Wong, Man Hon (2000). "Disaster recovery techniques for database systems". Communications of the ACM. 43 (11es): 6. doi:10.1145/352515.352521. ISSN 0001-0782. S2CID 14781378.
  12. ^ Verhofstad, Joost S. M. (1978-06-01). "Recovery Techniques for Database Systems". ACM Computing Surveys. 10 (2): 167–195. doi:10.1145/356725.356730. S2CID 8847522.
  13. ^ a b Mohan, C.; Haderle, Don; Lindsay, Bruce; Pirahesh, Hamid; Schwarz, Peter (1992-03-01). "ARIES: a transaction recovery method supporting fine-granularity locking and partial rollbacks using write-ahead logging". ACM Transactions on Database Systems. 17 (1): 94–162. doi:10.1145/128765.128770. ISSN 0362-5915. S2CID 8759704.

Further reading

Read other articles:

Sächsische Staatskanzlei— SK — Staatliche Ebene Land Stellung Oberste Landesbehörde Gründung 1990 Hauptsitz Dresden Behördenleitung Oliver Schenk (CDU), Chef der Staatskanzlei Haushaltsvolumen 36,82 Mio. Euro (2016)[1] Netzauftritt www.sk.sachsen.de Staatskanzlei vom Altstadtufer der Elbe Gebäude um 1910 Das historische Gebäude der Sächsischen Staatskanzlei Ansicht vom Finanzministerium aus Nordseite mit Springbrunnen Die Sächsische Staatskanzlei (SK) ist eine Oberste Land...

 

Йосип Миколайович ДанилюкНародився 1842Львів, Австрійська імперіяПомер 8 (21) лютого 1904Львів, Долитавщина, Австро-УгорщинаНаціональність українецьДіяльність видавецьВідомий завдяки громадський діячПартія Соціал-демократична партія Галичини У Вікіпедії є статті про інши

 

Ác là phương Đông Con trưởng thành ở Daejeon (Hàn Quốc) Phân loại khoa học Giới: Animalia Ngành: Chordata Lớp: Aves Bộ: Passeriformes Họ: Corvidae Chi: Pica Loài: P. serica Danh pháp hai phần Pica sericaGould, 1845 Các đồng nghĩa Pica pica jankowskii (but see text) Pica pica japonica Pica pica serica and see text Ác là phương Đông (Pica serica) là loài chim ác là được tìm thấy ở phía đông nam Nga và Myanmar đến miền đông...

Wappen der Dukes aus dem Hause Douglas (bis 1778) Duke of Queensberry ist ein erblicher britischer Adelstitel in der Peerage of Scotland. Der Titel ist nach dem Hügel Queensberry in Dumfriesshire benannt und ist seit 1810 mit dem des Duke of Buccleuch (1663) vereinigt. Familiensitz der Dukes of Queensbury ist Drumlanrig Castle in Dumfriesshire, das vom ersten Duke erbaut wurde. Verleihung, nachgeordnete und weitere Titel Wappen der Dukes aus dem Hause Scott ab 1810 Drumlanrig Castle, bis 181...

 

Boston-based advertising and marketing communications agency MullenLowe U.S.IndustryAdvertising, MarketingFounded1970FounderJim MullenHeadquartersBostonNumber of locations4Key peopleLee Newman, CEOServicesCreative, public relations, full-service media, analytics.ParentInterpublic Group of Companies (IPG)Websitemullenlowe.com MullenLowe U.S. is a Boston, Massachusetts-based advertising and marketing communications agency, a part of MullenLowe Group owned by multinational advertising network In...

 

American basketball player and coach This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Sherman Dillard – news · newspapers · books · scholar · JSTOR (October 2023) (Learn how and when to remove th...

Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: GH Universal Hotel Bandung – berita · surat kabar · buku · cendekiawan · JSTOR GH Universal Hotel BandungInformasi umumLokasiBandung,  IndonesiaAlamatJalan Setiabudhi 376Bandung 40143Data teknisJuml...

 

Bagian dari seriIlmu Pengetahuan Formal Logika Matematika Logika matematika Statistika matematika Ilmu komputer teoretis Teori permainan Teori keputusan Ilmu aktuaria Teori informasi Teori sistem FisikalFisika Fisika klasik Fisika modern Fisika terapan Fisika komputasi Fisika atom Fisika nuklir Fisika partikel Fisika eksperimental Fisika teori Fisika benda terkondensasi Mekanika Mekanika klasik Mekanika kuantum Mekanika kontinuum Rheologi Mekanika benda padat Mekanika fluida Fisika plasma Ter...

 

Subcompact car Motor vehicle Chevrolet AveoOverviewManufacturerGeneral Motors (2002–2023)SAIC-GM-Wuling (2023–present)Also calledDaewoo KalosDaewoo GentraChevrolet Sonic (2011–2020)Production2002–presentBody and chassisClassSubcompact car (B)LayoutFront-engine, front-wheel-driveChronologyPredecessorChevrolet MetroDaewoo LanosSuccessorChevrolet OnixChevrolet SailChevrolet Cavalier (fourth generation) (Mexico)[1] The Chevrolet Aveo (/əˈveɪ.oʊ/ ə-VAY-oh) is a subcompact...

De active pool De Forth Worth Water Gardens liggen naast het Fort Worth Convention Center in de Texaanse stad Fort Worth. Het park beslaat 1,7 hectare en beschikt over drie grote postmoderne fonteinen. Een van de fonteinen is de Active pool. Hier valt het water naar beneden in een 11 meter diepe vijver. Er loopt een wandelpad doorheen zodat de bezoekers zich midden in het watergeweld kunnen begeven. Verder zijn er 500 verschillende planten en bomen in het park te vinden. In 2006 werden de Wat...

 

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: St Albans Cathedral Choir – news · newspapers · books · scholar · JSTOR (August 2010) (Learn how and when t...

 

This article is about the Philippine milk-based confectionery. For the Arabo-Andalusian meat pie, see Pastilla. For Russian fruit confectionery, see Pastila. PastillasTraditional pastillas made from carabao's milkTypeSweetsPlace of originPhilippinesRegion or stateSan Miguel, Bulacan, San Pedro, LagunaMain ingredientsCarabao or cow milkVariationsYema  Media: Pastillas Pastillas, also known as pastillas de leche (literally milk pills), refer to a type of milk-based confections that ori...

академія, університет Національна академія керівних кадрів культури і мистецтв НАКККіМ 50°26′10″ пн. ш. 30°33′16″ сх. д. / 50.43611840002777313° пн. ш. 30.55468170002777839° сх. д. / 50.43611840002777313; 30.55468170002777839Координати: 50°26′10″ пн. ш. 30°33′16″ сх. д. / ࿯...

 

2005 studio album by Joe LovanoJoyous EncounterStudio album by Joe LovanoReleasedMay 10, 2005RecordedSeptember 8–9, 2004StudioAvatar Studios, NYC.GenreJazzLength1:06:42LabelBlue Note 7243 8 63405 2 8ProducerJoe LovanoJoe Lovano chronology I'm All For You(2004) Joyous Encounter(2005) Streams of Expression(2006) Professional ratingsReview scoresSourceRatingAllmusic[1]All About Jazz[2]The Guardian[3]PopMatters6/10[4]Tom HullB+ ()[5]The Penguin Gu...

 

WW2 New Zealand Army formation New Zealand Division2nd New Zealand DivisionDivisional insignia of the 2nd New Zealand DivisionActive1939–45Disbandedc.1945Country New ZealandBranchNew Zealand Military ForcesTypeInfantrySizeDivisionPart ofBritish Eighth ArmyGarrison/HQMaadi Camp, Egypt (1940–c.1943)EngagementsNorth African Campaign, Italy 1943–45CommandersNotablecommandersBernard C. FreybergLindsay Inglis (temporary)Howard Kippenberger (temporary)Graham Parkinson (temporary)Step...

Scottish adventurer & military officer (1795-1871) For his son, the Victoria Cross winner, see William George Drummond Stewart. Sir William Drummond Stewart, BtPortrait of Sir William Drummond Stewart in Murthly CastleBorn26 December 1795Murthly Castle, PerthshireDied28 April 1871 (aged 75)BuriedChapel of St. Anthony the Eremite, Murthly CastleAllegiance United KingdomService/branch British ArmyYears of service1812–1820RankCaptainUnit6th Dragoon Guards15th The King's HussarsBa...

 

Japanese animation studio For other uses, see Feel. Feel, Inc.Native name有限会社フィール[1]Romanized nameYūgen-gaisha FiiruTypeYūgen gaishaIndustryJapanese animationFoundedDecember 26, 2002; 20 years ago (2002-12-26)[1]FounderMakoto Takigasaki[1]HeadquartersKoganei, Tokyo, Japan[2]Key peopleMakoto Takigasaki[1]Total equity¥ 3,000,000Number of employees61[1]Websitewww.feel-ing.com Feel, Inc. (有限会社フィール...

 

Maiden Tower (Baku), Baku, one of Azerbaijan's most iconic monuments Ganja, the center of the Arran School of Architecture, is also the country's second largest city. Tourism in Azerbaijan has been an important sector of the Azerbaijani economy since the 1990s. According to Azerbaijan's Center for Economic and Social Development, the country is in 39th place[1] among 148 countries in tourism competitiveness indicators. The World Travel and Tourism Council reported that Azerbaijan is a...

Opel Omega Descrizione generale Costruttore  Opel Tipo principale Berlina 3 volumi Altre versioni Caravan Produzione dal 1986 al 2003 Sostituisce la Opel Rekord Serie Omega A:1986-93Omega B:1994-2003 Sostituita da Opel Signum Altre caratteristiche Altre antenate Opel CommodoreOpel Senator Altre eredi Opel Insignia Esemplari prodotti 1.758.407 in totale[1] L'Opel Omega è un'autovettura di fascia alta (segmento E) prodotta dalla casa automobilistica tedesca Opel dal 1986 al 2...

 

Japanese assassination of a Tokugawa official For the 1932 assassination attempt, see Sakuradamon Incident (1932). Sakuradamon IncidentSakuradamon incident. Detail from printNative name 桜田門外の変DateMarch 24, 1860 (1860-03-24)LocationSakurada Gate, Edo Castle, present-day Tokyo, JapanCoordinates35°40′40″N 139°45′10″E / 35.67778°N 139.75278°E / 35.67778; 139.75278TypeAssassinationMotiveOpposition to the signing of the 1858 Treaty...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!