Welcome Guest, you are in: Login

devio dbscript ScrewTurn Wiki

RSS RSS

Navigation





Search the wiki
»

PoweredBy

wikibot

TableSH.SALES
Descriptionfacts table, without a primary key; all rows are uniquely identified by the combination of all foreign keys

Columns

ColumnData TypeNullableDefaultDescription
PROD_IDNUMBERnot null FK to the products dimension table
CUST_IDNUMBERnot null FK to the customers dimension table
TIME_IDDATE(7)not null FK to the times dimension table
CHANNEL_IDNUMBERnot null FK to the channels dimension table
PROMO_IDNUMBERnot null promotion identifier, without FK constraint (intentionally) to show outer join optimization
QUANTITY_SOLDNUMBER(10, 2)not null product quantity sold with the transaction
AMOUNT_SOLDNUMBER(10, 2)not null invoiced amount to the customer

Indexes

IndexTypeColumns
SALES_CHANNEL_BIX CHANNEL_ID
SALES_CUST_BIX CUST_ID
SALES_PROD_BIX PROD_ID
SALES_PROMO_BIX PROMO_ID
SALES_TIME_BIX TIME_ID

Check Constraints

Check ConstraintExpressionDescription
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

RelationColumnReferenced Column
SH.CHANNELSCHANNEL_IDCHANNEL_ID
SH.CUSTOMERSCUST_IDCUST_ID
SH.PRODUCTSPROD_IDPROD_ID
SH.PROMOTIONSPROMO_IDPROMO_ID
SH.TIMESTIME_IDTIME_ID

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam.