2nd IA QP DBMS 5TH

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Continuous Internal Evaluation (CIE) Question Paper- CBCS Scheme

||Jai Sri Gurudev||


SJC Institute of Technology
Department of Artificial Intelligence & Machine Learning
CIE: II
Course Name & Code: Database Management System [21CS53]
Semester: 5th
Date: 02/02/2024 Time: 9:30 am to 11:00am Max Marks: 40+ 10(MCQ)
Instructions: - Answer any 1 full Question from each part, all the questions carry equal marks.
Q.NO. Questions Marks CO PO RBTL
1 Explain unary and binary operations following with an example 8 CO1 PO1 L2
OR
Consider the following COMPANY database
EMP(Name,SSN,Salary,SuperSSN,Gender,Dno)
DEPT(DNum,Dname,MgrSSN,Dno)
DEPT_LOC(Dnum,Dlocation)
DEPENDENT(ESSN,Dep_name,Sex)
WORKS_ON(ESSN,Pno,Hours)
PROJECT(Pname,Pnumber,Plocation,Dnum)
2 Write the relational algebra queries for the following 8 CO1 PO1,3,10 L3
(i)Retrieve the name, address, salary of employees who work for the
Research department.
(ii) find the names of employees who work on all projects controlled by
department number 4.
iii) Retrieve the SSN of all employees who either in department no :4 or
directly supervise an employee who work in department number :4
(iv) Retrieve the names of employees who have no dependents
Consider the following relation schema
Works (Pname,Cname,salary)
Lives (Pname,Street,City)
located_in (Cname, city)
Manager (Pname,Mgrname)
3 Write the SQL queries for the following CO2 PO1,3,10 L3
8
1. Find the names of all persons who live in the city Bangalore.
2. Retrieve the names of all person of "Infosys" whose salary is
between Rs 10000 and 50000
3. Find the names of all persons who lives and work in the same city
4. List the names of the people who work for “Tech M” along with the
cities they live in.
OR
4 With respect to SQL explain the following with an example CO2 PO1,3 L2
8
a) CREATE b) ALTER c) DROP
5 Discuss INSERT, DELETE and UPDATE statement in SQL with an CO2 PO1,3 L2
8
example.
OR
6 Explain the different data types in SQL with example 8 CO2 PO1,3 L2
7 Describe the steps of an algorithm for ER to relational mapping 8 CO1 PO1,3 L2
OR
8 Briefly explain the JOIN and DIVISION relational operations with example. 8 CO1 PO1,3 L3
Consider the following schema for a Library Database:
BOOK (Book_id, Title, Publisher_Name, Pub_Year)
BOOK_AUTHORS (Book_id, Author_Name)
PUBLISHER (Name, Address, Phone)
BOOK_COPIES (Book_id, Programme_id, No-of_Copies)
9 BOOK_LENDING (Book_id, Programme_id, Card_No, Date_Out, 8 CO5 PO1,3,10 L3
Due_Date)
LIBRARY_PROGRAMME (Programme_id, Programme_Name, Address)
Write SQL queries to
1. Retrieve details of all books in the library – id, title, name of publisher,
authors, number of copies in each Programme.
2. Get the particulars of borrowers who have borrowed more than 3 books,
but from Jan 2017 to Jun 2017.
3. Delete a book in BOOK table. Update the contents of other tables to
reflect this data manipulation operation.
4. Partition the BOOK table based on year of publication. Demonstrate its
working with a simple query.
OR
Consider the following schema:
Sailors (Sid, Sname, rating, age)
Boats (bid, bname, color)
Reservers (Sid, bid, day)
Write queries in SQL
i) Find the ages of sailors whose name begins and ends with A and has
10 atleast three characters. 8 CO5 PO1,3,10 L3
ii) Find the age of the youngest sailor who is eligible to vote (i.e. is atleast
18 years old) for each rating level with atleast two such sailors.
iii) Find the names of sailors who have not reserved a red boat. (use nested
query).
iv) Compute increments for the rating of persons who have sailed two
different boats on the same day.

CO 1 Identify, analyze and define database objects, enforce integrity constraints on a database using RDBMS
Use Structured Query Language (SQL) for database manipulation and also demonstrate the basic of query
CO 2
evaluation.
CO 5 Develop applications using tuple and domain relation expression from queries.

Note: Answer all the below given MCQ’s


Q.NO. Questions Marks CO PO RBTL
The ORDER BY clause is used to:
1 1 CO2 PO 1 L1
a) Filter data b) Combine data c) Sort the results d) Modify data
Attributes in ER diagram are represented by:
2 Circle (b) Line (c) Rectangle (d) oval 1 CO1 PO1 L1
What does SQL stand for?
3 a) Sequential Query Language b) Structured Query Language 1 CO2 PO1 L1
c) Simple Query Language d) Standard Query Language
The * symbol in a SELECT statement means:
4 a) Select all columns from the table b) Select the first column only 1 CO2 PO1 L1
c) Select the last column only d) Select no columns
The attribute AGE is?
5 1 CO2 PO1 L1
(a) Single valued (b) Derived (c) Composite (d) Multi-valued
Which data type is best suited for storing dates?
6 1 CO2 PO1 L1
a) VARCHAR b) DATE c) INTEGER d) BOOLEAN
What command permanently removes a table from the database?
7 a) ALTER TABLE b) DROP TABLE c) DELETE FROM 1 CO2 PO1 L1
d) TRUNCATE TABLE
What is the purpose of a primary key?
a) Uniquely identifies each row in a table
8 b) Stores descriptive information about the table 1 CO2 PO1 L1
c) Defines the order of data retrieval
d) Limits the number of rows in a table
What does RDBMS stand for?
a) Relational Database Management System
9 b) Recurring Data Backup Management System 1 CO1 PO1 L1
c) Real-time Database Monitoring System
d) Remote Database Backup Solution
Which command is used to retrieve data from a table?
10 1 CO2 PO1 L1
a) INSERT INTO b) CREATE TABLE c) SELECT d) UPDATE

Course Coordinator Signature Reviewer Signature HOD Signature

You might also like