Back-End Standard

From SmartHCM Wiki
Revision as of 13:28, 29 April 2015 by Yameen (talk | contribs)
Jump to navigation Jump to search


Naming Conventions and Standards

  • Database Object Name (i.e. Table, Sequence, View, Index, Trigger, Package, Procedure, Function, Materialized View, Job, Type, Directory, Constraints, Synonyms and Tablespace ) should be meaningful. Example : Table Name "HRS_EMPLOYEE_PERSONNEL"
  • Column Name should be clearly defined and meaningful. Example : Employee_ID
  • Database Object name and Column name should not contain the Number and Special characters except "_" character
  • Constraints name should be clearly defined and must be used the prefix and suffix when creating the constraints
Constraints Name
Abbreviation Description Example
fk References (Foreign Key) hr_emp_empid_fk
uk Unique Key hr_emp_empid_uk
pk Primary Key hr_emp_empid_pk
ck Check hr_emp_empid_ck
nn Not Null hr_emp_empid_nn
  • Use the following prefix in Identifier/Variable naming conventions (Local Variable, Global Variable, Parameter Variable, Constant Variable)
Abbreviation Description Example Comment
k Constant k_mailhost Generic constant
g Variable g_loop_count Global (package-level) variable
v Variable v_loop_count Local variable
p Variable p_loop_count Parameter variable
  • Use the following prefix for scalar types that have aggregate data types.
Abbreviation Description Example
c Cursor c_employees
cp Cursor parameter cp_employee_id
r Record r_employee
  • The suffix is used to qualify the identifier further by documenting its usage. For example, the suffix denotes the type of parameter, whether IN, OUT, or IN OUT, or to show that a variable or parameter is also a table.
Type Description Example
Input-only parameter p_num_items
out Output-only parameter p_sum_out
inout Both input and output p_sum_inout

Product Naming Conventions and Standards

  • Use the following prefix in Table, Sequence, Package, Procedure, Function, Trigger, Materialized View , View, Index should be meaning full and start from Module name
Prefix Module Name
SET Settings
SEC Security
HRS Human Resource System
PAY Payroll
TOM Time Office Management
OSP Office Support Portal
ESS Employee Self Service / Web Portal General Settings
COM Communication System
MRR Meeting Room Reservation
HRS_EREC E-Recruitment
ARC Correspondence System
INV Inventory Module
FIN Finance Module
PUR Purchase Module
CON Contract Module
DFS Date Factory System
  • Example Naming Standard of Database Objects for Table Specific
Objects Module Prefix Object Name Object Type Suffix Example
Table SET_ TABLE_NAME SET_LOCATION
View SET_ TABLE_NAME _VW SET_LOCATION_LOC_ID_SEQ
Sequence SET_ TABLE_NAME_COLUMN_NAME _SEQ SET_LOCATION_LOC_ID_SEQ
Package SET_ TABLE_NAME _PKG SET_LOCATION_PKG
Procedure SET_ TABLE_NAME _PRO SET_LOCATION_ PRO
Function GET_ TABLE_NAME ColumnName GET_LOCATION_NAME
Trigger SET_ TABLE_NAME _TRG SET_LOCATION_ TRG

<_BU> (Before Update) <_BI> (Before Insert) <_AU> (After Update) <_AI> (After Insert)

Materialized View SET_ TABLE_NAME_COLUMN_NAME _MV SET_LOCATION_ MV
Index SET_ TABLE_NAME _IDX SET_LOCATION_LOC_ID_IDX
Constraints SET_ TABLE_NAME_ ColumnName _IDX SET_LOCATION_LOC_ID_IDX
Constraints SET_ TABLE_NAME_ ColumnName _PK

_UK _CK _NN _FK

SET_LOCATION_LOC_ID_PK SET_LOCATION_LOC_ID_UK SET_LOCATION_LOC_ID_CK SET_LOCATION_LOC_ID_NN SET_LOCATION_LOC_ID_FK