CSCI 475 Ch. 10 Flashcards
ACID stands for
atomicity, consistency, isolation, durability
atomicity means that
all operations of a transaction must be completed
consistency refers to the
permanence of database’s consistent state
isolation means
data used during a transaction cannot be used by a second transaction until the first is completed
durability ensures that
once transactions are committed, they cannot be undone or lost
transaction format when updating
BEGIN;
UPDATE [table]
SET [whatever]
WHERE [whatever];
COMMIT;
transaction format when inserting and updating
BEGIN;
INSERT INTO [table] VALUES (whatever);
UPDATE [table]
SET [whatever]
WHERE [whatever];
COMMIT;
lost update occurs when
both transactions write but one write is lost (both read and operate on the original value)
uncommitted data occurs when
a second transaction reads what a first has written before the first decides to rollback (ex: T1 updates quantity from 5 to 10, T2 reads the written value of 10 (no T1 commit) and proceeds, T1 rollback, T2 commit)
inconsistent retrieval occurs when
data is read at different points during another transaction (ex: T1 updates three values by adding 5 - T2 reads value A after 5 has been added, but reads values B and C before 5 has been added)