0% found this document useful (0 votes)
58 views

CT3 Answers For Higher Order Thinking

Uploaded by

Mirsha R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

CT3 Answers For Higher Order Thinking

Uploaded by

Mirsha R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Consider the following schedule

R(X) denotes read operation on data item X by Transaction Ti.


W(X) denotes write operation on data item X by Transaction Ti.
Identify the possible number of view serializable schedule of the above
schedule S.
Explanation: Step 1: Final Update on data item: Y-T1
Final Update on data item: X-T1
Since the final update on Y and X is made by T1, the transaction T1 must execute after
all
the transactions: (T2,T3) → T1.
Step 2: Initial Read + Which transaction updates after read?
Y : T3 (initial read) then T2 firstly updates it.
Hence, the dependency is: T3 →T2
X : T3 (initial read) then T1 firstly updates it as well as final update also.
Hence, T1 will execute later than T3: T3 →T1
Step 3: Write Read Sequence: T2 firstly writes Y and then T1 reads Y.
Hence, the dependency is: T2 →T1
The ways we can arrange (T3→T2 → T1).
Hence, total possible view serializable schedule of S= 1.

Consider the following schedule

R(X) denotes read operation on data item X by Transaction Ti.


W(X) denotes write operation on data item X by Transaction Ti.
Explain whether this schedule is recoverable or cascadeless.
Recoverable schedule: If a transaction Tj reads a data item previously written
by a transaction Ti , the commit operation of Ti must appear before the commit
operation of Tj .
Cascadeless schedules: For each pair of transactions Ti and Tj such that Tj reads a data
item previously written by Ti, the commit operation of Ti appears before the read
operation of Tj .Here, T2 read data item X before commit of T1. Hence, the schedule is
recoverable

Explain whether this schedule is recoverable or cascadeless.Explain with neat


diagram how insertion is done in B+tree for the following sequence
3,9,16.20.32,24,36,76,72,84,90,48,61,53,69
of key 56?
It will go to 3rd leaf node after 53. As B+ tree is a balanced tree and that
leaf node is already full, we cannot insert the record there directly.
The new leaf node should have values (48, 53, 56, 61, 69) and its current root value is 48.
We
need to split the leaf node from the middle. So, we have to group (48, 53) and (56, 61, 69)
in
2 leaf nodes. If these two have to be leaf nodes, the intermediary node cannot branch
from 48.
It should have 56 added to it and then we can have pointers to the new leaf node. And
the
final tree will be:

Consider a hash table with 8 slots. The hash function is h(X) = X mod 8. The collisions are
resolved by chaining. Find out the maximum, minimum, and average chain lengths in the
hash
table. If the keys are inserted in the following order: 3, 18, 29, 25, 30, 43, 52, 67, 70.
Hence, the maximum chain length = 3
The minimum chain length = 0
The average chain length = 1

You might also like