Quiz Space

May 2023 term · Database Management Systems · BSCS2001

Database Management Systems Quiz 1: 16 July 2023 (May 2023 term)

The IIT Madras BS Database Management Systems (DBMS) Quiz 1 paper sat on 16 Jul 2023, in the May 2023 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
8
MSQ
4
Numerical
5

Updated

Official paper: IIT M FOUNDATION AN2 EXAM QPF2 16 JULY 2023 · No negative marking.

Question 1

+2 marksOne correct option

The lowest level of data abstraction is

  1. A

    physical level

  2. B

    logical level

  3. C

    view level

  4. D

    application level

Show answer

Correct answer

  • A

    physical level

Question 2

+2 marksOne correct option

Suppose a company wants to determine whether the ’price’ of the commodity will be an attribute in the shopping database or not. Which of the following holds good about this?

  1. A

    This is a physical-level decision.

  2. B

    This is a logical level decision.

  3. C

    This is an application-level decision.

  4. D

    This is a view-level decision.

Show answer

Correct answer

  • B

    This is a logical level decision.

Question 3

+2 marksOne correct option

Consider the following scenario:
The Reserve Bank of India (RBI) has issued guidelines declaring that the Rs. 2000 note will no longer be considered legal tender, starting from a specific date. The RBI wants to update its database to reflect this change and ensure that transactions involving the Rs. 2000 note are flagged as invalid.
Which DBMS concept would be most relevant for the RBI to update its database and flag transactions involving the Rs. 2000 note as invalid after the specified date?

  1. A

    CASCADE

  2. B

    Data Definition Language (DDL)

  3. C

    Triggers

  4. D

    Indexing

Show answer

Correct answer

  • C

    Triggers

Question 4

+2 marksOne correct option

Consider the schema given below :

Emp (eid, ename, age, salary)
Works (eid, did, pct_time)
Dept (did, budget, managerid)

Identify the correct SQL command to create a view named, EMPLOYEE, by selecting attributes like eid, salary, and managerid. Select those employees whose salary is greater than 1,00,000 and are atleast 45 years old.

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

Correct answer

  • D

Question 5

+2 marksOne correct option

An instance of the relation students is given below.

sidnameagegpa
53831Madayan111.8
53832Guldu122
53666Jones183.4
53688Smith193.2
53650Smith193.8

Figure 3: Relation students

Which of the following query executed on relation students would result in the output given below ?

sidnameagegpa
53832Guldu122
53666Jones183.4
53831Madayan111.8
53650Smith193.8
53688Smith193.2

Figure 4: Output

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

Correct answer

  • C

Question 6

+3 marksOne correct option

Consider two relations R and S as shown below.

ABC
123
246
373
434

Table 1: R

BCD
734
235
376
237

Table 2: S

The number of tuples in R ⟕ S are : [Note : ⟕ denotes left outer join.]

  1. A

    3

  2. B

    4

  3. C

    5

  4. D

    16

Show answer

Correct answer

  • C

    5

Question 7

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

Correct answer

  • D

Question 8

+4 marksOne correct option
  1. A

    Only a and b are correct

  2. B

    Only b, c, and d are correct

  3. C

    Only a, c and d are correct

  4. D

    All a, b, c, d are correct

Show answer

Correct answer

  • D

    All a, b, c, d are correct

Question 9

+4 marksOne or more correct options

Consider the relation G20(country_name, foreign_minister_name, events, date, venue)
Questions:

  1. Find the name of foreign ministers whose names start with 'j' and have at least 5 characters.
  2. Find out the number of events taking place in venue 'GIFT City'.
  3. Find out the venue name and number of events taking place in each venue

SQL queries:

sql
a. Select foreign_minister_name from G20
where foreign_minister_name like 'j____'
b. Select foreign_minister_name from G20
where foreign_minister_name like 'j____%'
c. Select count(events) from G20 where venue = 'GIFT City'
d. Select count(events) from G20 where venue = 'GIFT City'
Group By venue
e. Select venue, count(events) from G20
Group By venue
f. Select venue, count(events) from G20

Match the correct SQL queries with the corresponding Questions.

Select all that apply.

  1. A

    1-a, 2-c, 3-f

  2. B

    1-b, 2-c, 3-e

  3. C

    1-a, 2-d, 3-f

  4. D

    1-b, 2-d, 3-e

Show answer

Correct answers

  • B

    1-b, 2-c, 3-e

  • D

    1-b, 2-d, 3-e

Question 10

+4 marksOne or more correct options

Select all that apply.

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

Correct answers

  • B
  • C

Question 11

+4 marksOne or more correct options

Select all that apply.

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

Correct answers

  • B
  • D

Question 12

+2 marksOne or more correct options

Consider the student relation given below. Select the correct query/queries to obtain the last name of students whose age is more than 25.

Student

FnameLnameAgeCourse
DavidSharma27DBMS
AaronLilly17JAVA
SahilKhan19Python
SachinRao20DBMS
VarunGeorge23JAVA
SimiVerma22JAVA

Select all that apply.

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

Correct answers

  • A
  • C
  • D

Question 13

+2 marksNumerical answer

Consider the two relations R and S.

ABC
090
222
111
ABC
0Cat0
2Dog2
1Lion1

Figure 1: R and S

Let 'X' be the number of columns and 'Y' be the number of rows of the (R ⋈\bowtie S ) relations.
What is the value of (X + Y) ?

Show answer

Correct answer: 3

Question 14

+2 marksNumerical answer

Consider the relation student shown in Table 3

Roll_noNamemarks
1Ram50
2Rakesh65
3Ram45
4Pranav89
5Rakesh99
6Emily99
7Grace100
8Lily95

Table 3: student

What is the number of tuples returned by the following relational algebra expression ∏name(σmarks>50(student))\prod_{name}(\sigma_{marks>50}(student))

Show answer

Correct answer: 5

Question 15

+4 marksNumerical answer

Consider the following table which has four attributes: A, B, C, and D where A is the primary key and C is the foreign key referencing to A.

ABCD
1156
2257
8474
3158
4249
5241
6112
7413

How many tuples will be left in the table if the tuple (1,1,5,6) is deleted and ON DELETE CASCADE construct is applied over the table?

Show answer

Correct answer: 4

Question 16

+4 marksNumerical answer
Show answer

Correct answer: 17

Question 17

+4 marksNumerical answer
Show answer

Correct answer: 8