uiz Space

January 2025 term · Database Management Systems · BSCS2001

Database Management Systems End Term: 13 April 2025, Set QDD3 (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 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.

Questions
20
Marks
50
Duration
180 min
MCQ
8
MSQ
5
Numerical
7

Updated

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

Question 1

+2 marksOne correct option

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

StudentIDCourseGradeInstructor
S1C1AI1
S1C2BI2
S2C1AI1
S3C3CI3
S2C2BI2
S4C4AI4
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 2

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

Correct answer

  • D

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 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?

  1. A

    4

  2. B

    5

  3. C

    6

  4. D

    3

Show answer

Correct answer

  • D

    3

Question 4

+3 marksOne correct option

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?

  1. A

    Statement 1 is true and statement 3 is false

  2. B

    Statement 2 is true and statement 3 is false

  3. C

    Statements 1 and 2 are true

  4. D

    All these statements are true.

Show answer

Correct answer

  • A

    Statement 1 is true and statement 3 is false

Question 5

+3 marksOne correct option

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

  • The length of the attribute OrderID is 12 bytes.
  • The size of each child pointer is 16 bytes.
  • The disk block size is 560 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 6

+3 marksOne correct option

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:

  1. Find the first names of students whose first name end with 'A' and contain at least 4 characters.
  2. Find the total number of students enrolled in each course.
  3. List the course names taught by an instructor named 'Johnson'.

SQL queries:

sql
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

    1-a, 2-d, 3-f

  2. B

    1-b, 2-d, 3-e

  3. C

    1-a, 2-c, 3-e

  4. D

    1-b, 2-c, 3-f

Show answer

Correct answer

  • A

    1-a, 2-d, 3-f

Question 7

+1 markOne correct option

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.

  1. A

    Both the statements are correct.

  2. B

    Both the statements are wrong.

  3. C

    Statement 1 is correct and statement 2 is wrong.

  4. D

    Statement 1 is wrong and statement 2 is correct.

Show answer

Correct answer

  • A

    Both the statements are correct.

Question 8

+1 markOne or more correct options

Choose the correct statement(s).

Select all that apply.

  1. A

    In static hashing, overflow is commonly handled using overflow buckets or chaining.

  2. B

    Dynamic hashing is suitable for applications where the number of records is unpredictable.

  3. C

    Static hashing is ideal when the dataset size is expected to grow significantly.

  4. D

    Dynamic hashing ensures that hash table utilization remains balanced as data changes.

Show answer

Correct answers

  • A

    In static hashing, overflow is commonly handled using overflow buckets or chaining.

  • B

    Dynamic hashing is suitable for applications where the number of records is unpredictable.

  • D

    Dynamic hashing ensures that hash table utilization remains balanced as data changes.

Question 9

+3 marksOne or more correct options

Consider the hash functions given below.

  • h1(n)=(n) mod 6h_1(n) = (n) \bmod 6,
  • h2(n)=(n2+2) mod 11h_2(n) = (n^2 + 2) \bmod 11,
  • h3(n)=(4n+5) mod 25h_3(n) = (4n + 5) \bmod 25,
  • h4(n)=(floor(n/3)+4) mod 10h_4(n) = (floor(n/3) + 4) \bmod 10.

Identify the hash function(s), that can generate unique hash values for the following search key values: 14, 29, 37, 25, 19.

Select all that apply.

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

Correct answers

  • C
  • 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 exactly one ATM machine

  2. B

    An ATM card can be used by multiple customers

  3. C

    A customer can use multiple ATM cards

  4. D

    An ATM card can be inserted in many ATM machines

Show answer

Correct answers

  • C

    A customer can use multiple ATM cards

  • D

    An ATM card can be inserted in many ATM machines

Question 12

+2 marksOne or more correct options

Consider the Employee table given below:

EmpIDNameDeptSalary
001HarryIT80000
002LouisHR75000
003LiamFinance60000
004NiallIT75000
005ZaynIT68000

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?

Select all that apply.

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

Correct answers

  • B
  • C

Question 13

+3 marksNumerical answer

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)?

Show answer

Correct answer: 21

Question 14

+3 marksNumerical answer

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:

  • Total number of block transfers: 8400
  • Total number of seeks required: 420
  • Number of block in the outer relation: 210

What is the number of blocks in the inner relations?

Show answer

Correct answer: 39

Question 15

+3 marksNumerical answer
Show answer

Correct answer: 4

Question 16

+3 marksNumerical answer
Show answer

Correct answer: 24

Question 17

+3 marksNumerical answer
Show answer

Correct answer: 4

Question 18

+3 marksNumerical answer

Consider the given log records at an instance of time:

Table 3: Log records

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

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?

Show answer

Correct answer: 2200

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
INS004Rajesh3111100

Table 4: insurance

nominee_idNomineeNamerelationshipins_id
NM001ShaktiWifeINS001
NM002MuktiWifeINS002
NM003YuktiDaughterINS003
NM004PremSonINS004

Table 5: nominee

The following SQL query is executed:

sql
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?

Show answer

Correct answer: 6

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
INS004Rajesh3111100

Table 4: insurance

nominee_idNomineeNamerelationshipins_id
NM001ShaktiWifeINS001
NM002MuktiWifeINS002
NM003YuktiDaughterINS003
NM004PremSonINS004

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.

sql
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?

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

Correct answer

  • B