Shared Flashcard Set

Details

PL/SQL
Oracle PL/SQL
268
Computer Science
Professional
11/04/2011

Additional Computer Science Flashcards

 


 

Cards

Term
30
Definition
IDs: Maximum number of bytes in a user-defined identifier.
Term
Reserved words.
Definition
IDs: The type of words that cannot be user-defined identifiers.
Term
Keywords and predefined names.
Definition
IDs: The two types of words that can, but should not, be used as user-defined identifiers.
Term
A literal.
Definition
A value that is neither represented by an identifier nor calculated from other values.
Term
Ordinary and Quoted.
Definition
IDs: The two types of user-defined identifiers.
Term
#, $, _
Definition
IDs: The 3 non-alphanumeric characters that can be in an ordinary user-defined identifier.
Term
With a letter.
Definition
IDs: How an ordinary user-defined identifier must begin.
Term
Double quotes.
Definition
IDs: What a quoted user-defined identifier is enclosed in.
Term
anonymous block
Definition
A PL/SQL block that is not stored.
Term
external subprogram
Definition
Java, C or other program called directly in PL/SQL.
Term
in the database
Definition
Where an external subprogram is stored.
Term
PL/SQL Gateway
Definition
Web: The gateway that allows a web browser to invoke a PL/SQL procedure through an HTTP listener.
Term
PSP
Definition
Web: Abbreviation of PL/SQL Server Page.
Term
bind arguments
Definition
In PL/SQL, what the variables in DML statements are turned into.
Term
procedures and functions
Definition
Two types of stored subprograms.
Term
EXECUTE IMMEDIATE
Definition
Command used to execute dynamic SQL.
Term
%TYPE
Definition
The attribute used to get the type of a column or variable without knowing what it is.
Term
%ROWTYPE
Definition
The attribute used to get the type of a row without knowing what it is.
Term
Abstract Data Types
Definition
Kind of datatypes that support object-oriented programming in PL/SQL.
Term
ADT
Definition
Abbreviation for Abstract Data Type.
Term
SQL
Definition
An anonymous block is a(n) ____ statement.
Term
boolean
Definition
A basic PL/SQL datatype that SQL does not have.
Term
True, false or NULL.
Definition
The three possible values of a BOOLEAN literal.
Term
NULL
Definition
Value of a character literal with zero characters.
Term
null string
Definition
Term for a character literal with zero characters.
Term
not the same
Definition
A null string and a BOOLEAN null are _______ (same/not the same).
Term
database
Definition
An ordinary character literal is composed of characters in the ________ character set.
Term
national
Definition
A national character literal is composed of characters in the ________ character set.
Term
--
Definition
Characters that begin a single-line comment.
Term
/*
Definition
Characters that begin a multi-line comment.
Term
*/
Definition
Characters that end a multi-line comment.
Term
single-line
Definition
Kind of comment not to put in a PL/SQL block to be processed dynamically by an Oracle Precompiler program.
Term
vname CONSTANT VARCHAR2 := 'x';
Definition
Declaration of a varchar2 constant, called vname, with value 'x'.
Term
INTO
Definition
Keyword for doing assignment to a variable with SELECT.
Term
FETCH
Definition
Command to assign to variables from a cursor.
Term
nested
Definition
A subprogram created inside a block is a _________ subprogram.
Term
create procedure
Definition
Command to create a procedure.
Term
drop procedure
Definition
Command to delete a procedure.
Term
executable
Definition
Subprograms are stored in __________ form.
Term
optional
Definition
The declaration section is (optional/mandatory).
Term
mandatory
Definition
The BEGIN section is (optional/mandatory)
Term
optional
Definition
The EXCEPTION section is (optional/mandatory).
Term
NULL
Definition
Command to make a no-op (omit semicolon).
Term
anonymous block
Definition
The DECLARE keyword is only required in an _______ _______.
Term
CURRENT_USER or DEFINER
Definition
The valid values of the AUTHID property.
Term
DEFINER
Definition
The default value of the AUTHID property.
Term
USER_PROCEDURES
Definition
Data dictionary view giving the AUTHID values on a user's objects.
Term
invoker's
Definition
A unit with AUTHID = CURRENT_USER is an ________ rights unit.
Term
definer's
Definition
A unit with AUTHID = DEFINER is a ________ rights unit.
Term
IR
Definition
Abbreviation of invoker's rights
Term
DR
Definition
Abbreviation of definer's rights
Term
invoker's
Definition
An anonymous block always has _________ rights.
Term
definer's
Definition
Triggers and views always have _________ rights.
Term
unqualified
Definition
Setting CURRENT_SCHEMA only changes what is prepended to __________ references.
Term
SESSION_USER
Definition
When a session starts, CURRENT_SCHEMA has the value of the schema owned by ___________.
Term
SYS_CONTEXT
Definition
To get the current value of CURRENT_SCHEMA, CURRENT_USER, or SESSION_USER, use the ____ function.
Term
ALTER SESSION SET CURRENT_SCHEMA = 'x';
Definition
Statement to set current schema to x.
Term
integrated
Definition
Advantage: PL/SQL is tightly _______ with Oracle SQL.
Term
server
Definition
Advantage: PL/SQL gives SCALABILITY because stored procedures are executed on the _______.
Term
scalable
Definition
Advantage: Having procedures stored and executed on the server makes PL/SQL ________.
Term
Oracle
Definition
Advantage: PL/SQL is PORTABLE to any OS where ________ runs.
Term
portable
Definition
Advantage: PL/SQL runs anywhere Oracle runs, so it is very ________.
Term
SESSION_USER
Definition
The variable showing the user id of the session owner.
Term
CURRENT_USER
Definition
The variable showing the user id that is automatically prepended to object names.
Term
DECLARE, BEGIN, EXCEPTION, END
Definition
The four keywords that define a PL/SQL block.
Term
significant
Definition
Types: The storage size of a NUMBER value is based on the number of ______ digits.
Term
%FOUND, %ISOPEN, %NOTFOUND, %ROWCOUNT
Definition
Cursors: The four cursor attributes, in alphabetical order.
Term
%ISOPEN.
Definition
Cursors: Which cursor attribute is not meaningful for an implicit cursor?
Term
SQL
Definition
Cursors: What is the "name" of the implicit cursor?
Term
One
Definition
Cursors: How many implicit cursors can you access?
Term
SQL
Definition
Cursors: You cannot use cursor attributes in _______ statements.
Term
explicit
Definition
Cursors: A cursor with a name is an _________ cursor.
Term
3
Definition
Cursors: The SQL%FOUND attribute has how many possible values?
Term
TRUE, FALSE, NULL
Definition
Cursors: What are the 3 possible values of SQL%FOUND and SQL%NOTFOUND?
Term
FALSE
Definition
Cursors: The value of SQL%ISOPEN is always ______.
Term
NULL
Definition
Cursors: If no SELECT or DML statement has run, the value of SQL%ROWCOUNT is what?
Term
SQL%BULK_ROWCOUNT
Definition
Cursors: What implicit cursor attribute gives row counts for a FORALL statement?
Term
PLSQL_OPTIMIZE_LEVEL
Definition
Parameter that controls how much Oracle optimizes your PL/SQL code on compilation.
Term
1
Definition
Value of PLSQL_OPTIMIZE_LEVEL that prevents optimization.
Term
2
Definition
Default value of PLSQL_OPTIMIZE_LEVEL.
Term
network
Definition
Advantage: Performance: Storing and runnng procedures on the server minimizes ______ traffic.
Term
bind
Definition
Advantage: Performance: PL/SQL automatically creates ______ variables for variables in WHERE and VALUES clauses.
Term
dynamic
Definition
PL/SQL does not automatically create bind variables in ________ SQL.
Term
cached
Definition
Advantage: Performance: Stored subprograms are ______ in memory.
Term
memory
Definition
Advantage: Caching of programs and sharing among users lowers _______ requirements.
Term
manageable
Definition
Advantage: PL/SQL programs are stored centrally, making them more ______.
Term
object
Definition
Advantage: PL/SQL supports ______-oriented programming.
Term
Apache
Definition
Web: mod_plsql is an _______ module.
Term
Gateway
Definition
Web: PL/SQL _______ enables a Web browser to invoke a PL/SQL stored subprogram through an HTTP listener.
Term
Gateway
Definition
Web: mod_plsql is an implementation of the PL/SQL _________.
Term
Web Toolkit
Definition
Web: PL/SQL _____ _______ lets you to develop Web applications made of PL/SQL procedures.
Term
Server Pages
Definition
Web: PL/SQL ______ ______ (PSPs) let you develop web pages with dynamic content.
Term
<<>>
Definition
Labels for blocks and statements are enclosed in "__" brackets.
Term
anonymous block
Definition
Types of blocks: A pl/sql block that is not stored in the database.
Term
stored
Definition
Types of blocks: Procedures and functions are _______ blocks.
Term
dbms_output.put_line
Definition
I/O: The most basic PL/SQL way to give output to the user.
Term
buffer
Definition
I/O: dbms_output.put_line puts output into a _______.
Term
SQLPlus
Definition
I/O: The buffered output of dbms_output.put_line is retrieved by _______.
Term
set serveroutput on
Definition
I/O: SQLPlus command for getting buffered output.
Term
scalar
Definition
Types: ______ data types are those storing values with no internal components.
Term
constant, parameter, return value, variable
Definition
Types: The 4 PL/SQL things that have a data type:
Term
composite
Definition
Types: ________ data types have internal components.
Term
base
Definition
Types: A data type family consists of a ______ type and its subtypes.
Term
subtype
Definition
Types: A ______ has the same valid operations as its base type.
Term
SQL
Definition
Types: PL/SQL has all the _____ data types.
Term
4
Definition
Types: In addition to the SQL data types, PL/SQL has ___ more scalar data types.
Term
BOOLEAN
Definition
Types: One of the scalar data types specific to PL/SQL.
Term
PLS_INTEGER
Definition
Types: One of the scalar data types specific to PL/SQL.
Term
BINARY_INTEGER
Definition
Types: One of the scalar data types specific to PL/SQL.
Term
REF_CURSOR
Definition
Types: One of the scalar data types specific to PL/SQL.
Term
not a number
Definition
NAN stands for _________.
Term
DBMS_PIPE
Definition
I/O: This package lets two or more sessions in the same instance communicate.
Term
HTF
Definition
I/O: This package has hypertext functions that generate HTML tags
Term
HTP
Definition
I/O: This package has hypertext procedures that generate HTML tags
Term
UTL_FILE
Definition
I/O: This package lets PL/SQL programs read and write OS files.
Term
DBMS_OUTPUT
Definition
I/O: This package sends text output to SQLPlus
Term
UTL_HTTP
Definition
I/O: This package handles HTTP.
Term
UTL_SMTP
Definition
I/O: This package does email.
Term
cannot
Definition
I/O: The PL/SQL I/O packages (can/cannot) accept input directly from the keyboard.
Term
PUT
Definition
I/O: The DBMS_OUTPUT function that writes output without a newline character.
Term
PUT_LINE
Definition
I/O: The DBMS_OUTPUT function that writes output WITH a newline character.
Term
ENABLE
Definition
I/O: The DBMS_OUTPUT procedure that sets the size of the output buffer.
Term
VARCHAR2
Definition
I/O: One of the 3 types of data that can be passed to the DBMS_OUTPUT buffer.
Term
NUMBER
Definition
I/O: One of the 3 types of data stored in the DBMS_OUTPUT buffer.
Term
DATE
Definition
I/O: One of the 3 types of data stored in the DBMS_OUTPUT buffer.
Term
after
Definition
I/O: The output from DBMS_OUTPUT will display (during/after) program execution.
Term
1 million
Definition
I/O: Max number of bytes DBMS_OUTPUT can handle in a session.
Term
255
Definition
I/O: Max number of bytes to pass in a call to DBMS_OUTPUT.PUT_LINE.
Term
GET_LINE
Definition
I/O: This DBMS_OUTPUT proc retrieves one line from the buffer.
Term
GET_LINES
Definition
I/O: This DBMS_OUTPUT proc retrieves multiple lines from the buffer.
Term
CHARARR
Definition
I/O: The string table type in DBMS_OUTPUT for holding lines of text.
Term
finishes
Definition
I/O: The DBMS_OUTPUT buffer will not be flushed until it is full or until the current PL/SQL block _________.
Term
flushed
Definition
I/O: If the current (outermost) PL/SQL block ends with an unhandled exception, the output buffer will not be ___________.
Term
OTHERS
Definition
I/O: To make sure the DBMS_OUTPUT buffer will be flushed, put a WHEN ______ clause in the EXCEPTION section of your outer block.
Term
DBMS_SESSION.RESET_PACKAGE
Definition
Pkgs: This procedure de-instantiates/resets all packages in this session.
Term
finishes
Definition
Pkgs: RESET_PACKAGE only takes effect after the outermost PL/SQL proc that called it ________.
Term
DBMS_SESSION
Definition
Pkgs: The _______ package gives access to such SQL things as ALTER SESSION.
Term
delimiters
Definition
Fundamental: One of the 4 types of lexical units.
Term
identifiers
Definition
Fundamental: One of the 4 types of lexical units.
Term
literals
Definition
Fundamental: One of the 4 types of lexical units.
Term
comments
Definition
Fundamental: One of the 4 types of lexical units.
Term
include
Definition
Fundamental: identifiers (include/do not include) reserved words.
Term
simple and compound symbols
Definition
Fundamental: What are delimiters?
Term
:=
Definition
Fundamental: Which one of these is a compound symbol: =, :=
Term
=
Definition
Fundamental: Which one of these is a simple symbol: a, =, !=
Term
..
Definition
Fundamental: What is the range operator?
Term
**
Definition
Fundamental: What is the exponentiation operator?
Term
<>, !=, ^=
Definition
Fundamental: What are the 3 compound symbols for "not equal to"?
Term
implicit cursor
Definition
Cursors: A session cursor that is automatically created and managed by PL/SQL.
Term
session cursor
Definition
Cursors: A cursor that lives in session memory until the session ends.
Term
explicit cursor
Definition
Cursors: A session cursor that a PL/SQL user creates and manages.
Term
cursor
Definition
A pointer to a private SQL area that stores information about processing a specific SELECT or DML statement.
Term
SQL cursor
Definition
Cursors: An implicit cursor is also called a/n ________ ________,
Term
TOO_MANY_ROWS
Definition
The exception raised when a SELECT INTO statement returns more than one row.
Term
1
Definition
Cursors: The value of SQL%ROWCOUNT after a SELECT INTO statement returns more than one row.
Term
query
Definition
Cursors: You give an explicit cursor a name and associate it with a _______.
Term
CURSOR, RETURN, IS
Definition
Cursors: The three keywords in a full cursor declaration/definition (before the SELECT).
Term
CURSOR, RETURN
Definition
Cursors: The two keywords in a mere cursor declaration (one is optional).
Term
define
Definition
Cursors: You can just declare a cursor at first, then _______ it later.
Term
can
Definition
Cursors: An explicit cursor (can/cannot) accept parameters.
Term
OPEN
Definition
Cursors: The statement where you pass the parameters to a cursor.
Term
INTO
Definition
Cursors: The second keyword of a FETCH statement.
Term
CLOSE
Definition
Cursors: The statement that closes a cursor.
Term
1
Definition
Cursors: How many DML statements can a FORALL statement contain?
Term
collections
Definition
Cursors: The values plugged into the DML in a FORALL must come from existing, populated _________.
Term
network
Definition
Bulk: The use of FORALL statements cuts down on ______ traffic.
Term
SQL%BULK_ROWCOUNT
Definition
Bulk: The implicit cursor attribute that gives the number of rows affected by each DML statement in a FORALL statement.
Term
array
Definition
Cursors: The SQL%BULK_ROWCOUNT attribute is an _________,
Term
LOOP
Definition
Cursors: Opening keyword of a cursor FETCH loop.
Term
END LOOP
Definition
Cursors: Closing keywords of a cursor FETCH loop.
Term
..
Definition
Loops: What is the index range operator in a FOR loop?
Term
EXIT WHEN
Definition
Cursors: Statement to end a loop when MyCur is used up: _____ ______ MyCur%NOTFOUND.
Term
FOR, IN
Definition
Cursors: The first two keywords in a Cursor FOR loop.
Term
FETCH, INTO
Definition
Cursors: The first two keywords of a basic fetch statement.
Term
a cursor
Definition
What do you FETCH from?
Term
FETCH, BULK COLLECT INTO
Definition
Bulk: The keywords of a bulk collect FETCH statement.
Term
FETCH
Definition
Cursors: A Cursor FOR loop does not use a ______ statement.
Term
does not
Definition
Cursors: The index variable in a cursor FOR loop (does/does not) need to be declared.
Term
CURRENT OF
Definition
A PL/SQL extension to the WHERE clause of the SQL statements UPDATE and DELETE
Term
FOR UPDATE
Definition
Cursors: Only a _____ _____ cursor can appear in the CURRENT OF clause of an UPDATE or DELETE statement.
Term
end
Definition
Cursors: The FOR UPDATE phrase goes at the (beginning/end) of the cursor definition.
Term
CURRENT OF
Definition
Cursors: WHERE _______ ______ makes an UPDATE or DELETE apply to the current row of a cursor.
Term
lock
Definition
A SELECT statement with the FOR UPDATE clause puts a ______ on the selected rows.
Term
@
Definition
Delimiters: The remote access symbol.
Term
--
Definition
Delimiters: Single-line comment marker.
Term
;
Definition
Delimiters: Statement terminator.
Term
<<
Definition
Delimiters: The left label delimiter.
Term
%
Definition
Delimiters: the attribute indicator.
Term
=>
Definition
Delimiters: The association operator.
Term
:=
Definition
Delimiters: The assignment operator.
Term
.
Definition
Delimiters: The component indicator/selector.
Term
:
Definition
Delimiters: Host variable indicator.
Term
,
Definition
Delimiters: Item separator.
Term
STANDARD
Definition
IDs: Predefined identifiers are declared in this package.
Term
ordinary
Definition
IDs: You cannot use reserved words as ______ user-defined identifiers.
Term
can
Definition
IDs: You (can/cannot) use keywords as ordinary user-defined identifiers.
Term
quoted
Definition
IDs: You can use a reserved word as a _______ user-defined identifier.
Term
user-defined
Definition
Exceptions: PL/SQL exceptions are of two types: internal and _________.
Term
names
Definition
Exceptions: User-defined exceptions must have _______.
Term
EXCEPTION_INIT
Definition
Exceptions: Pragma that links an exception to an Oracle error code.
Term
STANDARD
Definition
Exceptions: The _________ package defines the PL/SQL environment.
Term
WHEN OTHERS THEN
Definition
Exceptions: The three words that can be used to guarantee all exceptions will be handled.
Term
RAISE
Definition
Exceptions: Type ______ to re-raise the current exception.
Term
WHEN
Definition
Exceptions: The keyword that begins an exception handler.
Term
OTHERS
Definition
Exceptions: The ________ handler must always be the last handler.
Term
closed
Definition
Exceptions: When an exception is raised inside a cursor FOR loop, the cursor is _______ implicitly.
Term
block
Definition
Exceptions: An exception in the declarations section propagates to the enclosing _______.
Term
exception
Definition
Exceptions: An exception in the declarations section does not go to the __________ section.
Term
handler
Definition
Exceptions: An exception raised inside a _______ propagates immediately to the enclosing block
Term
exception handler
Definition
Exceptions: A GOTO statement cannot branch into an _______ ________.
Term
current
Definition
Exceptions: You cannot GOTO from an exception handler back into the __________ block.
Term
enclosing
Definition
Exceptions: A GOTO statement CAN branch from an exception handler into an ________ block.
Term
512
Definition
Exceptions: The maximum length of an Oracle error message is ____ characters
Term
SQLERRM
Definition
Exceptions: The ________ function returns the error message associated with an error code.
Term
SQLCODE
Definition
Exceptions: The ________ function returns the current error code.
Term
error code
Definition
Exceptions: You can pass an ______ ________ to SQLERRM.
Term
unhandled
Definition
Exceptions: If there is no handler for an exception, PL/SQL returns an ________ exception error to the invoker or host environment.
Term
E Exception;
Definition
Exceptions: Declare an exception called E.
Term
PRAGMA EXCEPTION_INIT (E, -1);
Definition
Exceptions: Associate exception E with error code -1.
Term
error code
Definition
Exceptions: Each internal exception has an Oracle ______ _______.
Term
predefined
Definition
Exceptions: Some internal exceptions have ________ names.
Term
propagates
Definition
Exceptions: An unhandled exception ________ to the enclosing block.
Term
statement
Definition
You can put a label before any executable PL/SQL _________.
Term
loop
Definition
A FOR-loop counter is defined only within the _____.
Term
label
Definition
GOTO branches to a ________.
Term
cannot
Definition
You (can/cannot) put a label before an END LOOP statement.
Term
v2 IN NUMBER default 20
Definition
Declare an input NUMBER parameter, v2, that defaults to 20.
Term
v1 OUT number default 10
Definition
Declare an output NUMBER parameter, v1, that defaults to 10.
Term
v3 IN OUT NUMBER
Definition
Declare an input/output NUMBER parameter, v3.
Term
RETURN
Definition
What word is in a function header but not in a procedure header?
Term
IN
Definition
mode designation for an input parameter.
Term
OUT
Definition
mode designation for an output parameter.
Term
IN OUT
Definition
mode designation for an input/output parameter.
Term
FORALL and BULK COLLECT
Definition
Bulk: The two features that comprise Bulk SQL are:
Term
binding
Definition
Assigning values to PL/SQL variables that appear in SQL statements is called _______.
Term
execute immediate
Definition
This statement used to execute most dynamic SQL.
Term
nested
Definition
A subprogram defined within another subprogram is a _______ subprogram.
Term
NDS
Definition
DynSQL: Native Dynamic SQL
Term
EXECUTE IMMEDIATE
Definition
DynSQL: The main command for Native Dynamic SQL.
Term
USING
Definition
DynSQL: The clause that supplies bind arguments to EXECUTE IMMEDIATE.
Term
INTO
Definition
DynSQL: The clause that receives single-row query output from EXECUTE IMMEDIATE.
Term
DBMS_SQL
Definition
DynSQL: The standard package that does dynamic SQL.
Term
IN, OUT, IN OUT
Definition
DynSQL: The three modes of arguments in the USING clause of EXECUTE IMMEDIATE.
Term
PL/SQL
Definition
DynSQL: EXECUTE IMMEDIATE does both dynamic SQL and dynamic _______.
Term
concatenation
Definition
DynSQL: In EXECUTE IMMEDIATE, the statement string can use either placeholders, or string ________.
Term
multi-row
Definition
DynSQL: EXECUTE IMMEDIATE can be used for any SQL statement or PL/SQL block, except for ________ queries.
Term
'
Definition
Fundamental: Character used to escape a single quote inside a literal.
Term
32,000
Definition
DynSQL: Maximum string length to pass to EXECUTE IMMEDIATE.
Term
32,000
Definition
Fundamental: Maximum string length of a PL/SQL variable.
Term
placeholders
Definition
DynSQL: The colon-prefixed names used in EXECUTE IMMEDIATE are called ________.
Term
raise_application_error
Definition
Exceptions: The built-in procedure for raising an application-defined error.
Term
-20,000
Definition
Exceptions: Start of the range of error codes for RAISE_APPLICATION_ERROR.
Term
raise_application_error(-20,100, 'Bad');
Definition
Exceptions: Write the call (2 args) to associate message 'Bad' with error code -20,100.
Term
STANDARD
Definition
Exceptions: The package that defines pre-defined exceptions.
Term
bind variable
Definition
A kind of variable used as a placeholder.
Term
Ada
Definition
Language that PL/SQL is derived from.
Term
PVM
Definition
Official acronym for PL/SQL's runtime engine.
Term
bytecode
Definition
Kind of code created by the PL/SQL compiler.
Term
SUBTYPE numb IS number;
Definition
Declare an unconstrained subtype of NUMBER called NUMB.
Term
SUBTYPE n IS number not null;
Definition
Declare a constrained subtype of NUMBER called N that is not null.
Term
BINARY_INTEGER
Definition
Types: The PL/SQL type that is identical to PLS_INTEGER.
Term
hardware
Definition
Types: Which type of arithmetic does PLS_INTEGER use, library or hardware?
Term
library
Definition
Types: Which type of arithmetic does NUMBER use, library or hardware?
Term
SIMPLE_INTEGER
Definition
Types: The predefined subtype of PLS_INTEGER that has the NOT NULL constraint.
Term
PLS_INTEGER
Definition
Types: The only PL/SQL type for which you can specify a range constraint.
Term
constrained
Definition
Type: A __________ subtype has only a subset of the values of its base type.
Term
unconstrained
Definition
Type: An ________ subtype has all the values of its base type.
Term
scalar
Definition
Types: ________ data types have no internal components.
Supporting users have an ad free experience!