Failure recovery (15) (Khôi phục lỗi trong hệ thống tính toán dữ liệu chuyên sâu) (Tiếng Anh)

UN
Uni24h
다운로드 0회
62
0

자료 내용

2쪽

Integrity or correctness of data • Would like data to be “accurate” or “correct” at all times EMP Name Age White 52 Green 3421 Blue 1 2

3쪽

Integrity or consistency constraints • Predicates data must satisfy • Examples: - x is key of relation R - x → y holds in R (functional dependency) - Domain(x) = {Red, Blue, Green} - a is valid index for attribute x of R - no employee should make more than twice the average salary 3

5쪽

Constraints (as we use here) may not capture “full correctness” Example 1 Transaction constraints • When salary is updated, new salary > old salary • When account record is deleted, balance = 0 5

7쪽

Constraints (as we use here) may not capture “full correctness” Example 2 Database should reflect real world Reality DB 7

8쪽

in any case, continue with constraints... Observation: DB cannot be consistent always! Example: a1 + a2 +…. an = TOT (constraint) Deposit $100 in a2: a2  a2 + 100 TOT  TOT + 100 8

9쪽

Example: a1 + a2 +…. an = TOT (constraint) Deposit $100 in a2: a2  a2 + 100 TOT  TOT + 100 .. .. .. a2 50 150 150 .. .. .. TOT 1000 1000 1100 9

11쪽

Assumption: If T starts with DB in consistent state + T executes in isolation  T leaves DB in consistent state 11

12쪽

Correctness (informally) • If we stop running transactions, DB left consistent • Each transaction sees a consistent DB 12

13쪽

How can constraints be violated? • Transaction bug • DBMS bug • Hardware failure e.g., disk crash alters balance of account • Data sharing e.g.: T1: give 10% raise to programmers T2: change programmers  systems analysts 13

14쪽

How can we prevent/fix violations? • Due to failures only • Due to data sharing only • Due to failures and sharing 14

15쪽

Will not consider: • How to write correct transactions • How to write correct DBMS • Constraint checking & repair That is, solutions studied here do not need to know constraints 15

19쪽

Desired events: see product manuals…. Undesired expected events: System crash - memory lost - cpu halts, resets that’s it!! Undesired Unexpected: Everything else! 19

20쪽

Undesired Unexpected: Everything else! Examples: • Software bugs • Disk data is lost • Memory lost without CPU halt • CPU implodes wiping out universe…. 20

앞 20페이지만 표시됩니다. 전체를 보려면 자료를 다운로드하세요.

댓글 (0)

로그인 하여 토론에 참여하기

댓글이 없습니다. 첫 댓글을 남겨보세요!