Quiz Space

January 2024 term · Database Management Systems · BSCS2001

DBMS End Term: 28 April 2024, Set QDB1 (January 2024 term)

The IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 28 Apr 2024, in the January 2024 term, set QDB1: 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
4
MSQ
10
Numerical
6

Updated

Official paper: IIT M DEGREE FN EXAM QDB1 28 Apr 2024 · No negative marking.

Question 1

+2 marksOne correct option
  1. A

    1

  2. B

    2

  3. C

    3

  4. D

    4

Show answer

Correct answer

  • C

    3

Question 2

+2 marksOne correct option

Let us consider the following statistics for searching a condition within a given relation.

  • Number of blocks containing record of the relation (b)=400(b) = 400
  • Time to transfer one block (tb)=0.6(t_b) = 0.6 milliseconds
  • Time for one seek (ts)=8(t_s) = 8 milliseconds

What will be the average cost of selection query on a key attribute using linear search file scan?

  1. A

    166 milliseconds

  2. B

    12.8 milliseconds

  3. C

    128 milliseconds

  4. D

    16.6 milliseconds

Show answer

Correct answer

  • C

    128 milliseconds

Question 3

+3 marksOne correct option

Consider the relational schema:

prescription(doctor_id, doctor_name, patient_id, patient_name, medicine_id, medicine_name), where the domains of all the attributes consist of atomic values. Consider the following FDs for the relation prescription .

  • doctor_id→doctor_namedoctor\_id \rightarrow doctor\_name,
  • patient_id→patient_namepatient\_id \rightarrow patient\_name,
  • medicine_id→medicine_namemedicine\_id \rightarrow medicine\_name,
  • doctor_id→→patient_iddoctor\_id \rightarrow\rightarrow patient\_id,
  • doctor_id→→medicine_iddoctor\_id \rightarrow\rightarrow medicine\_id

From among the decompositions given, identify the one that is in 4NF.

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

Correct answer

  • D

Question 4

+4 marksOne correct option

Consider the table Students given below:

IDNameDepartmentMarks
001HarryComp. Sci.90
002LouisMaths88
003LiamHistory80
004NiallComp. Sci.86
005ZaynHistory91
006LukeGeography82
007AshtonMaths87
008BradleyMusic78
009ConnorBiology92
010AlexMusic100

Let hash function h(x) generate 16-bit binary hash values for the distinct elements in Department attribute:

Comp. Sci.- 1100 0010 1110 0101
History- 1000 1010 0101 1110
Maths- 0111 1100 0011 0110
Geography- 1110 0101 0000 1101
Music- 0100 1010 1111 1011
Biology- 0011 1111 1010 0101

If we insert the records in the following order:
Harry, Liam, Niall, Connor, Bradley, Luke, Louis, Zayn, Alex, Ashton.

Considering bucket size as 2, using dynamic hashing technique, which one of the following denotes the correct distribution of records in hash buckets?

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

Correct answer

  • A

Question 5

+1 markOne or more correct options

Choose the correct statement(s):

Select all that apply.

  1. A

    Time complexity of searching in a BST is O(nlogn)

  2. B

    In a B+ tree the leaf nodes are linked using a link list

  3. C

    Sparse indices are generally faster than dense indices for locating records.

  4. D

    B tree does not allow duplicate search-key values

Show answer

Correct answers

  • B

    In a B+ tree the leaf nodes are linked using a link list

  • D

    B tree does not allow duplicate search-key values

Question 6

+1 markOne or more correct options

Choose the correct statement(s):

Select all that apply.

  1. A

    In Raid 0 architecture, the space utilization is always 100 percent.

  2. B

    In Raid 1 architecture, the data is striped over different disks.

  3. C

    In Raid 4 architecture, the striping unit consists of a disk block

  4. D

    In Raid 5 architecture, the parity blocks are uniformly distributed over all the disks

Show answer

Correct answers

  • A

    In Raid 0 architecture, the space utilization is always 100 percent.

  • C

    In Raid 4 architecture, the striping unit consists of a disk block

  • D

    In Raid 5 architecture, the parity blocks are uniformly distributed over all the disks

Question 7

+2 marksOne or more correct options

Select all that apply.

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

Correct answers

  • C
  • D

Question 8

+2 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • D

Question 9

+3 marksOne or more correct options

Select all that apply.

  1. A

    One team cannot have more than one coach

  2. B

    There might exist a coach who is not training any player

  3. C

    A coach can be coaching more than one team

  4. D

    A player can have only one coach

Show answer

Correct answers

  • B

    There might exist a coach who is not training any player

  • D

    A player can have only one coach

Question 10

+3 marksOne or more correct options

Consider the following relations:

players(pid, name, age, jersey_no)

teams(team_name, matches, points, pid)

Choose the correct TRC or DRC expression which is equivalent to the below SQL query.

sql
SELECT p.name, t.points
FROM players p natural join teams t
WHERE p.jersey_no = 7

Select all that apply.

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

Correct answers

  • A
  • C

Question 11

+3 marksOne or more correct options

Consider you are designing a database schema for a university management system. One of the key relations, R, represents information about courses offered, including details such as course code (XX), instructor (YY), course title (ZZ), and maximum enrollment capacity (WW). The functional dependencies for this relation are as follows:

F={X→Y,YZ→W,W→X}\mathcal{F} = \{X \rightarrow Y, YZ \rightarrow W, W \rightarrow X\}

During the normalization process, you decide to decompose R into two relations: R1(XY)(XY) and R2(YZW)(YZW). Your goal is to ensure that this decomposition preserves all the information without any loss. Determine whether this decomposition is lossless or lossy. If it is lossy, identify which additional functional dependency from the following would make the decomposition lossless.

Choose the correct option(s).

Select all that apply.

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

Correct answers

  • B
  • D

Question 12

+3 marksOne or more correct options

Select all that apply.

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

Correct answers

  • B
  • D

Question 13

+3 marksOne or more correct options

Consider the following two schedules S1 and S2 and three transactions T1T_1, T2T_2, T3T_3:

S1:R2(X);R3(Y);W2(X);R1(X);W3(Y);W1(X);R2(Y);W2(Y);\mathbf{S1}: R_2(X); R_3(Y); W_2(X); R_1(X); W_3(Y); W_1(X); R_2(Y); W_2(Y);

S2:R3(X);W3(X);W2(X);W2(Y);W3(Z);R1(Z);R1(X);;W1(Y);\mathbf{S2}: R_3(X); W_3(X); W_2(X); W_2(Y); W_3(Z); R_1(Z); R_1(X); ; W_1(Y);

where Ri(X)R_i(X) denotes a read operation by transaction TiT_i on a data item X, Wi(X)W_i(X) denotes a write operation by transaction TiT_i on a data item X.

Which among the following statements is/are correct?

Select all that apply.

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

Correct answers

  • A
  • C

Question 14

+1 markNumerical answer
Show answer

Correct answer: 6

Question 15

+2 marksNumerical answer
Show answer

Correct answer: 5

Question 16

+3 marksNumerical answer

Consider the following monthly backup schedule used by a company:

MondayTuesdayWednesdayThursdayFridaySaturdaySunday
1/ Full2/ Incremental3/ Incremental4/ Differential5/ Incremental6/ Incremental7/ Differential
8/ Incremental9/ Incremental10/ Differential11/ Incremental12/ Incremental13/ Differential14/ Incremental
15/ Incremental16/ Differential17/ Incremental18/ Incremental19/ Differential20/ Incremental21/ Incremental
22/ Differential23/ Incremental24/ Incremental25/ Differential26/ Incremental27/ Incremental28/ Differential
29/ Incremental30/ Incremental

Let A be the number of backup sets that need to be loaded for a complete recovery, if there is a system failure on the 11th day of the month (after the backup for the day had been completed). Let B be the number of backup sets that need to be loaded for a complete recovery , if there is a system failure on the 25th day of the month (before the backup for the day had been completed).What will be the value of B-A?

Show answer

Correct answer: 1

Question 17

+3 marksNumerical answer
Show answer

Correct answer: 2

Question 18

+4 marksNumerical answer
Show answer

Correct answer: 21

Question 19

+3 marksNumerical answer

Consider the table Points_Table given below to answer the given subquestions.

Team_IDTeam_NameCountryWinsLossesDrawTotal_Points
001BarcelonaSpain81216
002Real MadridSpain63312
003ArsenalEngland54310
004Man UnitedEngland4528
005PSGFrance4438
006BayernGermany3626
007Man CityEngland2454

Table 1: Points_Table

What will be the output of the following SQL query:

sql
SELECT Count(*)
FROM ( ( SELECT Team_Name, Country
FROM Points_Table) AS P
NATURAL JOIN ( SELECT Country, Team_ID, Draw, Total_Points
FROM Points_Table) AS Q )
WHERE Draw>2 and Total_Points<12
Show answer

Correct answer: 7

Question 20

+2 marksOne or more correct options

Consider the table Points_Table given below to answer the given subquestions.

Team_IDTeam_NameCountryWinsLossesDrawTotal_Points
001BarcelonaSpain81216
002Real MadridSpain63312
003ArsenalEngland54310
004Man UnitedEngland4528
005PSGFrance4438
006BayernGermany3626
007Man CityEngland2454

Table 1: Points_Table

Choose the correct expression(s) for the statement given below:
Name all the teams from England, with atmost 5 wins and at least 3 draws.

Select all that apply.

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

Correct answers

  • A
  • D