what is transaction processing
any information that’s divided into individual, indivisible operations called transactions
each transaction must succeed or fail as a complete unit, no partial completions
a sequence of one or more SQL statements run as a single unit of work
what are the 4 base functionalities
CRUD
Create - insert/create
Read - select
Update - update
Delete - delete
for data integrity transaction processing in database management systems (DBMS) must conform to
ACID
atomicity
consistency
isolation
durability
describe what ATOMICITY is in ACID
when a change to a database is fully or not at all performed
without it a bank transfer from one account to another could deduct funds from the source but not add funds to the destination
describe what CONSISTENCY is in ACID
any change in a database must retain the overall state of the database e.g. transferring funds from one bank account to another
so referential integrity is preserved
describe what ISOLATION is in ACID
transaction must not be interrupted by another transaction, it must occur in isolation so other user cannot access the used data, by using record locking
describe what DURABILITY is in ACID
once a change in a database is successfully made it must not be lost due to a system failure. e.g. achieved by making DBMS write affects/ outcomes of transaction immediately backed to a permanent secondary storage, unlike a temp volatile storage like main memory (RAM)
when does data redundancy occur
when the same piece of data is stored in 2 or more separate places
describe data integrity
ensuring that data in a database remans accurate, consistent, and reliable
how to ensure data integrity (4)
-implementing validation rules
-strict access controls
-robust backups
-automated monitoring to prevent corruption
how to ensure data redundancy doesn’t happen
-normalization techniques
-use a centralized database (DBMS) that serves as a definitive source for all departments
what does record locking prevent … so …
allowing multiple users to simultaneously update a database table may cause one of the updates to be lost so…
when a record is updated, the entire record is copied into the user’s own local memory. When the record is saved, the entire record is rewritten to the database
why is data redundancy (having data in two or more places in a database is generally NOT a good thing)