Unit 3 - QB
Unit 3 - QB
QUESTIONBANK
QUESTION BANK
SEM/YEAR: VI/III
Course Outcomes
CO3: Implement the database Structure with SQL
Q. Course Competence
Questions Outcome BT Level
No.
Full form of DDL is –
A. CREATE
B. DROP
2 BT2
C. TRUNCATE CO3
D. All of the above
A. ROLLBACK
B. GRANT CO3
4 BT1
C. UPDATE
D. All of the above
Select the correct statement.
A. REVOKE
9 CO3 BT1
B. COMMIT
C. ROLLBACK
D. SAVE
A. RETRIEVE
B. SELECT CO3
11 BT1
C. CREATE
D. ALTER
Which command will remove the records from the table, but
not affect the structure of the table?
A. REMOVE
12 B. DELETE CO3 BT2
C. DROP
D. TRUNCATE
The records and structure of a table may be removed or
deleted from the database using which command?
A. REMOVE
13 B. DELETE CO3 BT1
C. DROP
D. TRUNCATE
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
____ value is returned by the SQL Aggregate functions?
A. Single
B. Twice
17 CO3 BT1
C. NULL
D. Infinite
A. MIN()
B. MAX()
19 BT1
C. LARGE()
D. AVG()
A. Data Constraint
20 BT1
B. Relationship Constraint
C. Entity Constraint
D. Mapping Constraint
What is TRUE about NOT NULL Constraint?
You can also _______ the existing tables by using the CO3
UNIQUE constraint.
A. Change
22 B. Delete BT1
C. Modify
D. Drop
A. Before
23 B. After BT1
C. Inside
D. Outside
A. GROUP BY
24 B. ORDER BY BT1
C. DELETE
D. FROM
In order to prevent multiple records from being returned CO3
by the sub query, _______ must be used before the sub
query.
A. SQLERRCODE
28 CO3 BT1
B. SQLERROR
C. ERRCODE
D. SQLCODE
Can the PL/SQL block process more than one exception at a
time?
EMP;
stored procedure?
A. SHOW MISTAKES;
38 CO3 BT2
B. DISPLAY MISTAKES;
C. DISPLAY ERRORS;
D. SHOW ERRORS;
A) Public
39 CO3 BT2
B) Private
C) Friend
D) Protected
....................... contain a pointer that keeps track of current row
being accessed, which enables your program to process the
rows at a time.
A) Tracker
40 CO3 BT2
B) Cursor
C) Accesser
D) Trigger
................. provide a way for your program to select multiple
rows of data from the database and then process each row
individually.
A) PL/SQL Cursors
41 CO3 BT2
B) PL/SQL Trigger
C) PL/SQL Select
D) PL/SQL Process
Which option in view is to ensure that all UPDATE and
INSERTs satisfy the condition(s) in the view definition?
A. View materialization
43 B. View isolation CO3 BT3
C. View updating
D. View maintenance
A. ZERO_DIVIDE
45 CO3 BT2
B. VALUE_ERROR
C. TOO_MANY_ROWS
D. SELF_IS_NULL
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
47 CO3 BT3
B. Declarative
C. Executable and Header
D. Executable and exception handling
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
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:
3 There are three basic constructs which allow database program and user to enter CO3 BT1
data and information are:
● INSERT
● UPDATE
● DELETE
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
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:
Disadvantages:
1. Hidden Logic
2. Performance Overhead
3. Debugging Complexity
4. Concurrency Issues
5. Dependency Management
6. Security Risks
List out Scalar functions:
These functions are based on user input; these too returns single
value.
1. UCASE ()
2. LCASE ()
8 3. MID () BT2
4. LEN () CO3
5. ROUND ()
6. NOW ()
7. FORMAT ()