1. Trang chủ
  2. » Giáo án - Bài giảng

cơ sở dữ liệu lê thị bảo thu exercises 5 concurrency control techniques sinhvienzone com

2 93 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 2
Dung lượng 303,65 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Consider the schedule shown in the following figure.. Draw the wait-for graph before and after the last action write_lockA of transaction T3.. read_lockA read_itemA read_lockB write_lock

Trang 1

DBMS – HK1 2016-2017 Exercises – Chapter 5

Khoa Khoa học & Kỹ thuật Máy tính – Đại học Bách Khoa TP.HCM 1

Exercises (Course: Database Management Systems)

Chapter 5 Concurrency Control Techniques

1 Consider the schedule shown in the following figure

Draw the wait-for graph before and after the last action write_lock(A) of transaction T3

read_lock(A) read_item(A)

read_lock(B)

write_lock(B) write_item(B)

write_lock( C)

read_lock(C) read_item(C)

write_lock(B)

write_lock(A)

2 Consider the set of transactions accessing database element A shown in the following figure

These transactions are operating under an ordinary timestamp-based scheduler Explain why the transaction T3 has to be aborted What happens if these transactions are operating under a multiversion timestamp-based scheduler?

(Note: In the figure r means read and w means write.)

WT=0

Trang 2

DBMS – HK1 2016-2017 Exercises – Chapter 5

Khoa Khoa học & Kỹ thuật Máy tính – Đại học Bách Khoa TP.HCM 2

w1(A)

r2(A) w2(A)

r3(A) Abort

r4(A)

WT=150 RT=200 WT=200

RT=225

3 Consider the relation Movie(title, year, length, studioName)

Transaction T1 consists of the query:

SELECT * FROM Movie

WHERE title = ‘King Kong’

Transaction T2 consists of the query:

UPDATE Movie SET year = 1939

WHERE title = ‘Gone with the wind’

Assume that there are two records in relation Movie with the title ‘King Kong’ and there is one record with the title ‘Gone with the wind’

Suggest the collection of locks for this situation (Multiple Granularity Locking)

Ngày đăng: 29/01/2020, 14:41

TỪ KHÓA LIÊN QUAN

w