Difference between revisions of "OE.ORDER ITEMS (table)"

From dbscript Online Help
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|-
+
|- valign="top"
 
| '''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 17:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''PK
+
| '''Description
| '''Index
+
 
+
|- valign="top"
|-
 
 
| ORDER_ID
 
| ORDER_ID
 
| NUMBER(12, 0)
 
| NUMBER(12, 0)
 
| not null
 
| not null
 
|  
 
|  
| ORDER_ITEMS_PK
+
| Part of concatenated primary key, references orders.order_id.
| ITEM_ORDER_IXORDER_ITEMS_UK
+
|- valign="top"
|-
 
 
| LINE_ITEM_ID
 
| LINE_ITEM_ID
 
| NUMBER(3, 0)
 
| NUMBER(3, 0)
 
| not null
 
| not null
 
|  
 
|  
| ORDER_ITEMS_PK
+
| Part of concatenated primary key.
|
+
|- valign="top"
|-
 
 
| PRODUCT_ID
 
| PRODUCT_ID
 
| NUMBER(6, 0)
 
| NUMBER(6, 0)
 
| not null
 
| not null
 
|  
 
|  
|  
+
| References product_information.product_id.
| ITEM_PRODUCT_IXORDER_ITEMS_UK
+
|- valign="top"
|-
 
 
| UNIT_PRICE
 
| UNIT_PRICE
 
| NUMBER(8, 2)
 
| NUMBER(8, 2)
Line 45: Line 43:
 
|  
 
|  
 
|  
 
|  
|
+
|- valign="top"
|-
 
 
| QUANTITY
 
| QUANTITY
 
| NUMBER(8, 0)
 
| NUMBER(8, 0)
Line 52: Line 49:
 
|  
 
|  
 
|  
 
|  
 +
|}
 +
 +
=== Primary Key ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Primary Key
 +
| '''Columns
 +
|- valign="top"
 +
| 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
 +
 +
|- valign="top"
 +
| ITEM_ORDER_IX
 +
|
 +
| ORDER_ID
 +
|- valign="top"
 +
| ITEM_PRODUCT_IX
 +
|
 +
| PRODUCT_ID
 +
|- valign="top"
 +
| 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
  
 +
|- valign="top"
 +
| SYS_C005039
 +
| "LINE_ITEM_ID" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| 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 62: Line 105:
 
| '''Column
 
| '''Column
 
| '''Referenced Column
 
| '''Referenced Column
+
 
|-
+
|- valign="top"
 
| [[OE.ORDERS_(table)|OE.ORDERS]]
 
| [[OE.ORDERS_(table)|OE.ORDERS]]
 
| ORDER_ID
 
| ORDER_ID
 
| ORDER_ID
 
| ORDER_ID
|-
+
|- valign="top"
 
| [[OE.PRODUCT_INFORMATION_(table)|OE.PRODUCT_INFORMATION]]
 
| [[OE.PRODUCT_INFORMATION_(table)|OE.PRODUCT_INFORMATION]]
 
| PRODUCT_ID
 
| PRODUCT_ID
 
| PRODUCT_ID
 
| PRODUCT_ID
 
|}
 
|}

Latest revision as of 10:35, 27 August 2011

wikibot[edit]

Table OE.ORDER_ITEMS
Description Example of many-to-many resolution.

Columns[edit]

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[edit]

Primary Key Columns
ORDER_ITEMS_PK ORDER_ID, LINE_ITEM_ID

Indexes[edit]

Index Type Columns
ITEM_ORDER_IX ORDER_ID
ITEM_PRODUCT_IX PRODUCT_ID
ORDER_ITEMS_UK ORDER_ID, PRODUCT_ID

Check Constraints[edit]

Check Constraint Expression Description
SYS_C005039 "LINE_ITEM_ID" IS NOT NULL
SYS_C005040 "PRODUCT_ID" IS NOT NULL

Foreign Keys[edit]

Relation Column Referenced Column
OE.ORDERS ORDER_ID ORDER_ID
OE.PRODUCT_INFORMATION PRODUCT_ID PRODUCT_ID