Database Object Standards
This section discusses the rules applied to naming database objects and the attributes that are associated with these objects.
Categories of Data
A table can belong to one of the three categories:
Control (admin)
Master
Transaction
For purposes of physical table space design, metadata and control tables can belong to the same category.
Example of tables in each category:
Control: SC_USER, CI_ADJ_TYPE, F1_BUS_OBJ
Master: CI_PER, CI_PREM,
Transaction: F1_FACT, CI_FT
All tables have the category information in their index name. The second letter of the index carries this information. Refer to the Indexes section for more information.
Naming Standards
The following naming standards must be applied to database objects.
Table
Table names are prefixed with the owner flag value of the product. For customer modification CM must prefix the table name. The length of the table names must be less than or equal to 30 characters. A language table should be named by suffixing _L to the main table. The key table name should be named by suffixing _K to the main table.
It is recommended to start a table name with the 2-3 letter acronym of the subsystem name that the table belongs to. For example, MD stands for metadata subsystem and all metadata table names start with CI_MD.
Some examples are:
CI_ADJ_TYPE
CI_ADJ_TYPE_L
A language table stores language sensitive columns such as a description of a code. The primary key of a language table consists of the primary key of the code table plus language code (LANGUAGE_CD).
A key table accompanies a table with a surrogate key column. A key value is stored with the environment id that the key value resides in the key table.
The tables prior to V2.0.0 are prefixed with CI_ or SC_.
Columns
The length of a column name must be less than or equal to 30 characters. The following conventions apply when you define special types of columns in the database.
Use the suffix FLG to define a lookup table field. Flag columns must be CHAR(4). Choose lookup field names carefully as these column names are defined in the lookup table (CI_LOOKUP_FLD) and must be prefixed by the product owner flag value.
Use the suffix CD to define user-defined codes. User-defined codes are primarily found as the key column of the admin tables.
Use the suffix ID to define system assigned key columns.
Use the suffix SW to define Boolean columns. The valid values of the switches are 'Y' or 'N'. The switch columns must be CHAR(1)
Use the suffix DT to define Date columns.
Use the suffix DTTM to define Date Time columns.
Use the suffix TM to define Time columns.
Some examples are:
ADJ_STATUS_FLG
CAN_RSN_CD
Indexes
Index names are composed of the following parts:
[OF][application specific prefix][C/M/T]NNN[P/S]n
OF- Owner Flag. Prior to Version 4.1.0 of the framework the leading character of the base Owner Flag was used. From 4.1.0 on the first two characters of product’s owner flag value should be used. For client specific implementation of index, use CM for Owner Flag.
Application specific prefix could be C, F, T or another letter.
C/M/T - The second character can be either C or M or T. C is used for control tables (Admin tables). M is for the master tables. T is reserved for the transaction tables.
NNN - A three-digit number that uniquely identifies the table on which the index is defined.
P/S - P indicates that this index is the primary key index. S is used for indexes other than primary keys.
n is the index number, unique across all indexes on a given table (0 for primary and 1, 2, etc., for the secondary indexes).
Some examples are:
F1C066P0
F1C066S1
CMT206S2
Warning! Do not use index names in the application as the names can change due to unforeseeable reasons.
Updating Storage.xml
The storage.xml file that comes with the product allocates all base tables and indexes to the default tablespace CISTS_01. If you decide to allocate some tables or indexes outside of the default tablespace, then this has to be reflected in the storage.xml file by changing the tablespace name from the default value to a custom value, according to the format shown below:
Format:
<Table_Name>
<TABLESPACE>CISTS_01</TABLESPACE>
<PARALLEL>1</PARALLEL>
- <LOB>
- <Column Name>
<TABLESPACE>CISTS_01</TABLESPACE>
<SECUREFILE>Y</SECUREFILE>
<CHUNK>8192</CHUNK>
<CACHE>N</CACHE>
<LOGGING>Y</LOGGING>
<INROW>Y</INROW>
<COMPRESS>N</COMPRESS>
</Column Name>
</LOB>
</Table_Name>
 
Where Parallel defines the number of threads, that Oracle DB Server will use to access a table or create an index.
For instance, if a DBA decided to allocate table CI_ACCT in a tablespace MyTablespace, then they would have to change the storage.xml as follows:
<CI_ACCT>
<TABLESPACE>MyTablespace</TABLESPACE>
</CI_ACCT>
 
The oradbi process uses the storage.xml file to place the new database objects into defined tablespaces. A tablespace referenced in the storage.xml file must exist in the database.
The storage.xml file has to be adjusted before each upgrade and/or new installation as required to allocate the tables and indexes across those tablespaces.
Table name is included as a comment for each of the indexes for clarity.
For initial installs, information for each object should be reviewed by a DBA. For upgrades, only tablespace information for the objects added in the new release needs to be reviewed by a DBA.
Be careful while editing this file. Make sure that the tablespace names being used exist in the database. Do not change the basic format of this file.
Sequence
The base sequence name must be prefixed with the owner flag value of the product. For customer modification CM must prefix the sequence name. The sequence numbers should be named as below:
1. If the Sequence is used for a specific Table then use the following sequence name:
[OF][C/M/T]NNN_SEQ
OF stands for Owner Flag. For example, Framework its F1. Other examples are D1,D2, etc.
C/M/T stands for Control (Admin)/Master/Transaction Tables.
NNN is a three digit unique Identifier for a Table on which the Sequence is defined.
For example: F1T220_SEQ
2. If more than one Sequence is used for a specific Table then use the following Sequence Name:
[OF][C/M/T]NNN_Column_Name_SEQ
OF stands for Owner Flag. For example, the framework is F1. Other examples are D1,D2, etc.
C/M/T stands for Control (Admin)/Master/Transaction tables.
NNN is a three digit unique identifier for a table on which the sequence is defined.
For example: F1T220_BO_STATUS_CD_SEQ and F1T220_BUS_OBJ_CD_SEQ
3. If sequence is used for a generic requirement and not specific to a table, then use the following sequence name.
[OF]Column_Name_SEQ
OF stands for Owner Flag. For example, the framework is F1. Other examples are D1,D2, etc.
For example: F1FKVALID_SEQ
For a customer modification, CM must prefix the sequence name.
Trigger
The base trigger name must be prefixed with the owner flag value of the product.
When implementers add database objects, such as tables, triggers and sequences, the name of the objects should be prefixed by CM.