0% found this document useful (0 votes)
5 views6 pages

PLSQL - Mid2 - Obj Final

This document is a question bank for the M.Tech II Semester students at Mallareddy Engineering College, focusing on Database Programming with PL/SQL. It contains multiple-choice questions covering various topics related to PL/SQL procedures, functions, packages, and triggers. The questions are designed to assess the understanding of key concepts and functionalities within the PL/SQL programming environment.

Uploaded by

kalpanamrec23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

PLSQL - Mid2 - Obj Final

This document is a question bank for the M.Tech II Semester students at Mallareddy Engineering College, focusing on Database Programming with PL/SQL. It contains multiple-choice questions covering various topics related to PL/SQL procedures, functions, packages, and triggers. The questions are designed to assess the understanding of key concepts and functionalities within the PL/SQL programming environment.

Uploaded by

kalpanamrec23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MALLAREDDYENGINEERINGCOLLEGE(AUTONOMOUS)

M.TECH I YEAR II Semester (MR 22) II Mid Question Bank 2022-23(Objective)

Subject Code and Name: DATABASE PROGRAMMING WITH PL/SQL ( C5115)

Branch/ Specialization: CSE/(CSE)

Name of the Faculty : NAGMA BEGUM

1 A __________ is a program unit/module that performs a


particular task.
A. procedure B. Subprogram C. Program D. Trigger
2 Subprograms that do not return a value directly known as?
A. Functions B. Procedures C. Triggers
D. None of the above
3 Which of the following is mandatory part in procedure?
A. Declarative Part B. Exception-handling
C. Executable Part D. All of the above
4 A procedure is created with the __________ statement.
A. CREATE PROCEDURE B. REPLACE PROCEDURE
C. Both A and B D. None of the above
5 A standalone procedure can be called in ______ ways.
A. 1 B. 2 C. 3 D. 4
6 A standalone procedure is deleted with the ________
statement
A. REMOVE PROCEDURE B. DELETE PROCEDURE
C. Both A and B D. DROP PROCEDURE
7 An ______ parameter lets you pass a value to the
subprogram.
A. IN B. OUT C. IN OUT D. None of the above
8 An IN OUT parameter passes an initial value to a
subprogram and returns an updated value to the caller.
A. Yes B. No C. Can be yes or no D. Cannot say
9 Actual parameters can be passed in ________ ways.
A. 1 B. 2 C. 3 D. 4
10 In mixed notation, you can mix both notations (Positional
Notation and Named Notation) in procedure call.
A. TRUE B. FALSE
C. Can be true or false D. Cannot say
11 There are PL/SQL statements within a ____ that can be
referred to by name.
A. A. Statement B. Query C. Procedure D. None
12 Call specifications specify java methods or third-generation
language routines that can be called from ____.
A. A. SQL B. PL/SQL
B. C. Both A and B D. None of the above
13 Which of the following is/are the type of procedure?
A. A.IN B. OUTIN C.OUT D. All of the above
B.
14 A value is returned to the caller when ____ is specified.
A. A. IN B. OUTIN C. OUT D. None
15 A subprogram receives an initial value from ____ and a
value that has been updated from the caller.
A. A. IN B. INOUT C. OUTIN D. OUTNone
16 How many mandatory parts packages has?
A. 1 B. 2 C. 3 D. 4
17 All objects placed in the specification are called __________
objects.
A . Private B. Protected C. Public D. None of the above
18 The __________ Statement is used for creating the package
body.
A. CREATE B. CREATE PACKAGE
C. CREATE BODY D. CREATE PACKAGE BODY
19 Packages are schema objects that groups logically related
PL/SQL types, variables, and subprograms.
A. Yes B. No C. Can be yes or no D. Cannot say
20 Which of the following are the advantages of PL/SQL
Packages?
A. Modularity B. Easier Application Design
C. Information Hiding D. All of the above
21 Any subprogram not in the package specification but coded
in the package body is called a _________ object.
A. Protected B. Private C. Self D. public
22 The constructs of a procedure, function or a package are
________ .
A. Variables and Constants B. Cursors
C. Exceptions D. All of the above
23 The parameters can be passed as default also to the
procedures and the functions.
A. TRUE B. FALSE
C. Can be true or false D. Cannot say
24 Which package lets PL/SQL programs read and write
operating system (OS) text files?
A. UTL_HTTP B. UTL_FILE
C. UTL_SMTP D. UTL_FMT
25 The package specification is the interface to the package.
A. Yes B. No
C. Can be yes or no D. Cannot say
26 Which internal exception is raised when a program
references a nested table or varray element using an index
number larger than the number of elements in the collection.
A. A. NO_DATA_FOUND
B. B. COLLECTION_IS_NULL
C. C. SUBSCRIPT_OUTSIDE_LIMIT
D. D. SUBSCRIPT_BEYOND_COUNT
27 Which of the following are the advantages of PL/SQL
Packages?
A. A. Modularity, Easier Application Design
B. B. Information Hiding
C. C. Added Functionality,Better Performance
D. D. All mentioned above
28 Any subprogram not in the package specification but coded
in the package body is called a ___________ .
A. A. Public object B. Private object
B. C. Both A & B D. None of the above
29 The constructs of a procedure, function or a package are
________ .
A. Variables and Constants B. Cursors
C. Exceptions D. All mentioned above
30 Which collection method Returns the index number that
precedes index n in a collection?
A. PRIOR(n) B. LAST C. LIMIT D. COUNT
31 A package will have which of these mandatory parts?
A. Package specification
B. Package body or definition
C. Both A & B
D. None of the above
32 Which package lets PL/SQL programs read and write
operating system (OS) text files?
A. UTL_HTTP B. UTL_FILE
C. UTL_SMTP C. None of the above
33 Which of the following is not a schema object?
A. Packages B. Indexes
C. Public Synonyms D. Triggers
34 Which Package lets you use database triggers to alert an
application when specific database values change?
A. DBMS_OUTPUT B. DBMS_ALERT
C. DBMS_PIPE D. All mentioned above
35 Abbreviate SMTP?
A. Single Mail Transaction Protocol
B. Simple Mail Transfer Protocol
C. Simple Mail Transaction Protocol
D. Simple Mail Transfer Package
36 What is the difference between PL/SQL Function and
PL/SQL Procedure?
A. PL/SQL Procedure may or may not return the value
whereas PL/SQL Function must have to return the value.
B. PL/SQL function may or may not return the value
whereas PL/SQL Procedure must have to return the value.
C. PL/SQL Function may or may not return the function
whereas PL/SQL Procedure must have to return the function.
D. None of the above
37 The packaged procedure that makes data in form permanent
in the Database is
A. A. Post B. Post form
B. C. Commit form D. None of the above
38 Which statement is package specification or body of a stored
subprogram?
A. A. Package Specification only requires recompilation
B. B. Package body only requires recompilation
C. C. Both package & body requires recompilation
D. D. Both package & body does not require recompilation.
39 Which of the following do not execute multiple PL/SQL
programs simultaneously?
A. A. Oracle Advanced Queuing B. DBMS_JOB
B. C. DBMS_SQL D. Pipelined Functions
40 Which package can you use to output values and messages
stored procedures?
A. DBMS_DISPLAY B. DBMS_OUTPUT
C. DBMS_LIST D. DBMS_DESCRIBE
41 Which of the package statement is true?
A. A. Packages can be nested.
B. B. You can pass parameters to packages.
C. C. A package is loaded into memory each time it is invoked.
D. D. The contents of packages can be shared by many
applications.
42 What can you do with the DBMS_LOB package?
A. A.WRITE procedure to write data to a BFILE.
B. B. FILENAME function to locate an external BFILE.
C. C. FILEEXISTS function to find the location of a BFILE.
D. D. FILECLOSE procedure to close the file being accessed.
43 What function you are using to load the data in UTL_FILE
package?
A. A. Fopen() B. file_open() C. isopen() D.fileopen()
44 Which is not in UTL_FILE function?
A. A. FOPEN() B. File_CLOSE()
B. C. FCOPY () D. FFLUH()
45 What is the disadvantage of Packages?
A. A. Memory wastage B. Performance
B. C. data Hiding D. modularity
46 __________ are stored programs, which are automatically
executed or fired when some events occur.
A. Procedure B. Triggers C. Collection D. Transaction
47 Triggers can be defined on the?
A. Table B. View C. Schema D. All of the above
48 Which of the following specifies when the trigger will be
executed?
A. BEFORE B. AFTER
C. INSTEAD OF D. All of the above
49 Which specifies the column name that will be updated?
A. For col_name B. ON col_name
C. OF col_name D. WHEN col_name
50 OLD and NEW references are not available for table-level
triggers.
A. TRUE B. FALSE
C. Can be true or false D. Cannot say
51 Which of the following are benefits of Triggers?
A. Generating some derived column values automatically
B. Enforcing referential integrity
C. Event logging and storing information on table access
D. All of the above
52 In which event(s) trigger is executed?
A . DDL B. DML
C. Database Operation D. All of the above
53 Which of the following is not an advantage of trigger?
A. Various column values are automatically generated by
triggers
B. Maintains the integrity of referential
C. Tables are replicated asynchronously
D. Validating transactions and preventing them from being
invalid
54 Which clause is used to create trigger on a view?
A. BEFORE B. INSTEAD OF
C. AFTER D. None of the above
55 [ON table name] specifies the name of the table associated
with the trigger.
A. Yes B. No C. Can be yes or no D. Cannot say
56 ____ Statements against an Oracle table can execute
procedures implicitly.
A. A. INSERT B. UPDATE
C. C. DELETE D. All of the above
57 Database triggers are the _____.
A. A. Functions B. Procedures C. Databases D. None
58 ___ CREATE TRIGGER statements are present in
accordance with their firing points.
A. A. Five B. Six C. Seven D. Eight
59 Which of the following is the FIRING POINT: BEFORE?
A. A. BEFORE INSERT TRIGGER
B. BEFORE UPDATE TRIGGER
C. BEFORE DELETE TRIGGER
D. All of the above
60 Which of the following is not the FIRING POINT: AFTER?
A. A. AFTER INSERT TRIGGER
B. B. AFTER UPDATE TRIGGER
C. C. BEFORE DELETE TRIGGER
D. D. AFTER DELETE TRIGGER
61 In Oracle BEFORE INSERT/UPDATE/DELETE trigger
statement, Oracle specifies that the trigger will be fired
BEFORE _____ operations are executed.
A. A. INSERT B. UPDATE
B. C. DELETE D. All of the above
62 What are the parameters in the Oracle BEFORE
INSERT/UPDATE/DELETE trigger statement?
A. A. AOR REPLACE B. Trigger_name
B. C. Table_name D. All of the above
63 Which of the following is an optional parameter in Oracle
BEFORE INSERT/UPDATE/DELETE trigger statement?
A. Trigger_name B. Table_name
C. COR REPLACE D. None
64 A trigger is re-created by using OR REPLACE if it already
exists.
A. A. Created B. Re-created C. Added D. Deleted
65 The trigger operation will be performed on the _____
specified by the table_name parameter.
A. A. Table B. Field C. Row D. Column
66 Which of the following is the limitation of using BEFORE
INSERT/UPDATE/DELETE trigger?
A. A view cannot have a BEFORE trigger.
B. The OLD values cannot be updated.
C. The NEW values are the only ones that can be updated.
D. All of the above
67 If you need to remove a trigger from Oracle, use the ____
TRIGGER statement.
A. A. DELETE B. DROP C. REMOVE D. None
68 What is the syntax of DROP TRIGGER statement?
A. A. DROP TRIGGER trigger_name;
B. DELETE TRIGGER trigger_name;
C. REMOVE TRIGGER trigger_name;
D. None
69 What is the syntax of DISABLE Trigger?
A. ALTER TRIGGER trigger_name DISBALE;
B. ALTER TRIGGER trigger_name ALTER;
C. DISABLE TRIGGER trigger_name DISABLE;
D. DISBALE TRIGGER trigger_name ALTER;
70 Which prefixes are available to Oracle triggers?
A. : new only
B. : old only
C. Both :new and : old
D. Neither :new nor : old
71 A collection of triggers can be created on each relation to
record the changes in relations called
A. A. Temporary relations B. Permanent relations
B. C. Delta relations D. Filter relations
72 For the triggers in SQL, the statement that specifies a
condition is said to be
A. A. While statement B. From statement
B. C. Where statement D.When statement
73 The system executes the rest of the trigger body that is
satisfying the condition only for the
A. A. Tuples B. Attribute C. Instances D. Relation
74 The default extension for an Oracle SQL*Plus file is :
A. .txt B. .pls C. .ora D. .sql
75 Which of the following is a component of the DBMS?
A. Data B. Data Languages
C. Data Manager D. All of the above

Signature of the Faculty Signature of the HOD

You might also like