Question 1
Which of the following creates the schema of a database?
Data Definition Language
Data Manipulation Language
Data Control Language
All of these

The IIT Madras BS Database Management Systems (DBMS) Quiz 1 paper sat on 15 Mar 2026, in the January 2026 term: 16 questions for 51 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.
Which of the following creates the schema of a database?
Data Definition Language
Data Manipulation Language
Data Control Language
All of these
Correct answer
Data Definition Language
CREATE TABLE Course ( id VARCHAR(5) PRIMARY KEY, name VARCHAR(255), term VARCHAR(7), pre_requisite VARCHAR(5), co_requisite VARCHAR(5), instructor_id VARCHAR(5) REFERENCES Instructor(id) )
CREATE TABLE Course ( id VARCHAR(5) PRIMARY KEY, name VARCHAR(255), term VARCHAR(7), pre_requisite VARCHAR(5), co_requisite VARCHAR(5), instructor_id VARCHAR(5) REFERENCES Instructor.id )
CREATE TABLE Course ( id VARCHAR(5), name VARCHAR(255), term VARCHAR(7), pre_requisite VARCHAR(5), co_requisite VARCHAR(5), instructor_id VARCHAR(5) REFERENCES Instructor, )
CREATE TABLE Course ( id VARCHAR(5), name VARCHAR(255), term VARCHAR(7), pre_requisite VARCHAR(5), co_requisite VARCHAR(5), instructor_id VARCHAR(5) PRIMARY KEY (id), FOREIGN KEY (instructor_id) REFERENCES Instructor(id) )
Correct answers
CREATE TABLE Course ( id VARCHAR(5) PRIMARY KEY, name VARCHAR(255), term VARCHAR(7), pre_requisite VARCHAR(5), co_requisite VARCHAR(5), instructor_id VARCHAR(5) REFERENCES Instructor(id) )
CREATE TABLE Course ( id VARCHAR(5), name VARCHAR(255), term VARCHAR(7), pre_requisite VARCHAR(5), co_requisite VARCHAR(5), instructor_id VARCHAR(5) PRIMARY KEY (id), FOREIGN KEY (instructor_id) REFERENCES Instructor(id) )
Choose the correct option(s) from the following.



—
Correct answers







Correct answer





Correct answer

WITH AvgMarks AS ( SELECT s.student_id, s.student_name, AVG(m.marks) AS avg_marks FROM Student s JOIN Marks m ON s.student_id = m.student_id GROUP BY s.student_id, s.student_name ) SELECT * FROM AvgMarks WHERE avg_marks > 60
CREATE VIEW AvgMarks AS ( SELECT s.student_id, s.student_name, AVG(m.marks) AS avg_marks FROM Student s JOIN Marks m ON s.student_id = m.student_id WHERE m.marks > 60 GROUP BY s.student_id ) SELECT * FROM AvgMarks
WITH AvgMarks AS ( SELECT s.student_id, s.student_name, AVG(m.marks) AS avg_marks FROM Student s JOIN Marks m ON s.student_id = m.student_id ) SELECT * FROM AvgMarks WHERE avg_marks > 60
SELECT student_id, student_name, AVG(marks) FROM Student NATURAL JOIN Marks WHERE AVG(marks) > 60
Correct answer
WITH AvgMarks AS ( SELECT s.student_id, s.student_name, AVG(m.marks) AS avg_marks FROM Student s JOIN Marks m ON s.student_id = m.student_id GROUP BY s.student_id, s.student_name ) SELECT * FROM AvgMarks WHERE avg_marks > 60
a-8, b-8, c-8, d-5, e-6
a-8, b-7, c-7, d-4, e-7
a-8, b-8, c-7, d-5, e-8
a-8, b-7, c-6, d-4, e-6
Correct answer
a-8, b-7, c-6, d-4, e-6
A written answer, not marked automatically.
The table is empty.
Only movies 201 (Baahubali), 203 (RRR), 204 (Roja), and 207 (Bombay) remain.
Only movies 202 (PK) and 206 (3 Idiots) remain.
The delete fails due to foreign key constraint violation.
Correct answer
Only movies 201 (Baahubali), 203 (RRR), 204 (Roja), and 207 (Bombay) remain.




Correct answer





Correct answer

A written answer, not marked automatically.
Which of the following options are not true with respect to weak entity set?
Weak Entity cannot exist independently and it has its own primary key.
It must have total participation in the identifying relationship.
Discriminator and Identifying relationship need not exist.
Discriminator is represented by underlining with a dashed line.
Correct answers
Weak Entity cannot exist independently and it has its own primary key.
Discriminator and Identifying relationship need not exist.
A written answer, not marked automatically.
Ram
Frank
Suresh
Thomas
Correct answer
Frank
A written answer, not marked automatically.