Difference between revisions of "Back-End Standard"

From SmartHCM Wiki
Jump to navigation Jump to search
Line 71: Line 71:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! header 1
+
! Abbreviation
! header 2
+
! Description
! header 3
+
! Example
 
|-
 
|-
| row 1, cell 1
+
| c
| row 1, cell 2
+
| Cursor
| row 1, cell 3
+
| c_employees
 
|-
 
|-
| row 2, cell 1
+
| cp
| row 2, cell 2
+
| Cursor parameter
| row 2, cell 3
+
| cp_employee_id
 
|-
 
|-
| row 3, cell 1
+
| r
| row 3, cell 2
+
| Record
| row 3, cell 3
+
| r_employee
 
|}
 
|}

Revision as of 12:19, 29 April 2015


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