Unit 4 - QB
Unit 4 - QB
QUESTIONBANK
Regulation
Degree & Branch : B.TECH- CSE
: 2023-2024
Academic Year
QUESTION BANK
SEM/YEAR: VI/III
Course Outcomes
CO3: Implement the database Structure with SQL
Q. Course Competence
Questions Outcome BT Level
No.
CO3
A. CREATE
B. DROP
2 BT2
C. TRUNCATE
D. All of the above
Q. Course Competence
Questions Outcome BT Level
No.
CO3
A. ROLLBACK
B. GRANT
4 BT1
C. UPDATE
D. All of the above
Q. Course Competence
Questions Outcome BT Level
No.
CO3
A. REVOKE
9 CO3 BT1
B. COMMIT
C. ROLLBACK
D. SAVE
A. RETRIEVE
B. SELECT
11 BT1
C. CREATE
D. ALTER
Q. Course Competence
Questions Outcome BT Level
No.
Which command will remove the records from the table, but
not affect the structure of the table?
CO3
A. REMOVE
12 B. DELETE BT2
C. DROP
D. TRUNCATE
A. REMOVE
13 B. DELETE BT1
C. DROP
D. TRUNCATE
Q. Course Competence
Questions Outcome BT Level
No.
A. Data
CO3
14 B. Rules BT1
C. Tables
D. None
CO3
Which of the following is TRUE about TCL?
A. Data Composition
16 CO3 BT1
B. Data Interval
C. Data Integrity
D. Data Insertion
Q. Course Competence
Questions Outcome BT Level
No.
A. Single
B. Twice
17 CO3 BT1
C. NULL
D. Infinite
CO3
A. MIN()
B. MAX()
19 BT1
C. LARGE()
D. AVG()
A. Data Constraint
20 BT1
B. Relationship Constraint
C. Entity Constraint
D. Mapping Constraint
Q. Course Competence
Questions Outcome BT Level
No.
CO3
A. Change
22 B. Delete BT1
C. Modify
D. Drop
Q. Course Competence
Questions Outcome BT Level
No.
CO3
A. Before
23 B. After BT1
C. Inside
D. Outside
CO3
A. GROUP BY
24 B. ORDER BY BT1
C. DELETE
D. FROM
Q. Course Competence
Questions Outcome BT Level
No.
CO3
time?
A. Yes
B. No
29 CO3 BT1
C. Depends upon
EMP;
stored procedure?
A. SHOW MISTAKES;
B. DISPLAY MISTAKES;
38 C. DISPLAY ERRORS; CO3 BT2
D. SHOW ERRORS;
A) Public
39 CO3 BT2
B) Private
C) Friend
D) Protected
Q. Course Competence
Questions Outcome BT Level
No.
A) Tracker
40 CO3 BT2
B) Cursor
C) Accesser
D) Trigger
A) PL/SQL Cursors
41 CO3 BT2
B) PL/SQL Trigger
C) PL/SQL Select
D) PL/SQL Process
A. Uncheck
B. With Check
C. Check
42 CO3 BT3
D. With
Q. Course Competence
Questions Outcome BT Level
No.
A. View materialization
B. View isolation
C. View updating
43 D. View maintenance CO3 BT3
A. ZERO_DIVIDE
B. VALUE_ERROR
C. TOO_MANY_ROWS
45 D. SELF_IS_NULL CO3 BT2
Q. Course Competence
Questions Outcome BT Level
No.
C) Returns all rows from the left table and matching rows
from the right table.
D) Returns all rows from the right table and matching rows
from the left table.
When creating a function, in which section will you typically
find a return key word?
A. Header Only
B. Declarative
C. Executable and Header
47 D. Executable and exception handling CO3 BT3
Which JOIN type is suitable for returning all rows from both
tables, regardless of whether they have matching rows in the
other table?
A) INNER JOIN
48 CO3 BT2
B) LEFT JOIN
C) RIGHT JOIN
PART B (4 Marks)
What is SQL?
SQL is a database language designed for the retrieval and management of data in a
relational database.
1 CO3 BT1
SQL is the standard language for database management. All the RDBMS systems
like MySQL, MS Access, Oracle, Sybase, Postgres, and SQL Server use SQL as
their standard database language. SQL programming language uses various
commands for different operations. We will learn about the like DCL, TCL, DQL,
DDL and DML commands in SQL with examples.
What is DDL?
Data Definition Language helps you to define the database structure or schema.
Let’s learn about DDL commands with syntax.
CREATE
2 CO3 BT1
DROP
ALTER
TRUNCATE:
Q. Course Competence
Questions Outcome BT Level
No.
There are three basic constructs which allow database program and user to enter CO3
data and information are:
What is DCL?
DCL (Data Control Language) includes commands like GRANT and REVOKE,
which are useful to give “rights & permissions.” Other permission controls
parameters of the database system.
4 BT2
Examples of DCL commands: CO3
● Grant
● Revoke
Q. Course Competence
Questions Outcome BT Level
No.
Explain the concept of a subquery in DBMS. What is its purpose, and how
does it differ from a regular query?
A subquery, also known as a nested query or inner query, is a query nested within
another SQL statement, such as SELECT, INSERT, UPDATE, or DELETE. The
purpose of a subquery is to allow for more complex and dynamic data retrieval or
manipulation by performing a query within the context of another query.
The primary difference between a regular query and a subquery lies in their usage
5 and context within SQL statements: BT1
CO3
1. Purpose and Context:
2. Result Usage:
3. Data Dependency:
Advantages:
1. Hidden Logic
2. Performance Overhead
3. Debugging Complexity
4. Concurrency Issues
Dependency Management
6. Security Risks
Q. Course Competence
Questions Outcome BT Level
No.
1. UCASE ()
2. LCASE ()
8 3. MID () BT2
4. LEN () CO3
5. ROUND ()
6. NOW ()
7. FORMAT ()
CO3
CO3
CO3
Explain the concept of joins in DBMS. What are the different types
3 BT2
of joins, and how are they used in SQL queries? Provide examples.
CO3
5 Explain in detail about Nested Queries, Views and its Types CO3 BT2