21CS53 DBMS Module3 QuestionBank 2023-24
21CS53 DBMS Module3 QuestionBank 2023-24
21CS53 DBMS Module3 QuestionBank 2023-24
MODULE-3
SQL, Advances Queries, Application Development
1 Discuss how each of the following constructs is used in SQL and CO3 L2 10M
discuss the various options for each construct:
(a) Nested Queries (b) Group by and Having clause (c) Schema change
statements (d) Aggregate functions (e) Views (Feb 2023, Jan 2020, Jul
2023)
2 Explain the following terms: CO3 L2 6M
(a) Embedded SQL (b) Dynamic SQL (Jul 2023, Feb 2022, Jan 2020,
Jul 2023)
3 How are Assertions and Triggers defined in SQL? Explain with an CO3 L2 8M
example. (Jul 2023, Feb 2022, Jan 2020)
4 What is SQLJ and how is it different from JDBC? (Feb 2023, Feb 2022, CO3 L2 6M
Jan 2020, Jul 2023)
5 Write a short note on i) Cursor ii) SQL/PSM (Feb 2022, Jan 2020, Jul CO3 L2 5M
2023)
6 Define Stored Procedure. Explain the creating and calling of stored CO3 L2 7M
procedure with suitable example. (Jul 2023, Feb 2022, Jan 2020, Jul
2023)
7 Explain JDBC architecture and types of drivers. (Jul 2023, Feb 2022, CO3 L2 8M
Jan 2020, Jul 2023)
8 Briefly explain about JDBC classes and interfaces. (Feb 2022, Jan CO3 L2 6M
2020, Jul 2023)
9 Consider the following relation schema: CO3 L3 7M
Works(Pname,Cname,salary)
Lives(Pname,Street,City)
located_in (Cname, city)
Manager(Pname,Mgrname)
Solve the following queries using SQL:
i) Find the names of all persons who live in the city Bangalore.
ii) Retrieve the names of all person of “Infosys” whose salary is
between Rs .50000 and Rs. 70000.
iii) Find the names of all persons who lives and work in the same city.
iv)List the names of the people who work for “Tech M” along with the
cities they live in.
v)Find the average salary of “Infosys” persons. (Model QP 2019-20)
10 Consider the following RESORT database: CO3 L3 5M
RESORT (resortno, resortname, resorttype, resortaddr, resortcity,
numsuite)
SUITE (suiteno, resortno, suiteprice)
RESERVATION (reservationno, resortno, visitorno, checkin, checkout,
totalvisitor, suiteno)
VISITOR (visitorno, firstname, lastname, visitoraddr)
Solve the following queries using SQL:
i)Write the SQL to list full details of all the resorts on Los Angeles.
ii)Write the SQL to list full details of all the resorts having number of
suites more than 30.
iii)Write the SQL to list visitors in ascending order by first name.
(Feb 2022, July 2018)
11 Consider the following student and course database: CO3 L3 5M
STUDENT (name, snumber, class, major)
COURSE (cname, cnumber, credit_hrs, dept)
SECTION (sectionid, cnumber, sem, year, instructor)
GRADE_REPORT (snumber, sectionid, grade)
PREREQUISITE (cnumber, prerequisite_number)
Solve the following queries using SQL:
i)Retrieve the names of all senior students majoring in ‘cs’.
ii)Retrieve the names of all courses taught by professor king in 2016
and 2017.
iii)For each section taught by professor king, retrieve the course
number, semester, year, number of students who took the section.
(Aug 2021, July 2018)
12 Consider the schema for Company Database: CO3 L3 8M
EMPLOYEE(Fname, Minit, Lname, SSN, Bdate, Address, Sex, Salary,
SuperSSN, DNo)
DEPARTMENT(DNo, DName, MgrSSN, MgrStartDate)
DLOCATION(DNo,DLoc)
PROJECT(PNo, PName, PLocation, DNo)
WORKS_ON(ESSN, PNo, Hours)
DEPENDENT(ESSN,Dependent_name,Sex,Bdate,Relationship)
Course Faculty