{"id":946,"date":"2023-11-17T06:04:55","date_gmt":"2023-11-17T06:04:55","guid":{"rendered":"https:\/\/learnlearn.uk\/ibcs\/?page_id=946"},"modified":"2023-11-17T06:05:49","modified_gmt":"2023-11-17T06:05:49","slug":"database-transaction-terminology","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/","title":{"rendered":"Database Transaction Terminology"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Transaction<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Transaction<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-medium wp-image-931\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/nodes-graph-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/nodes-graph-300x300.jpg 300w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/nodes-graph-150x150.jpg 150w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/nodes-graph-768x768.jpg 768w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/nodes-graph.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>A transaction is a sequence of one or more SQL statements that are executed as a single unit of work. A transaction can either be committed (applied to the database) or rolled back (undone), ensuring data consistency and integrity.<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Commit<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Commit<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-medium wp-image-948\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-commit-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-commit-300x300.jpg 300w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-commit-150x150.jpg 150w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-commit-768x768.jpg 768w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-commit.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Committing a transaction means making its changes permanent in the database. After a successful commit, the changes are visible to other transactions.<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Rollback<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Rollback<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-medium wp-image-949\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-rollback.jpg-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-rollback.jpg-300x300.jpg 300w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-rollback.jpg-150x150.jpg 150w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database-transaction-rollback.jpg.jpg 351w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Rolling back a transaction means undoing its changes, reverting the database to its state before the transaction started. It is typically used in case of errors or exceptions.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Savepoint<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Savepoint<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-medium wp-image-950\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database_savepoint-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database_savepoint-300x300.jpg 300w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database_savepoint-150x150.jpg 150w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/database_savepoint.jpg 702w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>A savepoint is a point within a transaction to which you can later roll back. It allows you to create intermediate points in a transaction and roll back to them without affecting the entire transaction.<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Concurrency<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Concurrency Control<\/h3>\n<p>Concurrency control mechanisms ensure that transactions execute in a way that preserves the consistency of the database.<\/p>\n<p>Two common concurrency control protocols are\u00a0<b>Two-Phase Locking (2PL)<\/b>\u00a0and\u00a0<b>Optimistic Concurrency Control (OCC)<\/b>.<\/p>\n<ul>\n<li>In 2PL, transactions acquire locks before accessing data and release them after completion.<\/li>\n<li>In OCC, transactions are allowed to proceed without locks, but conflicts are detected and resolved at the end of the transaction.<\/li>\n<\/ul>\n\n<\/div><h2 class=\"tabtitle\">Isolation Levels<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Isolation Levels<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-medium wp-image-951\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/transaction-isolation-database-transactions-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/transaction-isolation-database-transactions-300x300.jpg 300w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/transaction-isolation-database-transactions-150x150.jpg 150w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/transaction-isolation-database-transactions-768x768.jpg 768w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/transaction-isolation-database-transactions.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Isolation levels define the degree to which one transaction must be isolated from the effects of other concurrent transactions. Common isolation levels include Read Uncommitted, Read Committed, Repeatable Read, and Serializable.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Deadlock<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Deadlock<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-medium wp-image-952\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/deadlock-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/deadlock-300x300.jpg 300w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/deadlock-150x150.jpg 150w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/deadlock-768x768.jpg 768w, https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/deadlock.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>A deadlock occurs when two or more transactions are waiting for each other to release locks, resulting in a circular waiting condition. Database systems employ deadlock detection mechanisms to identify such situations and resolve them by rolling back one or more transactions involved in the deadlock.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Scheduling<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Transaction Scheduling<\/h3>\n<p>Database systems use a scheduler to determine the order in which transactions are executed. The scheduler ensures that transactions are executed in a way that maintains the consistency of the database. It may use various algorithms to prioritize and schedule transactions based on factors like timestamp ordering or conflict resolution.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Timestamp <\/h2>\n<div class=\"tabcontent\">\n\n<h3>Timestamp Ordering<\/h3>\n<p>Each transaction is assigned a unique timestamp, and transactions are ordered based on these timestamps. This helps in determining the serialization order of transactions. Older transactions are typically given precedence over newer ones to avoid conflicts.<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Transaction A transaction is a sequence of one or more SQL statements that are executed as a single unit of work. A transaction can either be committed (applied to the database) or rolled back (undone), ensuring data consistency and integrity. &nbsp; Commit Committing a transaction means making its changes permanent in the database. After a&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Database Transaction Terminology<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":100,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Database Transaction Terminology - IB Computer Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Database Transaction Terminology - IB Computer Science\" \/>\n<meta property=\"og:description\" content=\"Transaction A transaction is a sequence of one or more SQL statements that are executed as a single unit of work. A transaction can either be committed (applied to the database) or rolled back (undone), ensuring data consistency and integrity. &nbsp; Commit Committing a transaction means making its changes permanent in the database. After a&hellip;&nbsp;Read More &raquo;Database Transaction Terminology\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/\" \/>\n<meta property=\"og:site_name\" content=\"IB Computer Science\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-17T06:05:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/nodes-graph-300x300.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/\",\"name\":\"Database Transaction Terminology - IB Computer Science\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#website\"},\"datePublished\":\"2023-11-17T06:04:55+00:00\",\"dateModified\":\"2023-11-17T06:05:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"IB Computer Science\",\"item\":\"https:\/\/learnlearn.uk\/ibcs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Database Transaction Terminology\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#website\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/\",\"name\":\"IB Computer Science\",\"description\":\"- learnlearn..uk\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/ibcs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#organization\",\"name\":\"IB Computer Science\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png\",\"width\":300,\"height\":41,\"caption\":\"IB Computer Science\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Database Transaction Terminology - IB Computer Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/","og_locale":"en_GB","og_type":"article","og_title":"Database Transaction Terminology - IB Computer Science","og_description":"Transaction A transaction is a sequence of one or more SQL statements that are executed as a single unit of work. A transaction can either be committed (applied to the database) or rolled back (undone), ensuring data consistency and integrity. &nbsp; Commit Committing a transaction means making its changes permanent in the database. After a&hellip;&nbsp;Read More &raquo;Database Transaction Terminology","og_url":"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/","og_site_name":"IB Computer Science","article_modified_time":"2023-11-17T06:05:49+00:00","og_image":[{"url":"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2023\/11\/nodes-graph-300x300.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/","url":"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/","name":"Database Transaction Terminology - IB Computer Science","isPartOf":{"@id":"https:\/\/learnlearn.uk\/ibcs\/#website"},"datePublished":"2023-11-17T06:04:55+00:00","dateModified":"2023-11-17T06:05:49+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/ibcs\/database-transaction-terminology\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"IB Computer Science","item":"https:\/\/learnlearn.uk\/ibcs\/"},{"@type":"ListItem","position":2,"name":"Database Transaction Terminology"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/ibcs\/#website","url":"https:\/\/learnlearn.uk\/ibcs\/","name":"IB Computer Science","description":"- learnlearn..uk","publisher":{"@id":"https:\/\/learnlearn.uk\/ibcs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/ibcs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/ibcs\/#organization","name":"IB Computer Science","url":"https:\/\/learnlearn.uk\/ibcs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png","contentUrl":"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/09\/LearnLearnLogowhite-300x41.png","width":300,"height":41,"caption":"IB Computer Science"},"image":{"@id":"https:\/\/learnlearn.uk\/ibcs\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/ibcs\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Transaction A transaction is a sequence of one or more SQL statements that are executed as a single unit of work. A transaction can either be committed (applied to the database) or rolled back (undone), ensuring data consistency and integrity. &nbsp; Commit Committing a transaction means making its changes permanent in the database. After a&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages\/946"}],"collection":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/comments?post=946"}],"version-history":[{"count":3,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages\/946\/revisions"}],"predecessor-version":[{"id":955,"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/pages\/946\/revisions\/955"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/ibcs\/wp-json\/wp\/v2\/media?parent=946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}