Difference between revisions of "OE.ORDERS (table)"

From dbscript Online Help
Jump to: navigation, search
(Replacing page with '== wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- | '''table | OE.ORDERS |- |}')
 
(3 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.ORDERS
 
| OE.ORDERS
|-
+
|- valign="top"
 +
| '''Description
 +
| Contains orders entered by a salesperson as well as over the Web.
 +
|}
 +
 
 +
=== Columns ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Column
 +
| '''Data Type
 +
| '''Nullable
 +
| '''Default
 +
| '''Description
 +
 
 +
|- valign="top"
 +
| ORDER_ID
 +
| NUMBER(12, 0)
 +
| not null
 +
|
 +
| PRIMARY KEY column.
 +
|- valign="top"
 +
| ORDER_DATE
 +
| TIMESTAMP(6) WITH LOCAL TIME ZONE
 +
| not null
 +
|
 +
| TIMESTAMP WITH LOCAL TIME ZONE column, NOT NULL constraint.
 +
|- valign="top"
 +
| ORDER_MODE
 +
| VARCHAR2(8)
 +
| null
 +
|
 +
| CHECK constraint.
 +
|- valign="top"
 +
| CUSTOMER_ID
 +
| NUMBER(6, 0)
 +
| not null
 +
|
 +
|
 +
|- valign="top"
 +
| ORDER_STATUS
 +
| NUMBER(2, 0)
 +
| null
 +
|
 +
| 0: Not fully entered, 1: Entered, 2: Canceled - bad credit, -
 +
3: Canceled - by customer, 4: Shipped - whole order, -
 +
5: Shipped - replacement items, 6: Shipped - backlog on items, -
 +
7: Shipped - special delivery, 8: Shipped - billed, 9: Shipped - payment plan,-
 +
10: Shipped - paid
 +
|- valign="top"
 +
| ORDER_TOTAL
 +
| NUMBER(8, 2)
 +
| null
 +
|
 +
| CHECK constraint.
 +
|- valign="top"
 +
| SALES_REP_ID
 +
| NUMBER(6, 0)
 +
| null
 +
|
 +
| References hr.employees.employee_id.
 +
|- valign="top"
 +
| PROMOTION_ID
 +
| NUMBER(6, 0)
 +
| null
 +
|
 +
| Sales promotion ID. Used in SH schema
 +
|}
 +
 
 +
=== Primary Key ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Primary Key
 +
| '''Columns
 +
|- valign="top"
 +
| ORDER_PK
 +
| ORDER_ID
 +
|}
 +
 
 +
=== Indexes ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Index
 +
| '''Type
 +
| '''Columns
 +
 
 +
|- valign="top"
 +
| ORD_CUSTOMER_IX
 +
|
 +
| CUSTOMER_ID
 +
|- valign="top"
 +
| ORD_ORDER_DATE_IX
 +
|
 +
| ORDER_DATE
 +
|- valign="top"
 +
| ORD_SALES_REP_IX
 +
|
 +
| SALES_REP_ID
 +
|}
 +
 
 +
=== Check Constraints ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Check Constraint
 +
| '''Expression
 +
| '''Description
 +
 
 +
|- valign="top"
 +
| ORDER_CUSTOMER_ID_NN
 +
| "CUSTOMER_ID" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| ORDER_DATE_NN
 +
| "ORDER_DATE" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| ORDER_MODE_LOV
 +
| order_mode in ('direct','online')
 +
|
 +
|- valign="top"
 +
| ORDER_TOTAL_MIN
 +
| order_total >= 0
 +
|
 +
|}
 +
 
 +
=== Foreign Keys ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Relation
 +
| '''Column
 +
| '''Referenced Column
 +
 
 +
|- valign="top"
 +
| [[OE.CUSTOMERS_(table)|OE.CUSTOMERS]]
 +
| CUSTOMER_ID
 +
| CUSTOMER_ID
 +
|- valign="top"
 +
| [[HR.EMPLOYEES_(table)|HR.EMPLOYEES]]
 +
| SALES_REP_ID
 +
| EMPLOYEE_ID
 +
|}
 +
 
 +
=== Detail Tables ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Detail Table
 +
| '''Column
 +
| '''Referencing Column
 +
 
 +
|- valign="top"
 +
| [[OE.ORDER_ITEMS_(table)|OE.ORDER_ITEMS]]
 +
| ORDER_ID
 +
| ORDER_ID
 
|}
 
|}

Latest revision as of 11:35, 27 August 2011

wikibot[edit]

Table OE.ORDERS
Description Contains orders entered by a salesperson as well as over the Web.

Columns[edit]

Column Data Type Nullable Default Description
ORDER_ID NUMBER(12, 0) not null PRIMARY KEY column.
ORDER_DATE TIMESTAMP(6) WITH LOCAL TIME ZONE not null TIMESTAMP WITH LOCAL TIME ZONE column, NOT NULL constraint.
ORDER_MODE VARCHAR2(8) null CHECK constraint.
CUSTOMER_ID NUMBER(6, 0) not null
ORDER_STATUS NUMBER(2, 0) null 0: Not fully entered, 1: Entered, 2: Canceled - bad credit, -

3: Canceled - by customer, 4: Shipped - whole order, - 5: Shipped - replacement items, 6: Shipped - backlog on items, - 7: Shipped - special delivery, 8: Shipped - billed, 9: Shipped - payment plan,- 10: Shipped - paid

ORDER_TOTAL NUMBER(8, 2) null CHECK constraint.
SALES_REP_ID NUMBER(6, 0) null References hr.employees.employee_id.
PROMOTION_ID NUMBER(6, 0) null Sales promotion ID. Used in SH schema

Primary Key[edit]

Primary Key Columns
ORDER_PK ORDER_ID

Indexes[edit]

Index Type Columns
ORD_CUSTOMER_IX CUSTOMER_ID
ORD_ORDER_DATE_IX ORDER_DATE
ORD_SALES_REP_IX SALES_REP_ID

Check Constraints[edit]

Check Constraint Expression Description
ORDER_CUSTOMER_ID_NN "CUSTOMER_ID" IS NOT NULL
ORDER_DATE_NN "ORDER_DATE" IS NOT NULL
ORDER_MODE_LOV order_mode in ('direct','online')
ORDER_TOTAL_MIN order_total >= 0

Foreign Keys[edit]

Relation Column Referenced Column
OE.CUSTOMERS CUSTOMER_ID CUSTOMER_ID
HR.EMPLOYEES SALES_REP_ID EMPLOYEE_ID

Detail Tables[edit]

Detail Table Column Referencing Column
OE.ORDER_ITEMS ORDER_ID ORDER_ID