From dbscript Online Help
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
Dependencies