Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

When create object make sure add -- |XXVersion $Header: tag.

Also add header info explaining what this package or procedure or function intension. 2) Any time process store data, make sure object is created in XXQST schema. For examples tables, materialized view , Index ( index should go into custom index space like XXQST_IDX schema ) etc. 3) Any time process NOT store data, make sure object is in APPS schema. Eg. Packages, views, functions , triggers etc. 4) To avoid oracle patch over write our custom development , make sure name should start with XXQST_ 1) create or replace package body APPS.xxqst_edi as

-- |XXVersion $Header: /local/cvsroot/CPEE2E/QIA_11_5_10/XXQST_TOP/ddl/xxqst_edi.pkb,v 1.87 2011/10/13 19:04:45 jthambu Exp $| /************************************************************************************************** -- +===================================================================+ -- | Qwest | -- | Chennai, India | -- | or (Denver, CO USA) | -- +===================================================================+ -- Name :XXQST_EDI.PKS -- Description :Package body for XXQST_EDI | -- Program: xxqst_edi -- Author: Amey Dhore, Phaneendra Vadrevu, Manjunath K -- Purpose: Handles the EDI 850, 855, 856, 810 operations -- Modifications: -- Date Author CR/TR/IR Remarks -- ========== ======= ====== =========================== -- 3/31/2007 Amey Created this package body. -- 15-MAY-2007 Phaneendra Vadrevu Created the Procedure load_edi850 to -load the Data from the PO base tables -to edi850_tmp table -- 15-MAY-2007 Manjunath K Created the Procedure load_edi855, load_edi856, load_edi810

--12-OCT-2011 grajama HD00005171938 modified load_856 procedure --13-OCT-2011 grajama DEFECT_19606 --25-Aug-2011 lxjakub AUC262812 Modify 855 don't load trans if Promised Ship Date and/or Promised QTY are null --12-Sep-2011 Madhu Trim Spaces on Serial before Inserting 856 Records --07-Oct-2011 Amey HD00005262410 EDI850 Error and EDI FTP error reports appear to have the same content. Why? If they are the same, we do not need two --25-Oct-2011 Amey Dec code merge into production 10/21 release. *****************************************************************************************************/

For oracle application database objects are very important. Some standards around those objects are

1) Table Table Name Examples: VENDOR_PRODUCT OFFER_REF

PARM_DEFINITION_HIST OBJECT_ADDRESS_MAP_XREF

Class Word AUX DEF DIM Auxiliary LOG tables

Definition/Usage

Definition tables tables defining static data to be referenced by other tables Dimension tables lookup tables that store descriptive attributes used in dimensional data warehousing Fact tables tables used in dimensional data warehousing History tables tables that hold historical data that is not frequently accessed Log tables tables that log process results or error messages Reference tables tables used for efficient data lookup Staging tables work tables that are frequently loaded and truncated Subset tables tables containing a subset of data from other tables Summary tables tables containing data summarized from several other tables for performance reasons Cross-reference tables tables representing many-to-many relationships

FACT HIST LOG REF STAGE SUB SUMM

XREF

1.1 Columns

Column Name Examples: vendor_product_typ provisioning_start_dt


customer_account_dsc

customer_payment_amt product_svc_validation_cd
treatment_seq

Class Word ADRS

Type Character

Definition/Usage (Address) Location information, most commonly used to identify a physical place often where mail can be delivered (either of a written/postal or electronic/e-mail nature). This can also be a computer storage location, nodes in a network, etc (Amount) Amount in currency (Area) A measured, bounded area or region. (Charge) (Code) Identifies classifications or groupings of objects (Coordinate) Any magnitude of a system of two or more magnitudes used to define the position of a point, line, curve, or plane. For example, latitude/longitude. (Count/counter) Count of a specified item (integer). (Data) Is used for unfielded data that does not take on a specific type - more generic and just passed through a field. An example might include a string of temperatures that must be parsed to be properly understood.

AMT AR CHG CD COORD

Number Number Number Character Number

CNT DA

Number Character

DT DSC DTTM ID IND INIT

Date Character Date Time (Open) Character Character

(Date) Day, month, year, and/or time (Description) Textual description (e.g. Explanation of a previously used short name or abbreviation) (Date and Time) Day, Month, Year, and time to milliseconds (Identifier) Data that identifies specific objects (Indicator) Yes, no, or null (Initial) Initial or INIT is used very specifically here to be the middle initial of a person's name. We have first name, middle name, middle initial, last name, etc. (Minutes) Minutes of Use (Name) Alphabetic data that identifies specific objects (Number) Numeric data that identifies specific objects (Percent) An actual percent stored as a fraction, for example: 50%. However, 50% of $200 = an Amount, 50% of 200 apples = Quantity. (Quantity) The number, quantity or measurement of anything except monetary amounts and duration (Rate) Rate of a specified item (Sequence) Sequence numbers that are usually automatically generated within a parent key (Subscript) An integer value indicating which member of an ordered group is being identified. For example, A(5) identifies the fifth element of the array A. In this case the array subscript is 5. (Time) Hour, minute, seconds (Timestamp) A specific moment in time defined at a lower level of granularity than simply date

MOU NM NO PCT

Number Character (Open) Number

QTY

Number

RT SEQ SUBSC

Number Number Number

TM TMSTMP

Time Time

Stamp

(hours, seconds, etc.) and utilized to specify time zone specific time. It is differentiated from TIME in its usage used when you need to know exactly when something occurred, for example a transaction posts to the data base, etc. (Text) Free flowing text other than descriptions (e.g. Comments) (Type) Type is used for code sets for the purpose of categorizing something, and is similar to CODE. An example here might be equipment type. (URL) Uniform Resource Locator (Value) (XML) Unstructured text

TXT TYP

Character Character

URL VAL XML

Character (Open) (Open)

1.2 Primary Key Constraints


Primary key constraint names can be up to 30 characters in Oracle and 128 characters in SQL Server. The naming standard for a primary key constraint is <table name>_PK Primary Key Constraint Examples: xxqst_xml_stage_PK

1.3 Unique Constraints


Unique constraint names can be up to 30 characters in Oracle and 128 characters in SQL Server. The naming standard for a unique key constraint is <table name>_UK<##> where <##> is a sequential number (e.g., 01, 02, etc.) for each unique key constraint in the same table. Unique Constraint Examples: mtl_system_items_b_UK01 , PARM_DEFINITION_HIST_UK02

1.4 Foreign Key Constraints


Foreign key constraint names can be up to 30 characters in Oracle. <table name>_FK<##> where <##> is a sequential number (e.g., 01, 02, etc.) for each foreign key constraint on columns in the same table. Foreign Key Constraint Examples: VENDOR_PRODUCT_FK01 PARM_DEFINITION_HIST_FK02

1.5 Check Constraints


The naming standard for check constraints is <table name>_CK<##> where <##> is a sequential number (e.g., 01, 02, etc.) for each check constraint on columns in the same table. Check Constraint Examples: VENDOR_PRODUCT_CK01 , PARM_DEFINITION_HIST_CK02

1.6 Views
View names can be up to 30 characters long (128 for DB2 V8) and should reflect the nature of the tables or selection criteria. The naming standard for a view is XXQST_<table name or descriptive phrase>_V View Examples: XXQST_SO_DTL_V

1.7 Materialized Views


Materialized Views (Snapshots) will use the same name as the base table name or with _MV suffix. If it is a complex materialized view, follow the convention for naming views - descriptive phrase based on the nature of the data including the frequency of update.

<table name or descriptive phrase>_MV

Materialized View Examples: XXQST_RELATED_ITEM_MV

1.8 Sequences
Sequence names can be up to 30 characters long and should reflect the nature of the table or column it populates. In some cases, a sequence will be used to populate several columns in a database. In this case, the name selected should logically represent the value being sequenced. The naming convention for sequences is: <descriptive phrase>_seq Sequence Examples: VENDOR_PRODUCT_SEQ

1.9 Nonunique Indexes


The naming standard for nonunique indexes is <table name>_IX<##> where <##> is a sequential number (e.g., 01, 02, etc.) for each index on the same table.

Nonunique Index Examples: XXQST_ORDER_ATTR_IX01 , XXQST_HZ_CUST_SITE_USES_IX01 , XXQST_EM_OES_CPE_INTER_IX03

1.10 Triggers
The naming convention for triggers is:

<table name or system event >_<event timing><event><event domain>_T

where, <event timing> is either b (before) or a (after). <event> is one or more of the following: i (insert), d (delete), u (update).

The order in which they will be listed if more than one is used is as follows: id, iu, ud, or iud. <event domain> is either t (once per triggering event) or r (once per event for each row).

Trigger Examples: XXQST_CUST_ACCT_BIUDR_T XXQST_VENDOR_PRODUCT_AIUT_T

1.11 Synonyms
Synonyms can be applied to Tables, Views, Snapshots, Sequences, Functions, Packages, and Procedures. The standard names for synonyms are identical to the names of the database objects which they reference.

How to write a code

http://docs.online.bg/DB/Oracle_8_Automation/appendix-d.html

C:\Documents and Settings\DhoreA\Application Data\Quest Software\Toad for Oracle\10.6\User Files\FmtPlus.opt

You might also like