데이터베이스의 변경사항을 저장하는 방법에는 크게 3가지가 가능함
h4.1) logical logging
h4.2) physical logging
h4.3) physiolgical logging
Statement | Undo | Redo | |||
---|---|---|---|---|---|
INSERT INTO t1 VALUES (1,'ABC', 100); | Delete row 1 | Row1 c1 := 1 c2 := 'ABC' c3 := 100 | |||
UPDATE t1 SET c2='DEF' WHERE c1=1; | Row1 c2 := 'ABC' | Row1 c2 := 'DEF' | DELETE FROM t1 WHERE c1 = 1; | Row1 c1 := 1 c2 := 'DEF' | Delete row 1 |
SELECT c2 FROM t1 WHERE c1 = 1 FOR UPDATE; | Unlock row 1 | Lock row 1 |