uiz Space

January 2025 term · Database Management Systems · BSCS2001

Database Management Systems End Term: 13 April 2025, Set QDD1 (January 2025 term)

The IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 13 Apr 2025, in the January 2025 term, set QDD1: 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.

Questions
20
Marks
50
Duration
180 min
MCQ
7
MSQ
6
Numerical
7

Updated

Official paper: IIT M DIPLOMA AN EXAM QDD3 13 Apr 2025 · No negative marking.

Question 1

+2 marksOne correct option

Consider a B+-tree index to be built on the attribute StudentID of a table Students, with the following properties:

  • The length of the attribute StudentID is 10 bytes.
  • The size of each child pointer is 14 bytes.
  • The size of each disk block size is 470 bytes.

With the given information, what is the best choice for the order of the non-leaf nodes of the B+-tree?

  1. A

    19

  2. B

    20

  3. C

    21

  4. D

    22

Show answer

Correct answer

  • B

    20

Question 2

+2 marksOne correct option

Consider a log of a transaction as shown below, where the immediate database modification scheme is used.

steplog details
1<T1,start>< T_1, start >
2<T1,A,1000,700>< T_1, A, 1000, 700 >
3<T1,B,600,450>< T_1, B, 600, 450 >
4<T1,C,800,1300>< T_1, C, 800, 1300 >
5<T1,Commit>< T_1, Commit >

Table 1: log table

Suppose the transaction failed before step 5, then which of the following is true?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 3

+2 marksOne correct option

Consider the following monthly backup schedule used by a company:

MondayTuesdayWednesdayThursdayFridaySaturdaySunday
1/ Full2/ Incremental3/ Incremental4/ Incremental5/ Incremental6/ Incremental7/ Differential
8/ Incremental9/ Incremental10/ Incremental11/ Incremental12/ Differential13/ Incremental14/ Incremental
15/ Incremental16/ Incremental17/ Differential18/ Incremental19/ Incremental20/ Incremental21/ Incremental
22/ Differential23/ Incremental24/ Incremental25/ Incremental26/ Incremental27/ Incremental28/ Incremental
29/ Incremental30/ Incremental

If a failure occurs on the 12th 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?

  1. A

    4

  2. B

    5

  3. C

    6

  4. D

    7

Show answer

Correct answer

  • C

    6

Question 4

+2 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 5

+3 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 6

+3 marksOne correct option

Consider the following relational schema:
Employee(emp_id, first_name, last_name, dept_id)
Department(dept_id, dept_name, mngr_id)
Manager(mngr_id, mngr_name)

Questions:

  1. Find the first names of employees whose names start with 'J' and contain at least 6 characters.
  2. Find the total number of employees in each department.
  3. List the department names managed by a manager named 'Brown'.

SQL queries:

sql
a. SELECT first_name FROM Employee WHERE first_name LIKE 'J_____';
b. SELECT first_name FROM Employee WHERE first_name LIKE 'J_____%';
c. SELECT dept_id, COUNT(emp_id) FROM Employee GROUP BY emp_id;
d. SELECT dept_id, COUNT(emp_id) FROM Employee GROUP BY dept_id;
e. SELECT DISTINCT d.dept_name FROM Department d INNER JOIN Manager m
ON d.mngr_id = m.mngr_id WHERE m.mngr_name = 'Brown';
f. SELECT DISTINCT d.dept_name FROM Department d, Manager m WHERE
d.mngr_id = m.mngr_id AND m.mngr_name = 'Brown';

Match the correct SQL queries with the corresponding Questions.

  1. A

    1-a, 2-c, 3-f

  2. B

    1-b, 2-c, 3-e

  3. C

    1-a, 2-d, 3-e

  4. D

    1-b, 2-d, 3-f

Show answer

Correct answer

  • D

    1-b, 2-d, 3-f

Question 7

+1 markOne or more correct options

Choose the correct statement(s).

Select all that apply.

  1. A

    In static hashing, the size of the hash table remains fixed, which may lead to overflow or underutilization of space.

  2. B

    In dynamic hashing, the hash table grows and shrinks dynamically as data is inserted or deleted.

  3. C

    Static hashing is more efficient for applications where the number of records is expected to change frequently.

  4. D

    Dynamic hashing does not handle collisions effectively compared to static hashing.

Show answer

Correct answers

  • A

    In static hashing, the size of the hash table remains fixed, which may lead to overflow or underutilization of space.

  • B

    In dynamic hashing, the hash table grows and shrinks dynamically as data is inserted or deleted.

Question 8

+2 marksOne or more correct options

Consider the instance of a relation R. Which among the following functional dependencies set(s) can be inferred from the given information?

PQRS
p1q1r1s1
p2q2r2s2
p3q3r3s3
p1q1r1s1
p4q4r4s4
p2q1r2s2

Table 2: Relation R

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 9

+2 marksOne or more correct options

Consider the Employee table given below:

EmpIDNameDeptSalary
001HarryIT80000
002LouisHR75000
003LiamFinance60000
004NiallIT75000
005ZaynIT68000

Table 4: Employee Table

Which of the following relational algebra expression(s) correctly retrieves the names of employees working in the IT department who earn more than 70,000?

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • A
  • D

Question 10

+2 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • A
  • B

Question 11

+2 marksOne or more correct options

Consider the following Entity Relationship Diagram:

Choose the correct statements.

Select all that apply.

  1. A

    A bank can provide more than one ATM machine

  2. B

    An ATM card is used by only one customer

  3. C

    A customer can use only one ATM card

  4. D

    An ATM card can be inserted in many ATM machines

Show answer

Correct answers

  • A

    A bank can provide more than one ATM machine

  • B

    An ATM card is used by only one customer

  • D

    An ATM card can be inserted in many ATM machines

Question 12

+3 marksOne or more correct options

Select all that apply.

  1. A

    Schedule S is conflict serializable.

  2. B

    Schedule S can be two-phase lockable.

  3. C

    Two phase lockable schedule are always serializable schedule.

  4. D

    Schedule S is not View Serializable

Show answer

Correct answers

  • A

    Schedule S is conflict serializable.

  • B

    Schedule S can be two-phase lockable.

  • C

    Two phase lockable schedule are always serializable schedule.

Question 13

+3 marksNumerical answer

Consider you have a file in your hard disk of size 1000 KB. Seek time of your hard disk read head is 3ms and rotational speed in 30,000 rpm. The disk has 200 sectors per track and 512 bytes per sector. Considering the fact 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)

Show answer

Correct answer: 24

Question 14

+3 marksNumerical answer

Consider a system using the Least Recently Used (LRU) page replacement policy. The system has a main memory buffer with 4 slots, and the page reference sequence is as follows:
3, 4, 1, 4, 2, 3, 1, 4, 2, 3
Calculate the total number of page misses (page faults) during this sequence.

Show answer

Correct answer: 4

Question 15

+3 marksNumerical answer

Consider the given log records at an instance of time:

Table 5: Log records

<T0 start>< T_0 \text{ start} >
<T0,A,100,200>< T_0, A, 100, 200 >
<T1 start>< T_1 \text{ start} >
<T1,B,400,300>< T_1, B, 400, 300 >
<T0,C,500,600>< T_0, C, 500, 600 >
<T2 start>< T_2 \text{ start} >
<T2,D,800,700>< T_2, D, 800, 700 >
<Commit T0>< Commit\ T_0 >
<Checkpoint L>< Checkpoint\ L >
<T2,C,500,1000>< T_2, C, 500, 1000 >
<T1,A,100,350>< T_1, A, 100, 350 >
<Commit T2>< Commit\ T_2 >
<T1,D,800,500>< T_1, D, 800, 500 >

Suppose there is a system crash after the last log record. What will be the value of the expression (B-A)+(C-D), based on the values stored on the disk at that point?

Show answer

Correct answer: 500

Question 16

+3 marksNumerical answer
Show answer

Correct answer: 24

Question 17

+3 marksNumerical answer
Show answer

Correct answer: 5

Question 18

+3 marksNumerical answer

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: 10500
  • Total number of seeks required: 500
  • Number of block in the outer relation: 250

What is the number of blocks in the inner relations?

Show answer

Correct answer: 41

Question 19

+3 marksNumerical answer

Consider the SQL query to create a table Insurance and Nominee as shown below and answer the given subquestions

sql
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_id
varchar(20), foreign key (ins_id) references
insurance(ins_id) ON DELETE CASCADE)

The instance of the table insurance and nominee is as shown below:

ins_idpolicyHolderNameagepremium
INS001Ramesh289800
INS002Sumesh298800
INS003Suresh3312200

Table 6: insurance

nominee_idNomineeNamerelationshipins_id
NM001ShaktiWifeINS001
NM002ShyamSonINS001
NM003MuktiWifeINS002
NM004YuktiDaughterINS003

Table 7: nominee

Show answer

Correct answer: 4

Question 20

+3 marksOne correct option

Consider the SQL query to create a table Insurance and Nominee as shown below and answer the given subquestions

sql
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_id
varchar(20), foreign key (ins_id) references
insurance(ins_id) ON DELETE CASCADE)

The instance of the table insurance and nominee is as shown below:

ins_idpolicyHolderNameagepremium
INS001Ramesh289800
INS002Sumesh298800
INS003Suresh3312200

Table 6: insurance

nominee_idNomineeNamerelationshipins_id
NM001ShaktiWifeINS001
NM002ShyamSonINS001
NM003MuktiWifeINS002
NM004YuktiDaughterINS003

Table 7: 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.

sql
insert into insurance values ('INS004', 'Rakesh', 24, 7000);
insert into insurance values ('INS005', 'Sachin', 34, 10000);
insert into nominee values ('NM004', 'Sonu', 'Son', 'INS004');
insert into nominee values ('NM005', 'Suman', 'Wife', 'INS006');
insert into nominee values ('NM005', 'Monu', 'Son', 'INS004');
insert into nominee(nominee_id, ins_id) values ('NM010','INS005');

What will the output of the query below be?

sql
SELECT * FROM nominee
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C