Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Overview

Think of all naming identifiers as consisting of 5 parts: Scope, Type, Primary Identifier, Modifier, and Suffix. Of the 5 elements only the primary identifier is required. All others are optional and only make the name better self documenting.

Scope

The scope is the locality of reference.

Examples:

LocalityDescriptionExample
gGlobalg_temp
lLocall_temp
pParameterp_parm1

Back to Top

Type

There are only two types, constants and variables.

Examples:

TypeDescriptionExampleComment
cConstantgc_loop_crnGlobal constant
cConstantlc_loop_crnLocal Constant
cConstantpc_loop_crnParameter
vVariablegv_loop_crnGlobal Variable
vVariablelv_loop_crnLocal Variable
vVariablepv_loop_crnParameter

In addition to these scalar types, there are other data types that are supported by the PL/SQL language. They are aggregate data types, which are as follows:

TypeDescriptionExample
curCursorgcur_student
vcr Cursor(variable)lvcr_student
tblTablegtbl_student
recRecordltrec_address

Back to Top

Primary Identifier

The primary identifier is the most important part of a name. This can be a single word or a phrase.

Examples: Account, Student, StuAddr, LearnerEnroll, etc.

Back to Top

Modifier

A modifier further qualifies a primary identifier to make it more readable. These modifiers can either precede or succeed a primary identifier.

Examples:

Primary IdentifierModifierPositionVariable
addressmailingPrecedemailing_address
phonehomePrecedehome_phone
customer_namelastMiddlecustomer_last_name

Back to Top

Suffix

The suffix is used to qualify the identifier further to document the usage of the variable. For example, the suffix is used to denote the type of parameter, as in IN, OUT, or INOUT.

Examples:

TypeDescriptionExample
iInput only parameterpv_num_items_i
oOutput only parameterpv_sum_o
ioBoth input and outputpv_sum_io

Back to Top

Data Analytics & Reporting Team (DART), SVC4010, Contact Us

  • No labels