47
C H A P T E R 1 7
D
a
t
a
b
a
s
e
S
y
s
t
e
m
A
r
c
h
i
t
e
c
t
u
r
e
s
,
P
a
r
a
ll
e
l
and
D
i
s
t
r
i
bu
t
e
d
D
a
t
a
b
a
s
e
s
(
C
h
a
p
t
e
r
s
17, 18 and
19
)
This section contains questions for Chapters 17, 18 and 19 from the book.
E
x
e
r
c
i
s
e
s
17.1 What are transaction scale up and batch scale up? For each, give an example of a
17.2 If you were building a highly parallel database system, which of the following
17.3 Two-phase
commit
a. What is the motivation for two-phase commit and what does it
ensure?
. .
.2
b. Outline the main phases of two-phase commit during normal operation.
. .
.2
c. If a coordinator fails after a site has voted to commit the transaction,
what
can the site do?
. .
.2
17.4 In 2PC, suppose the coordinator fails after sending a
<
prepare
T
>
message.
17.5 Suppose all data is stored partitioned in round robin fashion. The partition op-
erator can be specified in the form
p
a
r
t
[
p
a
]
(
r
)
where
r
is a relation and pa is
a list of the partitioning attributes; don’t worry about the exact partitioning
vector. Give a good parallel plan using the partition operator and relational
48 Chapter 17 Database System
Architectures,
Parallel and
Distributed
Databases
(Chapters
17, 18 and 19)
17.6 2PC
a. In twophase commit, outline what steps a site has to take when it recovers and
finds a
<
ready
T,
L>
record in its log; assume that the coordinator of T is
17.7 Majority protocol
a. Explain how reads and writes are executed with replicas handled using the
majority protocol.
. .
.6
17.8 Consider the PNUTS system.
a. If one of the tablets has too much data, what should be done?
. .
.2
b. If one of the tablet servers has too much load, what should be done?
. .
.2