Difference between revisions of "SH.PROMOTIONS (table)"

From dbscript Online Help
Jump to: navigation, search
Line 5: Line 5:
 
| '''Table
 
| '''Table
 
| SH.PROMOTIONS
 
| SH.PROMOTIONS
 +
|- valign="top"
 +
| '''Description
 +
| dimension table without a PK-FK relationship with the facts table, to show outer join functionality
 
|-
 
|-
 
|}
 
|}
  
  
 +
=== Columns ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 15: Line 19:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''PK
+
| '''Description
| '''Index
 
 
 
 
|-
 
|-
Line 23: Line 26:
 
| not null
 
| not null
 
|  
 
|  
| PROMO_PK
+
| primary key column
|
 
 
|-
 
|-
 
| PROMO_NAME
 
| PROMO_NAME
Line 30: Line 32:
 
| not null
 
| not null
 
|  
 
|  
|  
+
| promotion description
|
 
 
|-
 
|-
 
| PROMO_SUBCATEGORY
 
| PROMO_SUBCATEGORY
Line 37: Line 38:
 
| not null
 
| not null
 
|  
 
|  
|  
+
| enables to investigate promotion hierarchies
|
 
 
|-
 
|-
 
| PROMO_SUBCATEGORY_ID
 
| PROMO_SUBCATEGORY_ID
 
| NUMBER
 
| NUMBER
 
| not null
 
| not null
|
 
 
|  
 
|  
 
|  
 
|  
Line 51: Line 50:
 
| not null
 
| not null
 
|  
 
|  
|  
+
| promotion category
|
 
 
|-
 
|-
 
| PROMO_CATEGORY_ID
 
| PROMO_CATEGORY_ID
 
| NUMBER
 
| NUMBER
 
| not null
 
| not null
|
 
 
|  
 
|  
 
|  
 
|  
Line 65: Line 62:
 
| not null
 
| not null
 
|  
 
|  
|  
+
| promotion cost, to do promotion effect calculations
|
 
 
|-
 
|-
 
| PROMO_BEGIN_DATE
 
| PROMO_BEGIN_DATE
Line 72: Line 68:
 
| not null
 
| not null
 
|  
 
|  
|  
+
| promotion begin day
|
 
 
|-
 
|-
 
| PROMO_END_DATE
 
| PROMO_END_DATE
Line 79: Line 74:
 
| not null
 
| not null
 
|  
 
|  
|  
+
| promotion end day
|
 
 
|-
 
|-
 
| PROMO_TOTAL
 
| PROMO_TOTAL
 
| VARCHAR2(15)
 
| VARCHAR2(15)
 
| not null
 
| not null
|
 
 
|  
 
|  
 
|  
 
|  
Line 92: Line 85:
 
| NUMBER
 
| NUMBER
 
| not null
 
| not null
|
 
 
|  
 
|  
 
|  
 
|  
 
|}
 
|}
  
 +
=== Primary Key ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Primary Key
 +
| '''Columns
 +
|-
 +
| PROMO_PK
 +
| PROMO_ID
 +
|}
  
 +
=== Check Constraints ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Check Constraint
 +
| '''Expression
 +
| '''Description
 +
 +
|-
 +
| SYS_C005152
 +
| "PROMO_ID" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005153
 +
| "PROMO_NAME" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005154
 +
| "PROMO_SUBCATEGORY" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005155
 +
| "PROMO_SUBCATEGORY_ID" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005156
 +
| "PROMO_CATEGORY" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005157
 +
| "PROMO_CATEGORY_ID" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005158
 +
| "PROMO_COST" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005159
 +
| "PROMO_BEGIN_DATE" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005160
 +
| "PROMO_END_DATE" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005161
 +
| "PROMO_TOTAL" IS NOT NULL
 +
|
 +
|-
 +
| SYS_C005162
 +
| "PROMO_TOTAL_ID" IS NOT NULL
 +
|
 +
|}
  
 +
=== Detail Tables ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"

Revision as of 08:29, 11 February 2010

wikibot

Table SH.PROMOTIONS
Description dimension table without a PK-FK relationship with the facts table, to show outer join functionality


Columns

Column Data Type Nullable Default Description
PROMO_ID NUMBER(6, 0) not null primary key column
PROMO_NAME VARCHAR2(30) not null promotion description
PROMO_SUBCATEGORY VARCHAR2(30) not null enables to investigate promotion hierarchies
PROMO_SUBCATEGORY_ID NUMBER not null
PROMO_CATEGORY VARCHAR2(30) not null promotion category
PROMO_CATEGORY_ID NUMBER not null
PROMO_COST NUMBER(10, 2) not null promotion cost, to do promotion effect calculations
PROMO_BEGIN_DATE DATE(7) not null promotion begin day
PROMO_END_DATE DATE(7) not null promotion end day
PROMO_TOTAL VARCHAR2(15) not null
PROMO_TOTAL_ID NUMBER not null

Primary Key

Primary Key Columns
PROMO_PK PROMO_ID

Check Constraints

Check Constraint Expression Description
SYS_C005152 "PROMO_ID" IS NOT NULL
SYS_C005153 "PROMO_NAME" IS NOT NULL
SYS_C005154 "PROMO_SUBCATEGORY" IS NOT NULL
SYS_C005155 "PROMO_SUBCATEGORY_ID" IS NOT NULL
SYS_C005156 "PROMO_CATEGORY" IS NOT NULL
SYS_C005157 "PROMO_CATEGORY_ID" IS NOT NULL
SYS_C005158 "PROMO_COST" IS NOT NULL
SYS_C005159 "PROMO_BEGIN_DATE" IS NOT NULL
SYS_C005160 "PROMO_END_DATE" IS NOT NULL
SYS_C005161 "PROMO_TOTAL" IS NOT NULL
SYS_C005162 "PROMO_TOTAL_ID" IS NOT NULL

Detail Tables

Detail Table Column Referencing Column
SH.COSTS PROMO_ID PROMO_ID
SH.SALES PROMO_ID PROMO_ID