WeChat:lovexc60
CSCI235/CSCI835 Database Systems
Assignment 2
27 April 2020
Scope
This assignment includes the tasks related to implementation of database transactions.
The outcomes of the laboratory work are due by Saturday 16 May, 2020, 7.00 pm
(sharp).
Please read very carefully information listed below.
This laboratory contributes to 20% of the total evaluation in a subject CSCI235 and it
contributes to 17% of the total evaluation in a subject CSCI835.
A submission procedure is explained at the end of specification.
This assignment consists of 4 tasks and specification of each task starts from a new page.
It is recommended to solve the problems before attending the laboratory classes in order
to efficiently use supervised laboratory time.
A submission marked by Moodle as “late” is treated as a late submission no matter how
many seconds it is late.
A policy regarding late submissions is included in the subject outline.
A submission of compressed files (zipped, gzipped, rared, tared, 7-zipped, lhzed, … etc)
is not allowed. The compressed files will not be evaluated.
All files left on Moodle in a state “Draft(not submitted)” will not be evaluated.
An implementation that does not compile due to one or more syntactical errors scores no
marks.
It is expected that all tasks included within Assignment 2 will be solved individually
without any cooperation with the other students. If you have any doubts, questions, etc.
please consult your lecturer or tutor during lab classes or office hours. Plagiarism will
result in a FAIL grade being recorded for the assessment task.
Prologue
Download the files dbcreate.sql and dbdrop.sql included in a section SAMPLE
DATABASE. To drop a sample database, process a script dbdrop.sql. To create a
sample database, process as script dbcreate.sql. It is strongly recommended to drop
a sample database and to re-create it before each implementation task. No report is
expected from Prologue.
Tasks
Task 1 (4 marks)
View serializability versus conflict serializability
Assume, that a sample database contains three data items x, y, and z and that the values
of the data items are the following x = 10, y = 20, and z = 30.
Consider three database transactions T1 , T2 , and T3 given below.
T1 T2 T3
read(x) read(x) read(x)
write(x, x+10) read(y) read(z)
write(y, x) write(y,x+y) write(z, z+x)
Show a sample concurrent execution of the transaction T1 , T2 , and T3 that is view
serializable and that is not conflict serializable.
Present a concurrent execution of the transaction T1, T2, and T3 that is view
serializable and that is not conflict serializable in a two-dimensional table with three
columns such that each column contains a sequence of operations processed by one
transaction and with nine rows such that each row contains an operation processed by one
transaction.
A sample two-dimensional table that contains a concurrent execution of three database
transaction is available in a presentation Introduction to Transaction
Processing (2), slide 11.
Make sure that two-dimensional table that contains your solutions does not contain a row
with two operations processed by two or more different transactions.
Save your solution in a file solution1.pdf.
Deliverables