uiz Space

January 2025 term · Database Management Systems · BSCS2001

Database Management Systems Quiz 1: 23 February 2025 (January 2025 term)

The IIT Madras BS Database Management Systems (DBMS) Quiz 1 paper sat on 23 Feb 2025, in the January 2025 term: 14 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
14
Marks
50
Duration
120 min
MCQ
9
MSQ
3
Numerical
2

Updated

Official paper: IIT M DIPLOMA AN EXAM QDD2 23 Feb 2025 · No negative marking.

Question 1

+2 marksOne correct option

Which level of abstraction is responsible for providing data security by limiting access to specific data views?

  1. A

    Physical level

  2. B

    Logical level

  3. C

    View level

  4. D

    Physical level and Logical level

Show answer

Correct answer

  • C

    View level

Question 2

+3 marksOne correct option

Consider the relation student shown in Table 5.

roll_nonamehouse_name
1JohnNilgiri
2RameshNilgiri
3DilipArawali
4SureshShiwalik
5KiranUdaygiri
6VijayNilgiri

Table 5: Relation student

Which of the following SQL command is used to provide INSERT authorization of the table student to instructor.

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

Correct answer

  • D

Question 3

+4 marksOne correct option

Consider the tables Products and Suppliers given below:

P_IDP_NameS_ID
1Laptop3
2Smartphone2
3Tablet3
4Headphones1

Table 1: Products

S_IDS_Name
1Sony
2Samsung
3Apple

Table 2: Supplier

Now consider the SQL query given below:

sql
Select *
From Products P, Supplier S
Where P.P_ID<>S.S_ID

How many attributes and rows will be present in the resultant output table?

  1. A

    4 attributes and 9 rows

  2. B

    5 attributes and 8 rows

  3. C

    4 attributes and 8 rows

  4. D

    5 attributes and 9 rows

Show answer

Correct answer

  • D

    5 attributes and 9 rows

Question 4

+4 marksOne correct option

Consider a relational database for Formula One Racing containing the following tables.

D_IDD_NameT_IDPointsPodium
1Carlos Sainz10192P1
2Charles Leclerc10256P2
3Lando Norris10190P3
4George Russell10371P4
5Lewis Hamilton10295P5
6Max Verstappen10364P1
7Ayrton Senna101100P4
8Michael Schumacher10372P2
9Kimi Raikkonen10291P5

Table 3: Drivers

T_IDT_NameCountry
101Scuderia FerrariItaly
102Mercedes AMGGermany
103McLarenUK

Table 4: Teams

Now consider the following query:

sql
Select T.T_ID, T.T_Name
From Drivers D, Teams T
Where D.T_ID=T.T_ID and
Points > (Select avg (Points)
From Drivers
Where Podium='P1') ;

The number of rows returned by the above SQL query is:

  1. A

    4

  2. B

    5

  3. C

    9

  4. D

    7

Show answer

Correct answer

  • B

    5

Question 5

+4 marksOne correct option

Consider the following relations:
auto_part(pid, pname, color)
auto_suppliers(sid, sname, location)
catalog(pid, sid, price)

Consider the TRC expression:

{x∣∃s∈auto_suppliers ∃c∈catalog ∃p∈auto_part(s.location=‘Mumbai’∧c.price=5000∧x.sid=c.sid∧x.pname=p.pname∧s.sid=c.sid∧p.pid=c.pid)}\{x \mid \exists s \in auto\_suppliers\ \exists c \in catalog\ \exists p \in auto\_part(s.location = \textit{‘Mumbai’} \land c.price = 5000 \land x.sid = c.sid \land x.pname = p.pname \land s.sid = c.sid \land p.pid = c.pid)\}

Choose the correct DRC expression equivalent to the TRC expression shown above.

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

Correct answer

  • A

Question 6

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

Correct answer

  • D

Question 7

+4 marksOne correct option
  1. A

    Names of all the drivers whose salary is greater than all Mercedes drivers but not less than all Ferrari drivers

  2. B

    Names of all the drivers whose salary is less than all Mercedes drivers but not greater than all Ferrari drivers

  3. C

    Names of all the drivers whose salary is greater than all Mercedes drivers as well as all Ferrari drivers

  4. D

    Names of all the drivers whose salary is less than all Mercedes drivers as well as all Ferrari drivers

Show answer

Correct answer

  • A

    Names of all the drivers whose salary is greater than all Mercedes drivers but not less than all Ferrari drivers

Question 8

+4 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

+4 marksOne or more correct options

Select all that apply.

  1. A

    Every company must have produced at least one item

  2. B

    An item can be produced by more than one company

  3. C

    Every customer must have bought at least one item

  4. D

    An item can be bought by more than one customer

Show answer

Correct answers

  • A

    Every company must have produced at least one item

  • C

    Every customer must have bought at least one item

  • D

    An item can be bought by more than one customer

Question 10

+4 marksOne or more correct options

Consider the following Students table

student_idnamegrademarks
1001AliceA85
1002BobB70
1003CharlieA90
1004DavidB60
1005EveA95

Figure 1: Students

Choose the correct SQL query to calculate the average marks scored by students in each grade and sort the result by average marks in descending order.

Select all that apply.

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

Correct answers

  • B
  • C

Question 11

+4 marksNumerical answer

Consider relations Book and Author shown in Table 6 and Table 7

BookIDTitleAuthorIDGenre
1Harry Potter and the Sorcerer's Stone101Fantasy
2Pride and Prejudice103Fiction
3The Great Gatsby104Fiction
4The chamber of secrets101Adventure
5The Catcher in the Rye105Fiction
61984101Dystopian

Table 6: Book Table

AuthorIDName
101J.K. Rowling
102F. Scott Fitzgerald
103Jane Austen
104Herman Melville

Table 7: Author Table

How many rows will be in the output of below query?

sql
SELECT *
FROM Book LEFT OUTER JOIN Author
ON Book.AuthorID = Author.AuthorID
WHERE Genre LIKE 'F%';
Show answer

Correct answer: 4

Question 12

+4 marksNumerical answer

Consider the tables student and course as shown below.

IDnamedept_name
21f11RamCS
21f12RakeshME
21f13PranavEE
21f14RajibCS
21f15VikashBT

Table 8: student

course_idtitledept_name
C001DBMSCS
C002CADME
C003DigitalEE
C004PDSACS

Table 9: course

How many rows are returned by the below query?

sql
(SELECT ID FROM student,course
EXCEPT ALL
SELECT ID FROM student)
EXCEPT
SELECT ID FROM student
Show answer

Correct answer: 0

Question 13

+3 marksOne correct option

Consider the following scenario and answer the given subquestions
A startup company is building an online learning platform that hosts courses on various subjects. In this platform, students can enroll in multiple courses, and each course can be taught by one or more instructors. The company wants to design the database schema to manage the core entities: Student, Instructor, Course, and Enrollment.

In the Enrollment table, which of the following is a typical way to handle the primary key?

  1. A

    Use an auto-increment column (e.g., EnrollmentID) as the primary key.

  2. B

    Use a composite primary key consisting of StudentID and CourseID.

  3. C

    There is no need to have a primary key for the Enrollment table.

  4. D

    Use a primary key consisting of StudentID.

Show answer

Correct answer

  • B

    Use a composite primary key consisting of StudentID and CourseID.

Question 14

+2 marksOne correct option

Consider the following scenario and answer the given subquestions
A startup company is building an online learning platform that hosts courses on various subjects. In this platform, students can enroll in multiple courses, and each course can be taught by one or more instructors. The company wants to design the database schema to manage the core entities: Student, Instructor, Course, and Enrollment.

In a typical design, what is the relationship between the Student table and the Enrollment table?

  1. A

    One-to-One

  2. B

    One-to-Many

  3. C

    Many-to-Many

  4. D

    Many-to-One

Show answer

Correct answer

  • D

    Many-to-One