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

From dbscript Online Help
Jump to: navigation, search
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
Line 8: Line 8:
 
| '''Description
 
| '''Description
 
| Contains orders entered by a salesperson as well as over the Web.
 
| Contains orders entered by a salesperson as well as over the Web.
|-
 
 
|}
 
|}
 
  
 
=== Columns ===
 
=== Columns ===
Line 20: Line 18:
 
| '''Default
 
| '''Default
 
| '''Description
 
| '''Description
+
 
|-
+
|- valign="top"
 
| ORDER_ID
 
| ORDER_ID
 
| NUMBER(12, 0)
 
| NUMBER(12, 0)
Line 27: Line 25:
 
|  
 
|  
 
| PRIMARY KEY column.
 
| PRIMARY KEY column.
|-
+
|- valign="top"
 
| ORDER_DATE
 
| ORDER_DATE
 
| TIMESTAMP(6) WITH LOCAL TIME ZONE
 
| TIMESTAMP(6) WITH LOCAL TIME ZONE
Line 33: Line 31:
 
|  
 
|  
 
| TIMESTAMP WITH LOCAL TIME ZONE column, NOT NULL constraint.
 
| TIMESTAMP WITH LOCAL TIME ZONE column, NOT NULL constraint.
|-
+
|- valign="top"
 
| ORDER_MODE
 
| ORDER_MODE
 
| VARCHAR2(8)
 
| VARCHAR2(8)
Line 39: Line 37:
 
|  
 
|  
 
| CHECK constraint.
 
| CHECK constraint.
|-
+
|- valign="top"
 
| CUSTOMER_ID
 
| CUSTOMER_ID
 
| NUMBER(6, 0)
 
| NUMBER(6, 0)
Line 45: Line 43:
 
|  
 
|  
 
|  
 
|  
|-
+
|- valign="top"
 
| ORDER_STATUS
 
| ORDER_STATUS
 
| NUMBER(2, 0)
 
| NUMBER(2, 0)
Line 55: Line 53:
 
7: Shipped - special delivery, 8: Shipped - billed, 9: Shipped - payment plan,-
 
7: Shipped - special delivery, 8: Shipped - billed, 9: Shipped - payment plan,-
 
10: Shipped - paid
 
10: Shipped - paid
|-
+
|- valign="top"
 
| ORDER_TOTAL
 
| ORDER_TOTAL
 
| NUMBER(8, 2)
 
| NUMBER(8, 2)
Line 61: Line 59:
 
|  
 
|  
 
| CHECK constraint.
 
| CHECK constraint.
|-
+
|- valign="top"
 
| SALES_REP_ID
 
| SALES_REP_ID
 
| NUMBER(6, 0)
 
| NUMBER(6, 0)
Line 67: Line 65:
 
|  
 
|  
 
| References hr.employees.employee_id.
 
| References hr.employees.employee_id.
|-
+
|- valign="top"
 
| PROMOTION_ID
 
| PROMOTION_ID
 
| NUMBER(6, 0)
 
| NUMBER(6, 0)
Line 80: Line 78:
 
| '''Primary Key
 
| '''Primary Key
 
| '''Columns
 
| '''Columns
|-
+
|- valign="top"
 
| ORDER_PK
 
| ORDER_PK
 
| ORDER_ID
 
| ORDER_ID
Line 91: Line 89:
 
| '''Type
 
| '''Type
 
| '''Columns
 
| '''Columns
+
 
|-
+
|- valign="top"
 
| ORD_SALES_REP_IX
 
| ORD_SALES_REP_IX
 
|  
 
|  
 
| SALES_REP_ID
 
| SALES_REP_ID
|-
+
|- valign="top"
 
| ORD_CUSTOMER_IX
 
| ORD_CUSTOMER_IX
 
|  
 
|  
 
| CUSTOMER_ID
 
| CUSTOMER_ID
|-
+
|- valign="top"
 
| ORD_ORDER_DATE_IX
 
| ORD_ORDER_DATE_IX
 
|  
 
|  
Line 112: Line 110:
 
| '''Expression
 
| '''Expression
 
| '''Description
 
| '''Description
+
 
|-
+
|- valign="top"
 
| ORDER_CUSTOMER_ID_NN
 
| ORDER_CUSTOMER_ID_NN
 
| "CUSTOMER_ID" IS NOT NULL
 
| "CUSTOMER_ID" IS NOT NULL
 
|  
 
|  
|-
+
|- valign="top"
 
| ORDER_DATE_NN
 
| ORDER_DATE_NN
 
| "ORDER_DATE" IS NOT NULL
 
| "ORDER_DATE" IS NOT NULL
 
|  
 
|  
|-
+
|- valign="top"
 
| ORDER_MODE_LOV
 
| ORDER_MODE_LOV
 
| order_mode in ('direct','online')
 
| order_mode in ('direct','online')
 
|  
 
|  
|-
+
|- valign="top"
 
| ORDER_TOTAL_MIN
 
| ORDER_TOTAL_MIN
 
| order_total >= 0
 
| order_total >= 0
Line 137: Line 135:
 
| '''Column
 
| '''Column
 
| '''Referenced Column
 
| '''Referenced Column
+
 
|-
+
|- valign="top"
 
| [[OE.CUSTOMERS_(table)|OE.CUSTOMERS]]
 
| [[OE.CUSTOMERS_(table)|OE.CUSTOMERS]]
 
| CUSTOMER_ID
 
| CUSTOMER_ID
 
| CUSTOMER_ID
 
| CUSTOMER_ID
|-
+
|- valign="top"
 
| [[HR.EMPLOYEES_(table)|HR.EMPLOYEES]]
 
| [[HR.EMPLOYEES_(table)|HR.EMPLOYEES]]
 
| SALES_REP_ID
 
| SALES_REP_ID
Line 154: Line 152:
 
| '''Column
 
| '''Column
 
| '''Referencing Column
 
| '''Referencing Column
+
 
|-
+
|- valign="top"
 
| [[OE.ORDER_ITEMS_(table)|OE.ORDER_ITEMS]]
 
| [[OE.ORDER_ITEMS_(table)|OE.ORDER_ITEMS]]
 
| ORDER_ID
 
| ORDER_ID
Line 168: Line 166:
 
| '''Referencing Object
 
| '''Referencing Object
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| View
 
| View
 
| [[OE.OC_CORPORATE_CUSTOMERS_(view)|OE.OC_CORPORATE_CUSTOMERS]]
 
| [[OE.OC_CORPORATE_CUSTOMERS_(view)|OE.OC_CORPORATE_CUSTOMERS]]
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| View
 
| View
 
| [[OE.OC_CUSTOMERS_(view)|OE.OC_CUSTOMERS]]
 
| [[OE.OC_CUSTOMERS_(view)|OE.OC_CUSTOMERS]]
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| View
 
| View
 
| [[OE.OC_ORDERS_(view)|OE.OC_ORDERS]]
 
| [[OE.OC_ORDERS_(view)|OE.OC_ORDERS]]
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| View
 
| View
 
| [[OE.ORDERS_VIEW_(view)|OE.ORDERS_VIEW]]
 
| [[OE.ORDERS_VIEW_(view)|OE.ORDERS_VIEW]]
  
|-
+
|- valign="top"
 
| Insert
 
| Insert
 
| Trigger
 
| Trigger
| [[OE.ORDERS_TRG|OE.ORDERS_TRG]]
+
| [[OE.ORDERS_TRG_()|OE.ORDERS_TRG]]
  
 
|}
 
|}

Revision as of 06:15, 24 June 2010

wikibot

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

Columns

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

Primary Key Columns
ORDER_PK ORDER_ID

Indexes

Index Type Columns
ORD_SALES_REP_IX SALES_REP_ID
ORD_CUSTOMER_IX CUSTOMER_ID
ORD_ORDER_DATE_IX ORDER_DATE

Check Constraints

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

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

Detail Tables

Detail Table Column Referencing Column
OE.ORDER_ITEMS ORDER_ID ORDER_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 View OE.ORDERS_VIEW
Insert Trigger OE.ORDERS_TRG