Question 1
75000
250
300
50
The IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 1 Sept 2024, in the May 2024 term, set QDF1: 20 questions for 50 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
75000
250
300
50
Correct answer
300
Choose the correct output obtained on running the given SQL statements on Table Employee.
| EID | EName |
|---|---|
| E01 | Arthur |
| E02 | Raina |
| E03 | Meena |
| E04 | Arthur |
| E06 | Joey |
Table Employee
SQL> SAVEPOINT SP1;SQL> UPDATE Employee SET EName=‘Jainie’ WHERE EID=‘E06’;SQL> SAVEPOINT SP2;SQL> DELETE FROM Employee WHERE EID=‘E02’;SQL> SAVEPOINT SP3;SQL> UPDATE Employee SET EName=‘Raina’ WHERE EID=‘E04’;SQL> ROLLBACK TO SP2;Correct answer
Given below are four statements. Match each of them with the corresponding property in the set of ACID properties.
Statement 1: Any data written to the database must be valid according to all the defined rules like the check and key constraints and triggers.
Statement 2: Every completed transaction is saved into the secondary storage.
Statement 3: During money transfer, either the amount debited from the source account must be credited to the destination account or the money should not be debited from the source account at all.
Statement 4: If multiple transactions are being executed concurrently, then the final result should be the same irrespective of the sequence in which the transactions were executed.
Let A denote Atomicity, C denote Consistency, I denote Isolation and D denote Durability. From among the given options, find the correct match.
1 - A, 2 - C, 3 - I, 4 - D
1 - C, 2 - D, 3 - A, 4 - I
1 - C, 2 - D, 3 - I, 4 - A
1 - I, 2 - A, 3 - D, 4 - C
Correct answer
1 - C, 2 - D, 3 - A, 4 - I
Consider the following monthly backup schedule used by a company:
| Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
|---|---|---|---|---|---|---|
| 1/ Full | 2/ Incremental | 3/ Incremental | 4/ Incremental | 5/ Incremental | 6/ Incremental | 7/ Differential |
| 8/ Incremental | 9/ Incremental | 10/ Incremental | 11/ Incremental | 12/ Differential | 13/ Incremental | 14/ Incremental |
| 15/ Incremental | 16/ Incremental | 17/ Differential | 18/ Incremental | 19/ Incremental | 20/ Incremental | 21/ Incremental |
| 22/ Differential | 23/ Incremental | 24/ Incremental | 25/ Incremental | 26/ Incremental | 27/ Incremental | 28/ Incremental |
| 29/ Incremental | 30/ Incremental |
If a failure occurs on the 27th day of the month before the backup for the day has been completed, how many backup sets have to be loaded for a full recovery?
4
5
6
7
Correct answer
6
Consider the table Players as given below:
| PID | name | gender | level |
|---|---|---|---|
| 001 | Percy | Male | International |
| 002 | Jason | Male | District |
| 003 | Hazel | Female | National |
| 004 | Leo | Male | National |
| 005 | Rayna | Female | District |
| 006 | Annabeth | Female | National |
| 007 | Frank | Male | International |
| 008 | Piper | Female | District |
Table 1: Players
Let us create two different bitmap indices, one on the gender attribute and the other on the level attribute. Which of the following options will give the correct result if we want to find all females who are playing in the 'District' level.
Note: Options are in the form of gender (operation) level
00101101 AND 01001001
00101101 OR 00110100
11010010 AND 01001001
11010010 OR 00110100
Correct answer
00101101 AND 01001001
20, 30, 25, 15
15, 20, 25, 30
20, 25, 30, 15
20, 25, 15, 30
Correct answer
20, 25, 30, 15
The following key values are inserted into a B⁺ tree of order 4 in a given sequence. The tree is initially empty.
25,8,13,59,3,31,60,11,43
How many node splits will be required to perform these insertions?
5
4
6
3
Correct answer
3
Correct answer
Choose the correct statement(s):
In a dense index, index record appears for every search-key value in the file.
Secondary index is also called non-clustering index
Sparse index is contains index records for only some search-key values.
In an ordered index, index entries are stored sorted on the search key value.
Correct answers
In a dense index, index record appears for every search-key value in the file.
Secondary index is also called non-clustering index
Sparse index is contains index records for only some search-key values.
In an ordered index, index entries are stored sorted on the search key value.
Let be a relational schema with the following functional dependencies:
We want to decompose the relation A into 3NF. We asked ChatGPT to decompose the relation into 3NF and below shown is the response from ChatGPT:
The decomposed schema in 3NF is:
Which of the following statement(s) is/are correct?
The decomposition R1, R2, R3 are in 3NF and all the dependencies are getting preserved.
In the decomposition, R2 is not required. As R1 and R3 is sufficient decomposition in 3NF and all the dependencies are getting preserved.
In the decomposition, R1 is not required. As R2 and R3 is sufficient decomposition in 3NF and all the dependencies are getting preserved.
In the decomposition, R2 is not required. As R1 and R3 is sufficient decomposition in 3NF but all the dependencies will not get preserved.
Correct answers
The decomposition R1, R2, R3 are in 3NF and all the dependencies are getting preserved.
In the decomposition, R2 is not required. As R1 and R3 is sufficient decomposition in 3NF but all the dependencies will not get preserved.
Schedule S can not be two-phase lockable.
Schedule S can be two-phase lockable.
Schedule S can be strict two-phase lockable.
Schedule S is conflict serializable.
Correct answers
Schedule S can be two-phase lockable.
Schedule S can be strict two-phase lockable.
Schedule S is conflict serializable.
Consider the following schedule S.
| T1 | T2 |
|---|---|
| r(A) | |
| r(b) | |
| w(A) | |
| r(A) | |
| w(A) | |
| w(B) | |
| r(B) | |
| w(B) |
Table 2: schedule: S
Which of the following is true for schedule S?
Schedule S is Conflict serializable
Schedule S is View serializable
Schedule S is not Conflict Serializable
Schedule S is not View Serializable
Correct answers
Schedule S is not Conflict Serializable
Schedule S is not View Serializable
Correct answers
Correct answers
Correct answers
The following numbers are inserted into an empty binary search tree in the given order: 27, 23, 33, 49, 51, 92, 83, 10, 78. What is the height of the resulting binary search tree?
Correct answer: 6
Consider a Block nested loop join for the two relations,instructor and department. Assuming the worst-case memory availability and instructor as the outer relation, the provided details are as follows:
• Total number of block transfers: 20500
• Total number of seeks required: 1000
• Number of block in the outer relation: 500
What is the number of blocks in the inner relations?
Correct answer: 40
Consider the given log records at an instance of time:
Table 3: Log records
Suppose there is a system crash after the last log record. What will be the value of the expression (B+C)-(A+D), based on the values stored on the disk at that point:
Correct answer: 500
Correct answer
There might exist an author who has not written any books
There might exist a student who has not read any book
An author can write at most one book
A student can read at most one book
Correct answer
There might exist a student who has not read any book