From dbscript Online Help
wikibot
Table
|
SH.SALES
|
Description
|
facts table, without a primary key; all rows are uniquely identified by the combination of all foreign keys
|
Columns
Column
|
Data Type
|
Nullable
|
Default
|
Description
|
PROD_ID
|
NUMBER
|
not null
|
|
FK to the products dimension table
|
CUST_ID
|
NUMBER
|
not null
|
|
FK to the customers dimension table
|
TIME_ID
|
DATE(7)
|
not null
|
|
FK to the times dimension table
|
CHANNEL_ID
|
NUMBER
|
not null
|
|
FK to the channels dimension table
|
PROMO_ID
|
NUMBER
|
not null
|
|
promotion identifier, without FK constraint (intentionally) to show outer join optimization
|
QUANTITY_SOLD
|
NUMBER(10, 2)
|
not null
|
|
product quantity sold with the transaction
|
AMOUNT_SOLD
|
NUMBER(10, 2)
|
not null
|
|
invoiced amount to the customer
|
Indexes
Index
|
Type
|
Columns
|
SALES_CUST_BIX
|
|
CUST_ID
|
SALES_CHANNEL_BIX
|
|
CHANNEL_ID
|
SALES_TIME_BIX
|
|
TIME_ID
|
SALES_PROD_BIX
|
|
PROD_ID
|
SALES_PROMO_BIX
|
|
PROMO_ID
|
Check Constraints
Check Constraint
|
Expression
|
Description
|
SYS_C005075
|
"PROD_ID" IS NOT NULL
|
|
SYS_C005076
|
"CUST_ID" IS NOT NULL
|
|
SYS_C005077
|
"TIME_ID" IS NOT NULL
|
|
SYS_C005078
|
"CHANNEL_ID" IS NOT NULL
|
|
SYS_C005079
|
"PROMO_ID" IS NOT NULL
|
|
SYS_C005080
|
"QUANTITY_SOLD" IS NOT NULL
|
|
SYS_C005081
|
"AMOUNT_SOLD" IS NOT NULL
|
|
Foreign Keys