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)

ログイン して議論に参加する

まだコメントはありません。最初のコメントを書きましょう!