Question 1
Consider the instance of a relation R. Which among the following functional dependencies set can be inferred from the given information?
| StudentID | Course | Grade | Instructor |
|---|---|---|---|
| S1 | C1 | A | I1 |
| S1 | C2 | B | I2 |
| S2 | C1 | A | I1 |
| S3 | C3 | C | I3 |
| S2 | C2 | B | I2 |
| S4 | C4 | A | I4 |

The IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 13 Apr 2025, in the January 2025 term, set QDD3: 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.
Consider the instance of a relation R. Which among the following functional dependencies set can be inferred from the given information?
| StudentID | Course | Grade | Instructor |
|---|---|---|---|
| S1 | C1 | A | I1 |
| S1 | C2 | B | I2 |
| S2 | C1 | A | I1 |
| S3 | C3 | C | I3 |
| S2 | C2 | B | I2 |
| S4 | C4 | A | I4 |
Correct answer
Correct answer
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 23rd day of the month after the backup for the day has been completed, how many backup sets have to be loaded for a full recovery?
4
5
6
3
Correct answer
3
Consider the following schedule S.
S:W1(A), W3(A), W3(C), R2(A), W2(A), W1(B), W3(B)
Consider the following statements.
Statement 1: The given schedule S is Conflict serializable.
Statement 2: All Conflict serializable schedules are 2-P lockable.
Statement 3: The given schedule is 2-P lockable.
Which of the following options is correct?
Statement 1 is true and statement 3 is false
Statement 2 is true and statement 3 is false
Statements 1 and 2 are true
All these statements are true.
Correct answer
Statement 1 is true and statement 3 is false
Consider a B+-tree index to be built on the attribute OrderID of a table Orders, with the following properties:
With the given information, what is the best choice for the order of the non-leaf nodes of the B+-tree?
19
20
21
22
Correct answer
20
Consider the following relational schema:
Student(student_id, first_name, last_name, course_id)
Course(course_id, course_name, instructor_id)
Instructor(instructor_id, instructor_name)
Questions:
SQL queries:
a. SELECT first_name FROM Student WHERE first_name LIKE '___%A';b. SELECT first_name FROM Student WHERE first_name LIKE '___A';c. SELECT course_id, COUNT(student_id) FROM Student GROUP BY student_id;d. SELECT course_id, COUNT(student_id) FROM Student GROUP BY course_id;e. SELECT DISTINCT c.course_name FROM Course c INNER JOIN Instructor i ON c.instructor_id = i.instructor_id WHERE i.instructor_name = 'Johnson';f. SELECT DISTINCT c.course_name FROM Course c, Instructor i WHERE c.instructor_id = i.instructor_id AND i.instructor_name = 'Johnson';Match the correct SQL queries with the corresponding Questions.
1-a, 2-d, 3-f
1-b, 2-d, 3-e
1-a, 2-c, 3-e
1-b, 2-c, 3-f
Correct answer
1-a, 2-d, 3-f
Consider the following statements and select the correct option.
1. RAID 1 employs mirroring, maintaining two identical copies of the data on two different disks 2. RAID 3 has a single check disk with parity information.
Both the statements are correct.
Both the statements are wrong.
Statement 1 is correct and statement 2 is wrong.
Statement 1 is wrong and statement 2 is correct.
Correct answer
Both the statements are correct.
Choose the correct statement(s).
In static hashing, overflow is commonly handled using overflow buckets or chaining.
Dynamic hashing is suitable for applications where the number of records is unpredictable.
Static hashing is ideal when the dataset size is expected to grow significantly.
Dynamic hashing ensures that hash table utilization remains balanced as data changes.
Correct answers
In static hashing, overflow is commonly handled using overflow buckets or chaining.
Dynamic hashing is suitable for applications where the number of records is unpredictable.
Dynamic hashing ensures that hash table utilization remains balanced as data changes.
Consider the hash functions given below.
Identify the hash function(s), that can generate unique hash values for the following search key values: 14, 29, 37, 25, 19.
Correct answers
Correct answers
Consider the following Entity Relationship Diagram:
Choose the correct statements.
A bank can provide exactly one ATM machine
An ATM card can be used by multiple customers
A customer can use multiple ATM cards
An ATM card can be inserted in many ATM machines
Correct answers
A customer can use multiple ATM cards
An ATM card can be inserted in many ATM machines
Consider the Employee table given below:
| EmpID | Name | Dept | Salary |
|---|---|---|---|
| 001 | Harry | IT | 80000 |
| 002 | Louis | HR | 75000 |
| 003 | Liam | Finance | 60000 |
| 004 | Niall | IT | 75000 |
| 005 | Zayn | IT | 68000 |
Table 2: Employee Table
Which of the following relational algebra expression(s) incorrectly retrieves the names of employees working in the IT department who earn more than 70,000?
Correct answers
Consider you have a file in your hard disk of size 1024 KB. The seek time of your hard disk read head is 4 ms, and the rotational speed is 30,000 rpm. The disk has 256 sectors per track, and each sector stores 512 bytes. Considering that the file data is stored in non-consecutive sectors, how much time will be required to read the whole file after a read request is made (in ms)?
Correct answer: 21
Consider a Block nested loop join for the two relations, employee and department. Assuming the worst-case memory availability and employee as the outer relation, the provided details are as follows:
What is the number of blocks in the inner relations?
Correct answer: 39
Correct answer: 4
Correct answer: 24
Correct answer: 4
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 (A+B+C-D), based on the values stored on the disk at that point?
Correct answer: 2200
Consider the SQL query to create a table Insurance and Nominee as shown below and answer the given subquestions
CREATE TABLE insurance (ins_id varchar(20) primary key,policyHolderName varchar(20) not null,age int not null, premium int not null )
CREATE TABLE nominee (nominee_id varchar(20) primary key,NomineeName varchar(20), relationship varchar(20), ins_idvarchar(20), foreign key (ins_id) referencesinsurance(ins_id) ON DELETE CASCADE)The instance of the table insurance and nominee is as shown below:
| ins_id | policyHolderName | age | premium |
|---|---|---|---|
| INS001 | Ramesh | 28 | 9800 |
| INS002 | Sumesh | 29 | 8800 |
| INS003 | Suresh | 33 | 12200 |
| INS004 | Rajesh | 31 | 11100 |
Table 4: insurance
| nominee_id | NomineeName | relationship | ins_id |
|---|---|---|---|
| NM001 | Shakti | Wife | INS001 |
| NM002 | Mukti | Wife | INS002 |
| NM003 | Yukti | Daughter | INS003 |
| NM004 | Prem | Son | INS004 |
Table 5: nominee
The following SQL query is executed:
delete from insurance where ins_id = 'INS001'What will be the value of x, if x represents the total number of rows in insurance and nominee table counted together?
Correct answer: 6
Consider the SQL query to create a table Insurance and Nominee as shown below and answer the given subquestions
CREATE TABLE insurance (ins_id varchar(20) primary key,policyHolderName varchar(20) not null,age int not null, premium int not null )
CREATE TABLE nominee (nominee_id varchar(20) primary key,NomineeName varchar(20), relationship varchar(20), ins_idvarchar(20), foreign key (ins_id) referencesinsurance(ins_id) ON DELETE CASCADE)The instance of the table insurance and nominee is as shown below:
| ins_id | policyHolderName | age | premium |
|---|---|---|---|
| INS001 | Ramesh | 28 | 9800 |
| INS002 | Sumesh | 29 | 8800 |
| INS003 | Suresh | 33 | 12200 |
| INS004 | Rajesh | 31 | 11100 |
Table 4: insurance
| nominee_id | NomineeName | relationship | ins_id |
|---|---|---|---|
| NM001 | Shakti | Wife | INS001 |
| NM002 | Mukti | Wife | INS002 |
| NM003 | Yukti | Daughter | INS003 |
| NM004 | Prem | Son | INS004 |
Table 5: nominee
The following insert statements are executed in the given sequence in the same instance given as the previous question for insurance and nominee tables.
insert into insurance values ('INS005', 'Rakesh', 24, 7000);insert into nominee values ('NM005', 'Sonu', 'Son', 'INS005');insert into nominee values ('NM005', 'Suman', 'Wife', 'INS004');insert into nominee values ('NM006', 'Monu', 'Son', 'INS006');insert into nominee(nominee_id, ins_id) values ('NM010','INS005');What will the output of the query below be?
SELECT * FROM nomineeCorrect answer