user: logical unit of work
system: a program unit (sequence of instruction == transaction)
all or nothing
전부 수행되거나, 전부 수행되지 않거나
system crash 가 나면 roll back or roll forward 할 수 있도록 해야 함.
consistence state -> consistence state
현실 세계를 제대로 반영한 상태,
올바른 상태에서 올바른 상태로 넘어가야 한다.
예시) A가 20만원을 들고 있는데 50만원을 인출하라는 건 올바른 게 아님.
따라서 이 영역은 responsability of programmer의 영역이라고 할 수 있음.
should not be interferred
concurrency
동시에 수행해도 각각 수행한 것 처럼 영향받지 않아야 함.
Serial Execution vs Concurrent Execution 비교할 수 있어야 함.
the effect of a completed transaction should be durable and public
한 번 수행된 트랜젝션은 이후의 트랜젝션에도 영향을 끼친다.
CPU가 transaction을 수행한 뒤, completed transaction이 dbms의 disk에 반영되어야 한다.
initial state, while transaction is executing
the final state has been executed
after successful completion
no longer proceed..
transaction has been roll back,
and db restarted to its state prior to the start of transaction
high level 관점에서 transaction을 restart 할 것인지 kill 할 것인지도 정할 수 있음.
동시성을 통해 프로세서랑 디스크 사용량을 늘리고 (노는 CPU랑 disk를 최대한 없게 하고) 평균 response time 을 단축하려고 함.
그런데 lock을 안 걸어주면, isolation을 만족 못 하니깐 이러한 scheme이 등장하게 되었다~
single schedule: read와 write 연산만 남겨서 단순화한 transaction.
schedules: 여러 트랜젝션으로 스케줄 만들 때는 모든 instruction을 포함하고 순서를 보존해서 만들기!