You are on page 1of 3

Sample questions on Distributed Database

CSE411 Summer 2023

Given the following sites and data items

Sites Data item


S1 ABCD
S2 AB
S3 CD
S4 BC
S5 D
S6 C

A transaction is given as follows:

T1 at site 1:
Read (B)
B= B+1000
Write (B)
Commit

1. What are the responsibilities of transaction manager and transaction coordinator of site 1
for this transaction?
2. Explain in your own word, how is the commit performed?
3. Show in a diagram how is commit performed when all sites agree to commit using 2 phase
COMMIT protocol. Write the log records of the coordinator. Write the log records of any
other site participating in the transaction.
4. Show in a diagram how is abort performed when one site do not agree to commit. Write the
log records of the coordinator. Write the log records of site not agree to commit the
transaction.
5. Given relations and the corresponding sites as follows.

Relation schema DDL Site No. of tuples


Project (p-id, name, budget) Create table project ( S1 1000
p-id char(10) primary key,
name varchar2(50)
budget number (10, 2))

Employee (e-id, name, street, Create table employee ( S2 10000


city, salary) e-id char(10) primary key,
name varchar2(50),
street varchar2(30),
city varchar2(30),
salary number (10, 2))

Works-for(e-id, p-id, start- Create table works-for ( S3 500000


date, end-date) e-id char(10),
p-id char(10),
s-date date, e-date date)

Find the query cost ignoring CPU and disk costs (only transmission cost) for the queries as
follows.

a. Project ⋈ works-for ⋈ employee at site S1


b. Project ⋈ works-for ⋈ employee at site S2
c. Project ⋈ works-for ⋈ employee at site S3

Consider the following cases:


i. Transfer all relations in query originating site
ii. Transfer relations in sequential order e.g., S1 → S2 → S3→S1

6: Find the query cost ignoring CPU and disk costs (only transmission cost) for the queries as
follows using semi-join operation.

a. Project ⋈ works-for at site S1


b. works-for ⋈ employee at site S3
c. employee ⋈ works-for at site S2

Show the steps of semi-join operations.


6. Explain transaction processing in DBMS showing the transactional work area, buffer and the
database in the disk.
7. Explain log-based recovery showing a simple transaction of account A update and its log
record.
8. Explain the purpose of checkpoint. How is checkpoint performed.
9. *** several transactions will be given as given in the slides. You will have to perform
recovery (undo and redo of transactions).

You might also like