SlideShare a Scribd company logo
1 of 9
Transactions
CIS-182
Transactions
• Transaction is an action that occurs
– Student enrolls in class
– Often associated to movement
• When enroll, student ID is “moved” to requested enrollment
list
• In a database, data moving from one place to
another, and ensuring proper and complete
movement, is a transaction
Database Transactions
• Provides method for canceling an
operation
• Can restore rows, columns to original
state in event of error or business logic
failure
• Use when changes will either be
committed or discarded in entirety
Transaction Types
• Explicit: Define where the transaction begins,
ends
• Implicit: When data movement occurs without a
specific beginning, a transaction is implied
• Goal is to ensure that database is always correct
– Movement (storage) is successful; or
– Movement is cancelled
– No partial movement is allowed
ACID
• ACID describes conditions that a valid
transaction must meet
• Atomic: All steps in an operation are treated as
one piece of work
– All steps succeed or no steps succeed
• Consistent: Outcome is always predictable
– An operation will always work or never work
ACID – 2
• Isolated: If multiple transactions occur, data
is never available in an intermediate state
(partial change)
• Durable: Once finished, all changes are complete
and changes can only be done by another
transaction/unit of work
Transaction Log
• Tracks each action in the database
– Provides a record of what happened in sequential
order
• Used by SQL Server to ensure that ACID
requirements are met
• Also used in event of failure to recreate database
since last backup
– Backups create record of database contents at specific
points in time
CRUD
• Four operations affecting data
• Create (or INSERT) an entry
• Retrieve (or SELECT) an entry
• Update an entry
• Delete an entry
CIS-182 Transactions
• Using implied transactions
• When executing INSERT, UPDATE, DELETE, if
any part of the statement fails, the change to the
row is not saved to disk
– In INSERT, if one value doesn’t satisfy a CHECK
constraint, no values are added to the table
– When UPDATE, if referential integrity is violated the
change won’t be saved

More Related Content

Viewers also liked

Gz 아프칸맵 소개
Gz 아프칸맵 소개Gz 아프칸맵 소개
Gz 아프칸맵 소개애니파크
 
03 income screen
03 income screen03 income screen
03 income screenchadaga
 
La alimentación aleja
La alimentación alejaLa alimentación aleja
La alimentación alejasoniasefa
 
Posat Cards From Cappadoce
Posat Cards From CappadocePosat Cards From Cappadoce
Posat Cards From CappadoceBryagh
 
A beautiful car donation story
A beautiful car donation storyA beautiful car donation story
A beautiful car donation storysatyanarayana007
 
Tea Overview As Platform Oct2010
Tea  Overview As  Platform  Oct2010Tea  Overview As  Platform  Oct2010
Tea Overview As Platform Oct2010Jae Hak Lee
 
Enterprise Wide Systems
Enterprise Wide SystemsEnterprise Wide Systems
Enterprise Wide SystemsAlbrecht Jones
 
Cc018.4 visitor center_bro_reader_10.27x_s_px exposicion
Cc018.4 visitor center_bro_reader_10.27x_s_px exposicionCc018.4 visitor center_bro_reader_10.27x_s_px exposicion
Cc018.4 visitor center_bro_reader_10.27x_s_px exposicionwww.SmartColombia.org
 
Pal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddataPal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddataMustafa Jarrar
 
A Data Management Primer for Managers
A Data Management Primer for ManagersA Data Management Primer for Managers
A Data Management Primer for ManagersAlbrecht Jones
 
Organizations and Information Systems
Organizations and Information SystemsOrganizations and Information Systems
Organizations and Information SystemsAlbrecht Jones
 
Trasporto del petrolio
Trasporto del petrolioTrasporto del petrolio
Trasporto del petroliolorenza57
 
Cap.2, marvin asturia, ide10188012
Cap.2, marvin asturia, ide10188012Cap.2, marvin asturia, ide10188012
Cap.2, marvin asturia, ide10188012AsturiasIDE10188012
 

Viewers also liked (18)

Gz 아프칸맵 소개
Gz 아프칸맵 소개Gz 아프칸맵 소개
Gz 아프칸맵 소개
 
03 income screen
03 income screen03 income screen
03 income screen
 
La alimentación aleja
La alimentación alejaLa alimentación aleja
La alimentación aleja
 
Posat Cards From Cappadoce
Posat Cards From CappadocePosat Cards From Cappadoce
Posat Cards From Cappadoce
 
A beautiful car donation story
A beautiful car donation storyA beautiful car donation story
A beautiful car donation story
 
Plan de salud
Plan de saludPlan de salud
Plan de salud
 
Tea Overview As Platform Oct2010
Tea  Overview As  Platform  Oct2010Tea  Overview As  Platform  Oct2010
Tea Overview As Platform Oct2010
 
Enterprise Wide Systems
Enterprise Wide SystemsEnterprise Wide Systems
Enterprise Wide Systems
 
Cc018.4 visitor center_bro_reader_10.27x_s_px exposicion
Cc018.4 visitor center_bro_reader_10.27x_s_px exposicionCc018.4 visitor center_bro_reader_10.27x_s_px exposicion
Cc018.4 visitor center_bro_reader_10.27x_s_px exposicion
 
Target audience
Target audienceTarget audience
Target audience
 
Timing1 erparcial
Timing1 erparcialTiming1 erparcial
Timing1 erparcial
 
O outono
O outono   O outono
O outono
 
Trabajo de fernando historia
Trabajo de fernando historiaTrabajo de fernando historia
Trabajo de fernando historia
 
Pal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddataPal gov.tutorial2.session15 1.linkeddata
Pal gov.tutorial2.session15 1.linkeddata
 
A Data Management Primer for Managers
A Data Management Primer for ManagersA Data Management Primer for Managers
A Data Management Primer for Managers
 
Organizations and Information Systems
Organizations and Information SystemsOrganizations and Information Systems
Organizations and Information Systems
 
Trasporto del petrolio
Trasporto del petrolioTrasporto del petrolio
Trasporto del petrolio
 
Cap.2, marvin asturia, ide10188012
Cap.2, marvin asturia, ide10188012Cap.2, marvin asturia, ide10188012
Cap.2, marvin asturia, ide10188012
 

Similar to Database transactions explained

acid property.pptx
acid property.pptxacid property.pptx
acid property.pptxAjeet Mish
 
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 management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency controlDhani Ahmad
 
Transaction Processing its properties & States
Transaction Processing its properties & StatesTransaction Processing its properties & States
Transaction Processing its properties & StatesMeghaj Mallick
 
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
 
B.tech admission in india
B.tech admission in indiaB.tech admission in india
B.tech admission in indiaEdhole.com
 
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSING
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSINGSKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSING
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSINGSkillwise Group
 
Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319ARVIND SARDAR
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing ConceptNishant Munjal
 
Data flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousingData flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousingDr. Dipti Patil
 
Get started with data migration
Get started with data migrationGet started with data migration
Get started with data migrationThinqloud
 

Similar to Database transactions explained (20)

acid property.pptx
acid property.pptxacid property.pptx
acid property.pptx
 
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
 
Tranasaction management
Tranasaction managementTranasaction management
Tranasaction management
 
Transactions
TransactionsTransactions
Transactions
 
Transation.....thanveeer
Transation.....thanveeerTransation.....thanveeer
Transation.....thanveeer
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
Transaction Processing its properties & States
Transaction Processing its properties & StatesTransaction Processing its properties & States
Transaction Processing its properties & States
 
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
 
Unit 4 dbms
Unit 4 dbmsUnit 4 dbms
Unit 4 dbms
 
B.tech admission in india
B.tech admission in indiaB.tech admission in india
B.tech admission in india
 
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSING
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSINGSKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSING
SKILLWISE-SSIS DESIGN PATTERN FOR DATA WAREHOUSING
 
Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319
 
Sql transacation
Sql transacationSql transacation
Sql transacation
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing Concept
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 
Data flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousingData flow in Extraction of ETL data warehousing
Data flow in Extraction of ETL data warehousing
 
DBMS UNIT IV.pptx
DBMS UNIT IV.pptxDBMS UNIT IV.pptx
DBMS UNIT IV.pptx
 
Get started with data migration
Get started with data migrationGet started with data migration
Get started with data migration
 
DBMS 4.pdf
DBMS 4.pdfDBMS 4.pdf
DBMS 4.pdf
 

More from Randy Riness @ South Puget Sound Community College

More from Randy Riness @ South Puget Sound Community College (20)

Stored procedures
Stored proceduresStored procedures
Stored procedures
 
3 sql overview
3 sql overview3 sql overview
3 sql overview
 
Normalization
NormalizationNormalization
Normalization
 
CIS160 final review
CIS160 final reviewCIS160 final review
CIS160 final review
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
CIS 245 Final Review
CIS 245 Final ReviewCIS 245 Final Review
CIS 245 Final Review
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis166 Final Review C#
Cis166 Final Review C#Cis166 Final Review C#
Cis166 Final Review C#
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
CIS245 sql
CIS245 sqlCIS245 sql
CIS245 sql
 
Cis245 Midterm Review
Cis245 Midterm ReviewCis245 Midterm Review
Cis245 Midterm Review
 
CSS
CSSCSS
CSS
 
XPath
XPathXPath
XPath
 
XSLT Overview
XSLT OverviewXSLT Overview
XSLT Overview
 
Views
ViewsViews
Views
 
CIS282 Midterm review
CIS282 Midterm reviewCIS282 Midterm review
CIS282 Midterm review
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
CIS 145 test 1 review
CIS 145 test 1 reviewCIS 145 test 1 review
CIS 145 test 1 review
 
XML schemas
XML schemasXML schemas
XML schemas
 
Document type definitions part 2
Document type definitions part 2Document type definitions part 2
Document type definitions part 2
 

Recently uploaded

Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 

Database transactions explained

  • 2. Transactions • Transaction is an action that occurs – Student enrolls in class – Often associated to movement • When enroll, student ID is “moved” to requested enrollment list • In a database, data moving from one place to another, and ensuring proper and complete movement, is a transaction
  • 3. Database Transactions • Provides method for canceling an operation • Can restore rows, columns to original state in event of error or business logic failure • Use when changes will either be committed or discarded in entirety
  • 4. Transaction Types • Explicit: Define where the transaction begins, ends • Implicit: When data movement occurs without a specific beginning, a transaction is implied • Goal is to ensure that database is always correct – Movement (storage) is successful; or – Movement is cancelled – No partial movement is allowed
  • 5. ACID • ACID describes conditions that a valid transaction must meet • Atomic: All steps in an operation are treated as one piece of work – All steps succeed or no steps succeed • Consistent: Outcome is always predictable – An operation will always work or never work
  • 6. ACID – 2 • Isolated: If multiple transactions occur, data is never available in an intermediate state (partial change) • Durable: Once finished, all changes are complete and changes can only be done by another transaction/unit of work
  • 7. Transaction Log • Tracks each action in the database – Provides a record of what happened in sequential order • Used by SQL Server to ensure that ACID requirements are met • Also used in event of failure to recreate database since last backup – Backups create record of database contents at specific points in time
  • 8. CRUD • Four operations affecting data • Create (or INSERT) an entry • Retrieve (or SELECT) an entry • Update an entry • Delete an entry
  • 9. CIS-182 Transactions • Using implied transactions • When executing INSERT, UPDATE, DELETE, if any part of the statement fails, the change to the row is not saved to disk – In INSERT, if one value doesn’t satisfy a CHECK constraint, no values are added to the table – When UPDATE, if referential integrity is violated the change won’t be saved