0% found this document useful (0 votes)
2 views25 pages

809purl Databases TYS-2026

The document is a workbook for GATE 2026, focusing on detailed explanations of database-related questions in Computer Science and IT. It covers topics such as normalization, functional dependencies, and data manipulation language, providing solutions and explanations for various try-yourself questions. The content is structured to help students understand key concepts and prepare for the GATE examination.

Uploaded by

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

809purl Databases TYS-2026

The document is a workbook for GATE 2026, focusing on detailed explanations of database-related questions in Computer Science and IT. It covers topics such as normalization, functional dependencies, and data manipulation language, providing solutions and explanations for various try-yourself questions. The content is structured to help students understand key concepts and prepare for the GATE examination.

Uploaded by

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

GATE

Workbook 2026
Detailed Explanations of
Try Yourself Questions

Computer Science & IT


Databases

© Copyright: Subject matter to MADE EASY Publications, New Delhi. No part of this book may be reproduced or utilised in any form without the written permission.
1 Introduction to DBMS and Integrity
Constraints and ER Model

T1 : Solution

( i)) Eid Ename Age

Employee Pno

Policyno Email

Policyno., Email and Pno. are multivalued attributes i.e. each employee may have one or more set of
these values.
Hence multivalued attributes are combined with key to make separate tables.
R1 (Eid, Ename, Age, Eid, Pno., Policyno., Email)
Therefore, 1 table is required.
( ii)) For BCNF the functional dependencies should be such that left side of FD is key.
R1 (Eid, Ename, Age)
R2 (Eid, Pno., Policyno., Email)
Eid uniquely determines Ename and Age in R1
In R2 there is no redundancy due to functional dependency so it is in BCNF (redundancy due to
multivalued functional dependency allowed).
( iii)) R1 (Eid, Ename, Age)
R2 (Eid, Pno.)
R3 (Eid, Policyno.)
R4 (Eid, Email)
There are no multivalued dependencies, so all four tables are also in 4NF.
Hence 4 tables are sufficient.

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 3

T2 : Solution

(c)
R (A, B, C, D, E)
The given FD’s are ABC → DE and D → AB because C → C is a trivial FD so DC → ABC will also be a FD.
∴ DC will be a candidate key and ABC is another candidate key.
The following are the super key’s possible listed below.
1. ABCDE 2. ABCD
3. ABC 4. ABCE
5. DC 6. DCA
7. DCB 8. DCAE
9. DCE 10. DCB
∴ 10 super key’s are possible.

T3 : Solution

(c)
As per definition of DML (Data Manipulation Language), it is used for selecting, inserting, deleting and
updating data in database.
Hence option (c) is true.

T4 : Solution

(c)
Inserting tuples, deleting tuples is work of DML i.e. (Data Manipulation Language).

T5 : Solution

(a)
Views in a database system are important because of the following reasons:
(i) They help provide data independence.
(ii) They help with access control by allowing users to see only a particular subset of the data is database.

T6 : Solution

The key for R will be AF


∵ A and F individually cannot determine all attributes alone, but AF can determine ABCDEFGH using
given FD’s.
Alternate
EFG ← H can be removed
∵ F itself can determine G and H, so FG → H is redundant and E is determined by A itself.
So for AF to be key for above FD we don’t need EFG → H.

© Copyright www.madeeasypublications.org
4 Computer Science & IT • Databases

T7 : Solution

(b)
Journal (Volume, Number, Startpage, Endpage, Title, Year, Price)
Primar
Primaryy key: Volume, Number, Startpage, Endpage
FD’s: Volume Number Startpage Endpage → Title
FD’s:
Volume number → Year
Volume Number, Startpage Endpage → Price
Given relation 1NF but not 2NF. This DB is redesigned following schemas
R1(Volume, Number Startpage Endpage Title Price) which has FD’s
Volume Number, Startpage Endpage → Title
Volume Number Startpage Endpage → Price
Which is in BCNF.
R2(Volume, Number, Year)
Volume Number → Year
Which is also in BCNF.
Journal in 1NF
R1 R2 in BCNF
Weakest NF which satisfy R1 and R2 and fails for journal is 2NF.

T8 : Solution

(b)
As R is referring to R2 and S is primary key of R2, πR(r1) – πS(r2) will give empty relation or empty table as
number of values in R column of table r1 will always refer to of respective values in S column of r2.

T9 : Solution

(4)
Minimum number of tables required are 4.
1. Bank {Code, Ph No, Name, Addr} where code, Ph_No. is primary key.
2. Branches {Branch No, Code} where branch number or code is the primary key.
3. Bank_Branch {Addr, Branch_No, Bank_Name}
4. Loan Taken {Loan_No, Amount, Type, Branch_No.} where Loan No as the primary key.
Here we can not merge Branches relation and Bank Branch entity because foreign key “code” is not the
candidate key of Bank entity. So, we can not combined these two.

T10 : Solution

(5)
The RDBMS tables that are need to be drawn will be:
(i) E3 R2 which have ‘A’ as its candidate key.
(ii) E2 R4 which have ‘D’ as its candidate key.
(iii) E1 R3 which have ‘D’ as its candidate key.

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 5

(iv) R1 which has ‘AD’ as the candidate key.


(v) E3 P ; since P is a multi-valued attribute, which has ‘A’ as its candidate key.

T11 : Solution

(50)
For relationship set R candidate and E1 candidate key is same because between E1 to E3, E1 to E2 and E1
to E4 there is one to many relationship.

T12 : Solution

(5)

(AC ) (A B) (A D ) (D E ) DF
A→B D →E

Multivalued attribute always combines with key.

T13 : Solution

(2)
Because of partial participation E1 must separate, E2 R can merge

E1(ABC) E2R(ADEF )
 A → BC D → EF 
 
 D→A 

T14 : Solution

(b)

A B C K L
1

1 1
E1 R4 E4

M 1
3
2
R1 R5 4
D E H I J
N 1

1 1
E2 R3 E3 R6 E5
1 M
M N
R2 5 F G

„„„„

© Copyright www.madeeasypublications.org
2 Normalization

T1 : Solution

(a) R(ABCD), FD = {AB → C, C → D, D → A} are keys: AB, BD, BC


AB → C : AB is a key ⇒ BCNF
C → D : D is key attribute ⇒ 3NF
D → A : A is key attribute ⇒ 3NF
∴ R is in 3NF
(b) R(ABCD), FD = {B → C, B → D} AB is a key
B → C : B is partial dependency.
B → D : B is partial dependency.
∴ R is in 1NF
(c) R(ABCD), FD = {AB → C, BC → D, CD → A, AD → B} keys: AB, BC, CD, AD
∴ All FD’s are in BCNF (LHS is a key)
⇒ R is in BCNF
(d) R(ABCD), FD = {A → B, B → C, C → D, D → A} keys A, B, C, D
All FD’s are in BCNF
⇒ R is in BCNF
(e) R(ABCDE) {AB → C, DE → C, B → D} key: ABE
AB → C : Partial dependency ⇒ 1NF
DE → C : Transitive dependency ⇒ 2NF
B → D : Partial dependency ⇒ 1NF
∴ R is in 1NF

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 7

(f) R(ABCDE): FD = {AB → C, C → D, B → D, D → E} key AB


AB → C : is in BCNF
C → D : Transitive dependency ⇒ 2NF
B → D : Partial dependency ⇒ 1NF
D → E : Transitive dependency ⇒ 2NF
∴ R is in 1NF
(g) R(ABCDE) FD = {A → B, B → C, C → D, D → A} keys = AE, BE, CE, DE
A → B : B is prime attribute
B → C : C is prime attribute
C → D : D is prime attribute
D → A : A is prime attribute
∴ R is in 3NF

T2 : Solution

(a) R(ABCD), FD = {AB → C, C → D, D → A} are keys: AB, DB, CB


AB → C : is in BCNF
C → D : is in 3NF violates BCNF
D → A : is in 3NF violates BCNF
∴ R is in 3NF
BCNF decomposition : {CD, DA, BC}
Not dependency preserving and fails to preserve AB → C dependency
(b) R(ABCD), FD = {B → C, B → D} AB is a key
B → C : is violates 2NF
B → D : is violates 2 NF
2NF decomposition = {B, CD, AB}
3NF decomposition = {BCD, AB}
BCNF decomposition = {BC, BD, AB} and it preserve dependency.
(c) R(ABCD), FD = {AB → C, BC → D, CD → A, AD → B} keys: AB, BC, CD, AD
All FD’s are in BCNF
No decomposition is required.
(d) R(ABCD), FD = {A → B, B → C, C → D, D → A} keys A, B, C, D
All FD’s are in BCNF
∴ R is in BCNF, hence no decomposition required.
(e) R(ABCDE) FD = {AB → C, DE → C, B → D} key: ABE
AB → C : Violates 2NF (Partial dependency)
DE → C : Violates 3NF (Transitive dependency)
B → D : Violates 2NF
2NF decomposition : {ABC, BD, ABE}
3NF decomposition : ?
Canonical cover of FD = {ABE → C}
3NF decomposition = {ABEC, ABDE}
BCNF decomposition : {ABC, DEC, BD, ABE}

© Copyright www.madeeasypublications.org
8 Computer Science & IT • Databases

(f) R(ABCDE): FD = {AB → C, C → D, B → D, D → E} key AB


C → D : Violates 3NF
B → D : Violates 2NF
D → E : Violates 3NF
2NF decomposition = {BDE, ABC}
3NF decomposition = ?
Canonical FD = {BE, ABCD}
3NF decomposition = {BE, ABCD}
BCNF decomposition = {CD, BD, DE, ABC}

T4 : Solution

(56)
A+ = {A B C D E F}
B+ = {A B C D E F}
D+ = {A B C D E F}
Clearly, there are three candidate keys.
Thus, N(A ∪ B ∪ D) = N(A) + N(B) + N(D) – {N(A ∩ B) + N(B ∩ D) + N(A ∩ D) + N (A ∩ B ∩ D)}
Where, N(A ∩ B ∩ D) represents number of super keys where A or B or D is candidate keys.
⇒ N(A ∪ B ∪ D) = 3 × 25 – 3 × 24 + 23
= 96 – 48 + 8 = 56

T5 : Solution

(d)

A→C B→C A→B B→A A→B


A→B B→A A→C B→C A→C

B→A A→B B→A C→A B→A


B→C A→C B→C C→B B→C

C→A C→A C→A A→B C→A


C→B C→B C→B A→C C→B

A→B B→A A→C B → AC A → BC


B→C A→C B→C A→B B→A
C→ A C→B C → AB C→B C→A

1 2 3 4 5

„„„„

www.madeeasypublications.org © Copyright
3 Queries

T3 : Solution

Select Student
From FREQUENTS
Where parlor in (select parlor from SERVES where ice-cream in (select ice-cream from LIKES where
LIKES.student = FREQEUNTS.student))

T4 : Solution

(b)
(a) finds those drinkers who are frequents atleast one bar on same city where he lives.

T5 : Solution

(d)
(a) πA1(R1 – R2) ≡/ πA1(R1) – πA1(R2) because

R1 A1 A2 R2 A1 A2
2 4 2 4
3 4 2 5
2 5 3 5
3 5

LHS results: RHS result:


A1 A1
3
Empty

© Copyright www.madeeasypublications.org
10 Computer Science & IT • Databases

(c) πA1(σC1(R1)) → σC1(πA1(R1)) because LHS is always superset of RHS.


(d) πA1(πA2(σC1(σC2(R1)))) → πA1(σC2(σC1(R1))) with condition A1 ⊂ A2 it gives the same results when LHS is
replaced by RHS.

T6 : Solution

(d)
Course_id Course_id Course_id
CS-101 CS-101 CS-347
– =
CS-347 CS-315 PHY-101
PHY-101 CS-311
FIN-201
HIS-351
MU-199

T7 : Solution

(a)
Query I returns vertices whose out degree is only 2. But Query II returns whose out degree is atleast 2.

T8 : Solution

(d)
1. ρ(R1, πsid (πcid (σ (Course))  Enrols))
branch = ‘CS’
ρ(R2, πsid (πcid (σ (Course))  Enrols))
branch = ‘IT’
R1 ∩ R2
Find the Sid who enrolled atleast one course of CS branch then find the Sid who enrolled atleast one course
of IT branch. Then take inter-section both Sid.
2. {T∃T1 ∈ enrols (∃x∈ courses (x.branch = ‘CS’ ∧ x.cid = T1.cid) ∧ ∃T2 ∈ Enrols (∃y∈ courses (y.branch
= ‘IT’ ∧ y.cid = T2.cid) ∧ T2.sid = T1.sid) ∧ T.sid = T1.sid)}
Find the Sid who enrolled atleast one course of CS branch then find the Sid who enrolled atleast one course
of IT branch with same Sid. Then return Sid.
3. Select Sid
From courses P, Enrols C
where P.branch=‘CS’ AND P.cid = C.cid AND EXISTS (Select Sid
From courses P2, Enrol C2
where P2.branch = ‘IT’ AND C2.sid = C.sid
AND P2.cid = C2.cid)
Find the Sid who enrolled atleast one course of CS branch then find the same Sid enrolled for atleast one
course of IT branch and return it.

„„„„

www.madeeasypublications.org © Copyright
4 File Structure and Indexing

T2 : Solution

(a) File size = 10,000


Block size = 1024
Number of entries in 1st level of Dense Index = Number of records in file.

10000
∴ Number of index blocks =
Block factor of index block

1024
Block factor of index block = = 64
(9 + 7)

10000 
∴ Number of index 1st level blocks =   = 157 blocks
 64 

(b) Number of entries in sparse index = Number of blocks in file

10000
∴ Number of blocks in file =
Block factor in file

1024  1024 
Block factor = = = 11 records/block
100  100 

10000
∴ Number of blocks = = 910 blocks.
11

910
Number of index blocks = = 14.21 = 15
64

© Copyright www.madeeasypublications.org
12 Computer Science & IT • Databases

(c) Number of levels in dense index


rd nd st
3 Level 2 Level 1 Level DB File
3 Entries 157 entries 10000 entries 10000
⇒ 1 Block 157/64 = 3 Blocks 1000/64 = 157 Blocks record

∴ Three levels are required.

(d) Number of levels in sparse index


nd st
2 Level 1 Level DB File
15 Entries 190 entries 10000 entries
⇒ 1 Block ⇒ 15 Blocks (910 Blocks)

T3 : Solution

(a) File size = 30000 records


Number of entries in 1stlevel dense index = Number of records in database

1024
Index block factor = = 69
15

30000
Number of 1st level index blocks = = 435 blocks
69

435
Number of 2nd level index blocks = = 70 blocks
64
Number of 3rd level index blocks = 1 (7 entries only to be entries in index block).

(b) Number of entries in 1st level secondary index = Number of blocks in file

30000
Number of blocks in file =
Block factor of block

1024
Block factor = = 11
100

30000
Number of blocks in file = = 2728 blocks
11

2728 2728
Number of blocks in 1st level = = = 39.5 = 40
Block factor of index block 69
Number of blocks in 2nd level = 1 (only 40 entries per index block and block factor is 69)

(c) 3 levels.

(d) 2 levels.

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 13

T4 : Solution

(a) Database file size = 1250 records


Dense index is used
For minimum

1250
Number of index blocks in 1st level = = 125 blocks
10

125
Number of index blocks in 2nd level = = 12 blocks
11

12
Number of index blocks in 3rd level = = 2 block needed.
11
Number of index blocks in 4th level = Only 1 block needed.
∴ By using Dense index minimum 140 index blocks and 4 index levels are required.

(b) For maximum

1250
Number of index blocks in 1st level = = 250 blocks
5

250
Number of index blocks in 2nd level = = 42 blocks
6

42
Number of index blocks in 3rd level = = 7 block needed.
6

7
Number of index blocks in 4th level = = 2 blocks
6
Number of index blocks in 5th level = Only 1 block needed.
∴ Using Dense index maximum 302 index blocks and 5 index levels are required.

(c) Sparse index and minimum (maximum filling in nodes)

1250
Number of blocks in file = = 417 blocks
3

417
Minimum number of index blocks at 1st level = = 42 (leaf level)
10

42
Minimum number of index blocks at 2nd level = =4
11
Minimum number of index blocks at 3rd level = Only 1 block is needed and minimum 3 levels are
required.

© Copyright www.madeeasypublications.org
14 Computer Science & IT • Databases

(d) Sparse index and Maximum (minimum filling in nodes)

417
Number of index blocks in 1st index file = = 84 (leaf levels)
5

84
Number of index blocks in 2nd index file = = 14
6

14
Number of index blocks in 3rd index file = =3
6
Number of index blocks in 4th index file = 1 block
∴ Using sparse index 102 blocks and 4 levels.

T5 : Solution

(a)
B+ tree records are stored in primary order. B+ tree does not use hashing because it’s not possible to
answer range queries using hashing.
Updations do not cause unbalance in the tree.

T6 : Solution

(c)
The maximum number of new nodes created is “number of levels +1”.
In the given case the number of levels are four (including root).
Hence maximum number of new nodes (created are 5)

T7 : Solution

(b)
A data dictionary contains a list of all files in this database, the number of records in each file, and the
names and types of each field.
Data database, only book-keeping information for managing it.

T8 : Solution

(a)
B+ tree balanced because the length of the paths from the root to all leaf nodes are all equal and every
internal node must filled by.

„„„„

www.madeeasypublications.org © Copyright
5 Transaction and
Concurrency Control

T1 : Solution

S1 : r 1(A), r 2(A), r 3(A), w1(B), w 2(B), w3(B)

For the schedule to be view serializable it must satisfy the following conditions: (1) Final Write (2) Initial
Read and (3) WR Sequence.
Final Write
For data item A : No write operations.
For data item B : T1, T2, T3 (order of WRITE operation on data item B)
should execute
Therefore [T1, T2 ]  →T3
before T3

Initial Read
No write operation on A as well as no read operation on B. Hence this condition do not specify an y order
of execution.
WR Sequence
No such sequence. Therefore no condition on order of execution.
∴ The following are the view equivalent schedules.
T1 → T2 → T3
T2 → T1 → T3

S2 : r 1(A), r 2(A), r 3(A), r 4(A), w1(B), w 2(B), w3(B), w 4(B)


As we can see this schedule is similar to previous schedule and “INITIAL_READ” and “WE-SEQUENCE”
do not give any order. The only conditions [T1, T2, T3] should execute before T4.
T1 T2 T3 T4
T1 T3 T2 T4
T2 T1 T3 T4
T2 T3 T1 T4
T3 T1 T2 T4
T3 T2 T1 T4

© Copyright www.madeeasypublications.org
16 Computer Science & IT • Databases

S3 : r 1(A), r 3(D), w1(B), r 2(B), w3(B), r 4(B), w2(C), r 5(C) w 4(E), r 5(E), w5(B)

Final write:
A : No WRITE operation
B : T1 T3 T5 i.e. [T 1, T 3] → T5
C : T2
D : No write operation on D
Initial Read:
A : Only T1 reads, but no update
B : No initial read operation
C : No initial read operation
D : Only T3 reads but no update operation
E: No initial read
∴ No condition on order of execution.
WR Sequence:
A : No updation on A
B : T1 → T2
T2 → T3
T3 → T4
C : T2 → T5
D : No updation D
E: T4 → T5
∴ Therefore only one serial schedule is view equivalent.
T1 → T2 → T3 → T4 → T5

S4 : w1(A), r 2(A), w 3(A), r 4(A), w5(A), r 6(A)


Based on WR sequence there is only one serial schedule which is view equivalent.
T1 → T2 → T3 → T4 → T5 → T6

S5 : r 2(A), r 1(A), w1(C), r 3(C), w1(B), r 4(B), w 3(A), r 4(C), w2(D), r 2(B), w4(A), w4(B)
WR Sequence
B: T1 → T4 , T1 → T2
C: T1 → T3
Final Write
A: T3 , T4 i.e. T3 → T4 (T3 followed by T4)
B: T1 , T4 i.e. T1 → T4
Initial Read
A: T1, T2 reads it initially and later updated by T3 and T4.
∴ (T1 , T2) → (T3 , T4)
B: No initial reads
C: No initial reads
D: No initial reads
∴ Based on the all the above conditions there’s only one serial schedule which is view equivalent
i.e. T1 → T2 → T3 → T4

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 17

T2 : Solution

S1 : T1 T2 T3 S2 : T1 T2 T3
r(x) r(x)
r(z) r(z)
w(x) r(z)
r(x) r(x)
r(y ) r(y)
w(x) Strict recoverable w(x) Not strict recoverable
Cascadeless Irrecoverable
C1 Recoverable C Casscodeless
w(y) w(y)
C3 r(y)
r(y) w(z)
w(z) w(y)
w(y) C1
C2 C2 C2

S3 : T1 T2 T3
r(x)
r(z )
r(x)
r(z)
r(y )
r(y)
No strict
w(x) Recoverable
C1 Cascadless
w(z)
w(y)
w(y)
C C3
C2

T3 : Solution

(1)

No conflict serializable T1 T2
r(x)
Not recoverable concept here
r(x) T1 T2
View serializable T1 → T2
w(x)
No cascade abort w(x)
No cascade abort
Not strict recoverable
(2)

Conflict serializable T1 T2
w(x)
View serializable T1 → T2
r(y) T1 T2
Not recoverable concept
r(y)
Not strict recoverable r(x)
Not cascade abort
Serializable

© Copyright www.madeeasypublications.org
18 Computer Science & IT • Databases

(3)
Conflict serializable T1 T2 T3
Not recoverable r(x)
r(y)
Not strict T1 T2
w(x)
No cascadeless r(x)
Conflict serializable T1 T3 T2 r(y) T3
View serializable
T3 → T2T1
T1T3 → T2
T3 ⋅ T1 → T2
(4)
No conflict serializable T1 T2 T3

Not view serializable r(x)


r(y)
T3 → T2 → Not possible b/c R( y) is initial real T1 T2
w(x)
No recoverable r(y)
No cascadeless T3
w(y)
Not strict w(x)
r(y)
(5)

Not conflict T1 T2
r(x)
View serializable not possible
w(x)
T2 → T1 but T1 come first since initial read w(x)
T1 T2
Recoverable abort
Not strict recoverable commit
Not cascadeless
Not serializable
(6)

Not conflict serializable T1 T2


r(x)
Not view serializable
w(x)
T2 → T1 w(x)
T1 T2
T2 → T1 r(x)
Not recoverable commit
Not cascadeless commit
Not stict
Not serializable
(7)

Not conflict T1 T2
w(x)
View serializable T1 → T2
r(x)
Recoverable
w(x) T1 T2
Not strict r(x)
Cascadeless C1
Serializable

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 19

(8)

Not conflict T1 T2
w(x)
Not view serializable
r(x)
Not recoverable w(x) T1 T2
Not cascadeless C2
C1
Not serializable
Not strict

T4 : Solution

(a) T1 T2 T3
r(a)
r(b)
r(c )
w(b)
w(c)
w(d)

(i) T1 T2 Conflict serial schedules are T3, T2, T1 only 1.

T3

(ii) Number of view equal serial schedules:


T2 → T1 and T3 → T1
So T3 → T2 → T1

(iii) T1 T2 T3
s(a)
r(a)
s(b)
s(c) cannot
r(b) get X(c)
unlock (B)
s(c)
X(d)
r(c)
unlock (c)
X(b)
w(b)
unlock (b)
unlock (a) No allowed because
X(c ) T2 is in shrinking
w(c)
w(d) phase

Schedule is not allowed by 2PL


Not allowed by strict 2PL.

© Copyright www.madeeasypublications.org
20 Computer Science & IT • Databases

(iv) If (T1, T2, T3) = (10, 20, 30)


Set of rollbacks are (T1 → T1) for W(B) → R(B), (T2 → T3) for W(c) → R(c).
So transaction T1 and T2 are rollback.
• If (T1, T2, T3) = (30, 20, 10)
No rollback i.e., time-stamp ordering is T3 → T2 → T1.
• If (T1, T2, T3) = (20, 10, 30)
Transaction T2 is rollback on C.
• If (T1, T2, T3) = (30, 10, 20)
Transaction T2 is rollback on C.
• If (T1, T2, T3) = (20, 30, 10)
Transaction T1 is rollback on B.
• If (T1, T2, T3) = (10, 30, 20)
Transaction T1 is rollback on B.

(b) r 1(a ), r 2(b), r 3(c ), w 1(b), w 2(c), w 3(a)

T1 T2 T3
r(a)
r(b)
r(c )
w(b)
w(c)
w(a)

(i) Conflict serializable

T1 T2

T3

Since, there is a cycle in the precedence graph, hence the schedule is not conflict serializable.
(ii) View serializable
For A → T1 → T3
For B → T2 → T1
For C → T3 → T2
Hence, none of the schedule can lead to a view serializable schedule.
(iii) Basic 2PL
T1 T2 T3
S(a )
r(a) S(b)
r(b)
S(c)
r(c )
w(b)
w(c)
w(a)

No basic 2PL possible.

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 21

(iv) Strict 2PL


T1 T2 T3
s(A)
r(A)
unlock(A)
s(C)
r(B)
S(b)
unlock(b)
S(a)
S(c)
r(c)
Unlock(c)
X(B)
W(B)
unlock(b)
X(C)
W(C)
unlock(c)
X(A)
W(A)
unlock(A)

(c) r 1(A), r 2(B), r 3(C), r 1(b ), r 2(C), r 3(d ), w 1(C), w 2(D), w 3(E)
(i ) Conflict serializable
T1 T2 T3
r (A )
r(B)
r(C)
T1 T2
r( b )
r( c )
r( d ) T3
w(c)
w(d)
w(e )

∴ Conflict serializable.
Order ⇒ T3 → T2 → T1
(ii) View serializable: T3 → T 2 → T 1
∴ Because, on data item ‘C’ initial read is by T3 and final write is by T1. Hence, T3 should be followed by T1.
∴ Because, on data item ‘d ’ initial read is by T3 and final write is by T2.
Hence T3 should be followed by T2.
(iii) Basic 2PL

T1 T2 T3
S(a),S( b)
r(a)
S(b),S(c)
r(b)
S(c), S(d), X(e)
r(c)
r(b)
r(c)
Not
allowed r(d)
X(c)
w(c)
w(d)
w(e)

∴ Not allowed under basic 2PL.

© Copyright www.madeeasypublications.org
22 Computer Science & IT • Databases

(iv) Strict 2PL:

T1 T2 T3
S(a),S(b)
r(a)
unlock (a) S(b ),S(c)
r(b)
unlock (b)
S(b),S(d)
r(c)
unlock (c)
r(b)
unlock (b)
r(c)
unlock (c)
r(d)
unlock (d)
X(c)
w(c)
unlock (c)
w(d)
X(d)
unlock (d)
w(e)
X(e)
unlock (e)

(d) r 1(A), r 2(B), r 3(C), r 1(B), r 2(C), r 3(D), w1(A), w2(A), w 3(C)
(i) Conflict serializable

T1 T2 T3
r(a )
r(b)
r(c )
T1 T2
r(b )
r(c)
T3
r(d)
w(a)
w(a)
w(c)

∴ Schedule is conflict-serializable.
(ii) View serializable
Hence only for data item ‘a’, initial read is done by T1 and final write is done by T2. Hence T1 should be
followed by T2.
For any other data item, there is no such dependency. Hence, the schedule possible under view serializable
are: T3, T1, T2, T1, T3, T2, T1, T2, T3

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 23

(iv) Strict 2PL

T1 T2 T3
X(a)
r(a)
S(b)
r(b)
S(c),S(d)
r(c)
unlock (c)
S(b)
r(b)
unlock (b)
S(c)
r(c)
unlock (c)
r(d)
unlock (d)
w(a)
unlock (b)
X(a)
w(a)
unlock (a)
X(c)
w(c)
unlock (c)

(iii) Basic 2PL

T1 T2 T3
r(a)
S(b ),S(c)
r(b)
S(c),S(d)
r(c)
r(b)
r(c)
r(d)
w(a)
unlock (b)
unlock (a)
X(a)
w(a)
unlock (a)
unlock (b)
unlock (c)
X(c)
w(c)
unlock (c)
unlock (d)

∴ Allowed under basic 2PL.

© Copyright www.madeeasypublications.org
24 Computer Science & IT • Databases

(e) r 1(A), r 2(B), r 3(C), r 1(B), r 2(c), r 3(A), w 1(A), w2(B), w 3(C)
(i) Conflict serial schedule

T1 T2 T3
r(a )
r(b)
r(c)
T1 T2
r(b )
r(c)
T3
r(a )
w(a)
w(b )
w(c)

∴ Conflict serializable schedule: T3, T1, T2, T1, T3, T2, T1, T2, T3
(ii) View serializable
Since the schedule is conflict serializable hence view serializable two.
(iii) Basic 2PL

T1 T2 T3
X(a),s(b)
r(a)
S(b),s(c)
r(b)
s(c)
not possible

r(c)
r(b)
r(c)
s(a)
r(a)
w(a)
w(b)
w(c)

∴ Hence, schedule is not possible under basic 2PL.


(iv) Strict 2PL

T1 T2 T3
s(a),s(b)
r(a)
s(b),s(c)
r(b)
s(c)
r(c)
r(b)
unlock (b)
r(c)
unlock (c)
s(a)
r(a)
unlock (a)
X(a)
w(a)
unlock (a)
X(b)
w(b)
unlock (b)
X(c)
w(c)
unlock (c)

www.madeeasypublications.org © Copyright
Detailed Explanations of Try Yourself Questions : GATE 2026 25

T5 : Solution

(c)
Concurrency control ensures isolation of the transactions.
Recovery management is responsible for Atomicity. Application manager (user) ensures consistency.

T6 : Solution

(c)
Ensuring consistency for an individual transaction is the responsibility of application programmer.

T7 : Solution

(b)
Every view serializable is not conflict serializable i.e., when schedule is view serializable and there is a
write-write conflict then it is not conflict serializable.

T12 : Solution

(c)
No uncommitted reads so that its casecadeless rollback recoverable because T1w1(x) before T1 commit /
Rollback T2w2(x).
So not strict recoverable.
T1 T2
r2(x)
r1(x)
r2(y)
w1(x)
r1(y)
w2(x)
a1
a2

„„„„

© Copyright www.madeeasypublications.org

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy