[목차]
What is Transaction?
access operations을 포함하는 database processing의 logical unit을 말한다.
논리적으로 하나의 단위로 프로세싱 수행
하나의 논리적인 기능을 수행하는 작업의 단위
Basic operations
- read_item(X)
- item X가 있는 disk block 주소 찾기
- the disk block을 main memory의 buffer에 copy
- buffer의 item X를 program variable X에 copy
- write_item(X)
- item X가 있는 disk block 주소 찾기
- the disk block을 main memory의 buffer에 copy
- program variable X를 buffer에 copy (correct location)
- updated block from buffer를 disk에 store.
Properties of Transaction (ACID)
Atomicity
: Each Transaction은 “all or nothing” 이어야 한다. 일부만 수행되는 건 x
Consistency
: 유효한 data만 database에 저장되어야 한다. ex) 예외가 나면 rollback 해야 함
Isolation
: 트랙잭션은 다른 트랜잭션에 영향을 미쳐서는 안 된다. (접근도 x)
Durability