|
| 1 | +# Tables Standards |
| 2 | + |
| 3 | +<br> |
| 4 | + |
| 5 | +- <a href="#naming-syntax">**Naming Syntax**</a> |
| 6 | +- <a href="#naming-convention">**Naming Convention**</a> |
| 7 | +- <a href="#standards">**Standards**</a> |
| 8 | +- <a href="#examples">**Examples**</a> |
| 9 | + |
| 10 | +<br> |
| 11 | + |
| 12 | +## Naming Syntax |
| 13 | + |
| 14 | +##### Syntax |
| 15 | + |
| 16 | +> {custom_schema}{separator}{app_short_name}{separator}[Optional {prefix}{separator}]{object_name}[Optional {separator}{suffix}] |
| 17 | +
|
| 18 | +<br> |
| 19 | + |
| 20 | +##### Syntax for data upload tables ONLY |
| 21 | + |
| 22 | +> {prefix}{separator}{app_short_name}{separator}{object_name} |
| 23 | +
|
| 24 | +<br> |
| 25 | + |
| 26 | +## Naming Convention |
| 27 | + |
| 28 | + | SEQ | Object Name | Length | Prefix | Suffix | Example | |
| 29 | + | :-: | :---- | :-: | :--- | :--- | :---- | |
| 30 | + | 1 | Table | 20 | - | - | XXD_PO_LC_DOCUMENTS | |
| 31 | + | 2 | Temporary Table | 20 | - | TMP | XXD_PO_LC_DOCS_TMP | |
| 32 | + | 3 | Data Upload Table [^1] | 20 | TMP | - | TMP_PO_LC_DOCS | |
| 33 | + |
| 34 | +<br> |
| 35 | + |
| 36 | +## Standards |
| 37 | + |
| 38 | +- You MUST follow database custom objects <a href="https://github.com/demasy/Oracle-EBS-Development-Guidelines/tree/main/database-standards-guidelines">**general standards**</a>. |
| 39 | +- The table name `{object_name}` should be plural. |
| 40 | +- The table name `{object_name}` should be 20 characters or less. It can be longer, but you need to abbreviate it for the table handler package name, which must be 27 characters or less. |
| 41 | +- You must place the new tables in the custom ORACLE schema, for example, "**XXD**", and grant privileges to the "**APPS**" schema. |
| 42 | +- You must create private synonyms for custom tables in "**APPS**" schema. |
| 43 | +- The table MUST include a primary key (PK) column and supply value from a specific sequence. |
| 44 | +- You should add special WHO columns to your tables. |
| 45 | +- You should add concurrent program WHO columns to your table. |
| 46 | +- You should add descriptive flexfield (DFF) attribute columns to your table. |
| 47 | +- New tables containing flexfield or Oracle Alert columns must be registered with Oracle Application Object Library (AOL). |
| 48 | +- You should register your custom tables with Oracle AOL using the table registration API called "**AD_DD**". |
| 49 | + - `AD_DD.REGISTER_TABLE` |
| 50 | + - `AD_DD.REGISTER_COLUMN` |
| 51 | + |
| 52 | +<br> |
| 53 | + |
| 54 | +##### WHO columns |
| 55 | + |
| 56 | + | Column Name | Type | Null? | Foreign Key? | Value | |
| 57 | + | :-- | :---- | :-: | :-- | :--- | |
| 58 | + | CREATED_BY | NUMBER(15) | NOT NULL | FND_USER | TO_NUMBER (FND_ PROFILE.VALUE (’USER_ID’)) | |
| 59 | + | CREATION_DATE | DATE | NOT NULL | | SYSDATE | |
| 60 | + | LAST_UPDATED_BY | NUMBER(15) | NOT NULL | FND_USER | TO_NUMBER (FND_ PROFILE.VALUE (’USER_ID’)) | |
| 61 | + | LAST_UPDATE_DATE | DATE | NOT NULL | | SYSDATE | |
| 62 | + | LAST_UPDATE_LOGIN | NUMBER(15) | | | TO_NUMBER (FND_ PROFILE.VALUE (’LOGIN_ ID’)) | |
| 63 | + |
| 64 | +<br> |
| 65 | + |
| 66 | +##### Concurrent Program WHO Columns |
| 67 | + |
| 68 | + | Column Name | Type | Null? | Foreign Key to Table? | |
| 69 | + | :-- | :---- | :-: | :-- | |
| 70 | + | REQUEST_ID | NUMBER(15) | | FND_CONCURRENT_REQUESTS | |
| 71 | + | PROGRAM_APPLICATION_ID | NUMBER(15) | | FND_CONCURRENT_PROGRAMS | |
| 72 | + | PROGRAM_ID | NUMBER(15) | | FND_CONCURRENT_PROGRAMS | |
| 73 | + | PROGRAM_UPDATE_DATE | DATE | | ROGRAM_UPDATE_DATE | |
| 74 | + |
| 75 | +<br> |
| 76 | + |
| 77 | +## Examples |
| 78 | + |
| 79 | + | Better | Bad | |
| 80 | + | :--- | :--- | |
| 81 | + | - `XXD_PO_LC_DOCUMENTS` | - `XXD_PO_LC_DOCUMENT` <br> - `PO_LC_DOCUMENTS` | |
| 82 | + |
| 83 | +<br> |
| 84 | + |
| 85 | +##### References |
| 86 | +[^1]: This is a custom table for data upload and migrations **ONLY** and should drop these tables after the upload data process finish. |
0 commit comments