GATE (Graduate Aptitude Test in Engineering) Computer Science: Questions 2067 - 2068 of 2080

Access detailed explanations (illustrated with images and videos) to 2080 questions. Access all new questions- tracking exam pattern and syllabus. View the complete topic-wise distribution of questions. Unlimited Access, Unlimited Time, on Unlimited Devices!

View Sample Explanation or View Features.

Rs. 550.00 -OR-

How to register? Already Subscribed?

Question 2067

Question

MCQ▾

Consider the following sequence of two transactions on a bank account (A) with initial balance 20,000 that transfers 5,000 to another account (B) and then apply interest. (December)

1. T1 start

2. T1 A old = 20,000 new 15,000

3. T1 B old = 12,000 new = 17,000

4. T1 commit

5. T2 start

6. T2 A old = 15,000 new = 16,500

7. T2 commit

Suppose the database system crashes just before log record (vii) is written. When the system is restarted, which one statement is true of the recovery process?

Choices

Choice (4)Response

a.

We must redo log record 6 to set B to 10500

b.

We must undo log record 6 to set A to 20000 and then redo log records 2 and 3

c.

We need not redo log records 2 and 3 because transaction T1 has committed

d.

We can apply redo and undo operations in arbitrary order because they are idempotent

Question 2068

Appeared in Year: 2020

Question

MCQ▾

Consider a relational database containing the following schemas.

Tables Shows a Relational Database Containing the Schemas

The primary key of each table is indicated by underlining the constituent fields.

SELECT s. sno, s. sname

FROM Suppliers s, Catalogue c

WHERE s. sno = c. sno AND

Cost > (SELECT AVG (cost)

FROM Catalogue

WHERE pno = ‘P4’

GROUP BY pno) ;

Image Shows SQL Query for Primary Key

The number of rows returned by the above SQL query is

Choices

Choice (4)Response

a.

5

b.

2

c.

4

d.

0

Developed by: