sonumb

트랜잭션의 ACID란? (1) 본문

개발자 이야기/DBMS_일반

트랜잭션의 ACID란? (1)

sonumb 2022. 1. 17. 21:30

발췌: JIM GRAY. ‘TRANSACTION PROCESSING.’ 

 

1.2 What Is a Transaction Processing System?

.

... 생략 ...

.

This book contains considerably more information about the ACID properties. For now, however, a transaction can be considered a collection of actions with the following properties:

이 책은 ACID 속성에 대한 고려할 만한 더 많은 정보가 포함되어 있다. 그러나, 지금은 트랜잭션은 아래의 프로퍼티를 가진 행위의 모음으로 간주될 수 있다.

.

Atomicity. A transaction’s changes to the state are atomic: either all happen or none happen. These changes include database changes, messages, and actions on transducers.
원자성(Atomicity): 트랜잭션의 '특정 상태로의 변경'는 원자적이어야 한다.(모두 발생하거나 모두 발생하지 않음). 이 변경들은 데이터베이스 변경, 메시지, 트랜잭션의 행위를 포함한다.

.

Consistency. A transaction is a correct transformation of the state. The actions taken as a group do not violate any of the integrity constraints associated with the state. This requires that the transaction be a correct program.
일관성 혹은 정합성(Consistency): 트랜잭션은 상태의 '오류없는 전환'이다. 그룹으로 수행된 작업들은 상태와 연관된 무결성 제약 조건을 그 어떤 것이라도 위배하지 않는다. 일관성은 트랜잭션이 오류없는 프로그램임을 요구한다.


역주:

  1. 일관성은 트랜잭션을 작성하는 프로그래머에게 책임이 있다.
  2. 일관성은 하나의 트랜잭션 실행만 고려한다.
  3. "일관성 섹션"의 두번째 문장에서 알 수 있듯, 일관성은 트랜잭션이 실행한 이후라는 것을 가정한다.

Isolation. Even though transactions execute concurrently, it appears to each transaction, T, that others executed either before T or after T, but not both.

고립성(격리)(Isolation): 트랜잭션이 동시에 실행되더라도, 같이 실행된 게 아닌 각각의 트랜잭션 T와 T 이전 혹은 이후에 실행된 트랜잭션들로 나타나야 한다. 

 

Durability. Once a transaction completes successfully (commits), its changes to the state survive failures.

내구성(Durability): 트랜잭션이 성공적으로 완료(커밋)되었다면, 그 상태로의 변경 사항들은 실패에도 살아 남아야 한다.(역주: 심지어 저장 매체 실패에도.)

 

As an example, a banking debit transaction is atomic if it both dispenses money and updates your account. It is consistent if the money dispensed is the same as the debit to the account. It is isolated if the transaction program can be unaware of other programs reading and writing your account concurrently (for example, your spouse making a concurrent deposit). And it is durable if, once the transaction is complete, the account balance is sure to reflect the withdrawal.

 

예를 들어 은행 출금 거래는 돈을 빼고 계정을 업데이트를 둘 다 해야 원자적이다.

지급된 금액이 계좌의 출금액과 동일한 경우 일관성이 있다.

트랜잭션 프로그램이 당신의 계좌를 읽고 쓴느 다른 프로그램을 인지하지 못하는 경우에 고립성이 있다.(예: 당신의 배우자가 동시 예금을 하는 경우)

그리고 트랜잭션이 완료되었고, 계좌 잔액에 출금이 반영되다는 것이 확실하면 내구성이 있다.

 

... 생략 ...

반응형