Difference between revisions of "OE.ORDER ITEMS (table)"
Line 5: | Line 5: | ||
| '''Table | | '''Table | ||
| OE.ORDER_ITEMS | | OE.ORDER_ITEMS | ||
+ | |- valign="top" | ||
+ | | '''Description | ||
+ | | Example of many-to-many resolution. | ||
|- | |- | ||
|} | |} | ||
+ | === Columns === | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 15: | Line 19: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | ''' | + | | '''Description |
− | |||
|- | |- | ||
Line 23: | Line 26: | ||
| not null | | not null | ||
| | | | ||
− | | | + | | Part of concatenated primary key, references orders.order_id. |
− | |||
|- | |- | ||
| LINE_ITEM_ID | | LINE_ITEM_ID | ||
Line 30: | Line 32: | ||
| not null | | not null | ||
| | | | ||
− | | | + | | Part of concatenated primary key. |
− | |||
|- | |- | ||
| PRODUCT_ID | | PRODUCT_ID | ||
Line 37: | Line 38: | ||
| not null | | not null | ||
| | | | ||
− | | | + | | References product_information.product_id. |
− | |||
|- | |- | ||
| UNIT_PRICE | | UNIT_PRICE | ||
| NUMBER(8, 2) | | NUMBER(8, 2) | ||
| null | | null | ||
− | |||
| | | | ||
| | | | ||
Line 52: | Line 51: | ||
| | | | ||
| | | | ||
+ | |} | ||
+ | |||
+ | === Primary Key === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Primary Key | ||
+ | | '''Columns | ||
+ | |- | ||
+ | | ORDER_ITEMS_PK | ||
+ | | ORDER_ID, LINE_ITEM_ID | ||
+ | |} | ||
+ | |||
+ | === Indexes === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Index | ||
+ | | '''Type | ||
+ | | '''Columns | ||
+ | |||
+ | |- | ||
+ | | ITEM_ORDER_IX | ||
+ | | | ||
+ | | ORDER_ID | ||
+ | |- | ||
+ | | ITEM_PRODUCT_IX | ||
| | | | ||
+ | | PRODUCT_ID | ||
+ | |- | ||
+ | | ORDER_ITEMS_UK | ||
+ | | | ||
+ | | ORDER_ID, PRODUCT_ID | ||
|} | |} | ||
+ | === Check Constraints === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Check Constraint | ||
+ | | '''Expression | ||
+ | | '''Description | ||
+ | |||
+ | |- | ||
+ | | SYS_C005039 | ||
+ | | "LINE_ITEM_ID" IS NOT NULL | ||
+ | | | ||
+ | |- | ||
+ | | SYS_C005040 | ||
+ | | "PRODUCT_ID" IS NOT NULL | ||
+ | | | ||
+ | |} | ||
− | + | === Foreign Keys === | |
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
|- style="background:silver" | |- style="background:silver" | ||
Line 71: | Line 116: | ||
| PRODUCT_ID | | PRODUCT_ID | ||
| PRODUCT_ID | | PRODUCT_ID | ||
+ | |} | ||
+ | |||
+ | === Dependencies === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Reference Type | ||
+ | | '''Object Type | ||
+ | | '''Referencing Object | ||
+ | |||
+ | |- | ||
+ | | Select | ||
+ | | View | ||
+ | | [[OE.OC_CORPORATE_CUSTOMERS_(view)|OE.OC_CORPORATE_CUSTOMERS]] | ||
+ | |||
+ | |- | ||
+ | | Select | ||
+ | | View | ||
+ | | [[OE.OC_CUSTOMERS_(view)|OE.OC_CUSTOMERS]] | ||
+ | |||
+ | |- | ||
+ | | Select | ||
+ | | View | ||
+ | | [[OE.OC_ORDERS_(view)|OE.OC_ORDERS]] | ||
+ | |||
+ | |- | ||
+ | | Select | ||
+ | | Trigger | ||
+ | | [[OE.INSERT_ORD_LINE|OE.INSERT_ORD_LINE]] | ||
+ | |||
|} | |} |
Revision as of 08:28, 11 February 2010
Contents
wikibot
Table | OE.ORDER_ITEMS |
Description | Example of many-to-many resolution. |
Columns
Column | Data Type | Nullable | Default | Description |
ORDER_ID | NUMBER(12, 0) | not null | Part of concatenated primary key, references orders.order_id. | |
LINE_ITEM_ID | NUMBER(3, 0) | not null | Part of concatenated primary key. | |
PRODUCT_ID | NUMBER(6, 0) | not null | References product_information.product_id. | |
UNIT_PRICE | NUMBER(8, 2) | null | ||
QUANTITY | NUMBER(8, 0) | null |
Primary Key
Primary Key | Columns |
ORDER_ITEMS_PK | ORDER_ID, LINE_ITEM_ID |
Indexes
Index | Type | Columns |
ITEM_ORDER_IX | ORDER_ID | |
ITEM_PRODUCT_IX | PRODUCT_ID | |
ORDER_ITEMS_UK | ORDER_ID, PRODUCT_ID |
Check Constraints
Check Constraint | Expression | Description |
SYS_C005039 | "LINE_ITEM_ID" IS NOT NULL | |
SYS_C005040 | "PRODUCT_ID" IS NOT NULL |
Foreign Keys
Relation | Column | Referenced Column |
OE.ORDERS | ORDER_ID | ORDER_ID |
OE.PRODUCT_INFORMATION | PRODUCT_ID | PRODUCT_ID |
Dependencies
Reference Type | Object Type | Referencing Object |
Select | View | OE.OC_CORPORATE_CUSTOMERS |
Select | View | OE.OC_CUSTOMERS |
Select | View | OE.OC_ORDERS |
Select | Trigger | OE.INSERT_ORD_LINE |