Quiz Space

May 2022 term · Database Management Systems · BSCS2001

Database Management Systems Quiz 2: 10 July 2022 (May 2022 term)

The IIT Madras BS Database Management Systems (DBMS) Quiz 2 paper sat on 10 Jul 2022, in the May 2022 term: 17 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
17
Marks
50
Duration
120 min
MCQ
11
MSQ
4
Numerical
2

Updated

Official paper: IIT M DIPLOMA QUIZ2 EXAM QPE1 10 July 2022 · No negative marking.

Question 1

+2 marksOne correct option

Consider the following statements.
Statement 1: Minimum arity of a node is defined as the arity of the tree.
Statement 2: Arity of the Binary Search Tree is 1.

  1. A

    Statement 1 is correct, statement 2 is wrong.

  2. B

    Statement 1 is wrong, statement 2 is correct.

  3. C

    Both the statements are correct.

  4. D

    Both the statements are wrong.

Show answer

Correct answer

  • D

    Both the statements are wrong.

Question 2

+2 marksOne correct option
  1. A

    Decomposition

  2. B

    Union

  3. C

    Pseudo-transitivity

  4. D

    Augmentation

Show answer

Correct answer

  • B

    Union

Question 3

+2 marksOne correct option

Consider the following statements:
1. HyperText Transfer Protocol (HTTP) is used for communication with the Web server 2. HTTP provides formatting, hypertext link, and image display features.
3. The HTTP protocol is connectionless.
Choose the correct option.

  1. A

    Statements 1 & 2 are correct.

  2. B

    Statements 2 & 3 are correct.

  3. C

    Statements 1 & 3 are correct.

  4. D

    All the statements are correct.

Show answer

Correct answer

  • C

    Statements 1 & 3 are correct.

Question 4

+3 marksOne correct option

Consider the tables Name and Rule shown in the Table 2 and Table 3 respectively.

Name
1. Augmentation
2. Complementation
3. Replication
4. Transitivity

Table 2: Name

Rule
A. If X ↠\twoheadrightarrow Y and Z ⊆\subseteq W, then WX ↠\twoheadrightarrow YZ.
B. If X ↠\twoheadrightarrow Y and Y ↠\twoheadrightarrow Z, then X ↠\twoheadrightarrow (Z –Y)
C. If X ↠\twoheadrightarrow Y, then X ↠\twoheadrightarrow (R - (X ∪\cup Y)).
D. If X →\rightarrow Y, then X ↠\twoheadrightarrow Y but the reverse is not true

Table 3: Rule

Which among the following is the correct matching of Name and Rule?

  1. A

    1-A, 2-D, 3-C, 4-B

  2. B

    1-B, 2-A, 3-D, 4-C

  3. C

    1-A, 2-C, 3-D, 4-B

  4. D

    1-A, 2-C, 3-B, 4-D

Show answer

Correct answer

  • C

    1-A, 2-C, 3-D, 4-B

Question 5

+3 marksOne correct option

Consider a relational schema Faculty (fid,fname,address,experience,designation,salary)(fid, fname, address, experience, designation, salary), where the domains of all the attributes consist of atomic values. Consider the following functional dependencies for the relation Faculty.

F={fid→fname,address,experience,designation,designation→salary,experience→designation}\begin{aligned} &\mathcal{F} = \{ \\ &fid \rightarrow fname, address, experience, designation, \\ &designation \rightarrow salary, \\ &experience \rightarrow designation \\ &\} \end{aligned}

What is the highest normal form of the above relational schema Faculty?

  1. A

    1NF

  2. B

    2NF

  3. C

    3NF

  4. D

    BCNF

Show answer

Correct answer

  • B

    2NF

Question 6

+3 marksOne correct option

Consider the relation CAR(LicenseNo, EngineSerialNo, Model, Year) and the following functional dependencies set

If the relation CAR is decomposed into two relations C1 and C2, which of the following is a lossless decomposition?

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

Correct answer

  • B

Question 7

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

Correct answer

  • D

Question 8

+3 marksOne correct option

Consider table profile shown in table 5:

NameSalary
Data Engg55000
Data Sci.75000
Data Arch.75000
App Dev40000
JAVA Dev30000
Programmer60000

Table 5: profile

Choose the correct output table when the following query is executed.

sql
UPDATE profile
SET salary = salary + 5000
WHERE name LIKE 'Data%' or 'X' = 'X'
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 9

+4 marksOne correct option

Consider table employee inside the database organization. Table employee has the data as shown in table 4:

eidedeptenameesalary
5AccAbhijeet720000
6MarShahid608000
7SalesShab200000
8MarMeenakshi336000
9SalesDj528000
10MarSashi432000
11AccRekha3080000
12HRJoseph1822504
13HRArif3037504

Table 4: employee

How many rows will be fetched and display by the Python code given below?

python
import os
import sys
import psycopg2
conn = None
try:
conn = psycopg2.connect(database = 'organization', user = 'postgres',
password = 'passwrd',host = 'localhost',port = '5432')
cur=conn.cursor()
cur.execute('select * from employee where esalary > 500000')
result = cur.fetchmany()
for i in result:
print(i)
cur.close()
except (Exception, psycopg2.DatabaseError) as error:
print(error)
finally:
if conn is not None:
conn.close()
  1. A

    1

  2. B

    2

  3. C

    3

  4. D

    4

Show answer

Correct answer

  • A

    1

Question 10

+3 marksOne or more correct options

Select all that apply.

  1. A

    {Course, Section, Time}

  2. B

    {Course, Section, Instructor}

  3. C

    {Instructor, RoomNo}

  4. D

    {Course, Section, Time, Instructor}

Show answer

Correct answers

  • A

    {Course, Section, Time}

  • B

    {Course, Section, Instructor}

Question 11

+4 marksOne or more correct options

Consider the table R shown in the Table 1

Which among the following holds true for the given table?

Select all that apply.

  1. A

    X → Y

  2. B

    X →→ Y

  3. C

    X →→ Z

  4. D

    Y → Z

Show answer

Correct answers

  • B

    X →→ Y

  • C

    X →→ Z

Question 12

+4 marksOne or more correct options

Consider a relational schema BankAccount*(Name, AadharNo, AccountNo,ContactNo)* with the following functional dependencies:

Above relation BankAccount is decomposed into three smaller relations. BankAccount1( Name, AadharNo), BankAccount2(AadharNo, AccountNo) and BankAccount3(AccountNo,ContactNo). Based on the given information, which among the following is incorrect?

Select all that apply.

  1. A

    The number of super keys for relation BankAccount are 15.

  2. B

    The decomposition of BankAccount is lossy.

  3. C

    AccountNo → ContactNo is preserved in the decomposed relations.

  4. D

    ContactNo → Name is not preserved in the decomposed relations.

Show answer

Correct answers

  • B

    The decomposition of BankAccount is lossy.

  • D

    ContactNo → Name is not preserved in the decomposed relations.

Question 13

+4 marksOne or more correct options

Select all that apply.

  1. A

    Both X covers Y and Y covers X

  2. B

    X covers Y

  3. C

    Y covers X

  4. D

    Neither X covers Y nor Y covers X

Show answer

Correct answer

  • C

    Y covers X

Question 14

+3 marksNumerical answer

If the maximum level of a complete binary search tree is 5, then what is the maximum number of nodes?
NOTE: Enter your answer to the nearest integer.

Show answer

Correct answer: 63

Question 15

+2 marksOne correct option

Answer the given subquestions on the basis of the following data.
Consider a magnetic disk with 8 platters, 2 surfaces/platter, 1024 tracks/surface, 2048 sectors/track, and 512 bytes/sector. The disk rotates with 6000 revolutions per minute.

What is the capacity of the disk?

  1. A

    16 GB

  2. B

    32 GB

  3. C

    32 MB

  4. D

    16 MB

Show answer

Correct answer

  • A

    16 GB

Question 16

+3 marksNumerical answer

Answer the given subquestions on the basis of the following data.
Consider a magnetic disk with 8 platters, 2 surfaces/platter, 1024 tracks/surface, 2048 sectors/track, and 512 bytes/sector. The disk rotates with 6000 revolutions per minute.

What is the minimum number of bits required for addressing all the sectors?
NOTE: Enter your answer to the nearest integer.

Show answer

Correct answer: 25

Question 17

+2 marksOne correct option

Answer the given subquestions on the basis of the following data.
Consider a magnetic disk with 8 platters, 2 surfaces/platter, 1024 tracks/surface, 2048 sectors/track, and 512 bytes/sector. The disk rotates with 6000 revolutions per minute.

Given that the rotational speed of the disk is 6000 revolutions per minute. Consider the seek time is 3ms. What will be the rotational latency?

  1. A

    10 sec

  2. B

    5 sec

  3. C

    10 ms

  4. D

    5 ms

Show answer

Correct answer

  • D

    5 ms