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

From dbscript Online Help
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
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
 
| SH.COUNTRIES
 
| SH.COUNTRIES
|-
+
|- valign="top"
 +
| '''Description
 +
| country dimension table (snowflake)
 
|}
 
|}
  
 
+
=== 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 17:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''PK
+
| '''Description
| '''Index
+
 
+
|- valign="top"
|-
 
 
| COUNTRY_ID
 
| COUNTRY_ID
 
| NUMBER
 
| NUMBER
 
| not null
 
| not null
 
|  
 
|  
| COUNTRIES_PK
+
| primary key
|
+
|- valign="top"
|-
 
 
| COUNTRY_ISO_CODE
 
| COUNTRY_ISO_CODE
 
| CHAR(2)
 
| CHAR(2)
Line 31: Line 31:
 
|  
 
|  
 
|  
 
|  
|
+
|- valign="top"
|-
 
 
| COUNTRY_NAME
 
| COUNTRY_NAME
 
| VARCHAR2(40)
 
| VARCHAR2(40)
 
| not null
 
| not null
 
|  
 
|  
|  
+
| country name
|
+
|- valign="top"
|-
 
 
| COUNTRY_SUBREGION
 
| COUNTRY_SUBREGION
 
| VARCHAR2(30)
 
| VARCHAR2(30)
 
| not null
 
| not null
 
|  
 
|  
|  
+
| e.g. Western Europe, to allow hierarchies
|
+
|- valign="top"
|-
 
 
| COUNTRY_SUBREGION_ID
 
| COUNTRY_SUBREGION_ID
 
| NUMBER
 
| NUMBER
Line 52: Line 49:
 
|  
 
|  
 
|  
 
|  
|
+
|- valign="top"
|-
 
 
| COUNTRY_REGION
 
| COUNTRY_REGION
 
| VARCHAR2(20)
 
| VARCHAR2(20)
 
| not null
 
| not null
 
|  
 
|  
|  
+
| e.g. Europe, Asia
|
+
|- valign="top"
|-
 
 
| COUNTRY_REGION_ID
 
| COUNTRY_REGION_ID
 
| NUMBER
 
| NUMBER
Line 66: Line 61:
 
|  
 
|  
 
|  
 
|  
|
+
|- valign="top"
|-
 
 
| COUNTRY_TOTAL
 
| COUNTRY_TOTAL
 
| VARCHAR2(11)
 
| VARCHAR2(11)
Line 73: Line 67:
 
|  
 
|  
 
|  
 
|  
|
+
|- valign="top"
|-
 
 
| COUNTRY_TOTAL_ID
 
| COUNTRY_TOTAL_ID
 
| NUMBER
 
| NUMBER
Line 80: Line 73:
 
|  
 
|  
 
|  
 
|  
|
+
|- valign="top"
|-
 
 
| COUNTRY_NAME_HIST
 
| COUNTRY_NAME_HIST
 
| VARCHAR2(40)
 
| VARCHAR2(40)
Line 87: Line 79:
 
|  
 
|  
 
|  
 
|  
|
 
 
|}
 
|}
  
 +
=== Primary Key ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Primary Key
 +
| '''Columns
 +
|- valign="top"
 +
| COUNTRIES_PK
 +
| COUNTRY_ID
 +
|}
 +
 +
=== Check Constraints ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Check Constraint
 +
| '''Expression
 +
| '''Description
  
 +
|- valign="top"
 +
| SYS_C005180
 +
| "COUNTRY_ID" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005181
 +
| "COUNTRY_ISO_CODE" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005182
 +
| "COUNTRY_NAME" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005183
 +
| "COUNTRY_SUBREGION" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005184
 +
| "COUNTRY_SUBREGION_ID" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005185
 +
| "COUNTRY_REGION" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005186
 +
| "COUNTRY_REGION_ID" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005187
 +
| "COUNTRY_TOTAL" IS NOT NULL
 +
|
 +
|- valign="top"
 +
| SYS_C005188
 +
| "COUNTRY_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"
Line 97: Line 142:
 
| '''Column
 
| '''Column
 
| '''Referencing Column
 
| '''Referencing Column
+
 
|-
+
|- valign="top"
 
| [[SH.CUSTOMERS_(table)|SH.CUSTOMERS]]
 
| [[SH.CUSTOMERS_(table)|SH.CUSTOMERS]]
 
| COUNTRY_ID
 
| COUNTRY_ID
 
| COUNTRY_ID
 
| COUNTRY_ID
 
|}
 
|}

Latest revision as of 06:16, 24 June 2010

wikibot[edit]

Table SH.COUNTRIES
Description country dimension table (snowflake)

Columns[edit]

Column Data Type Nullable Default Description
COUNTRY_ID NUMBER not null primary key
COUNTRY_ISO_CODE CHAR(2) not null
COUNTRY_NAME VARCHAR2(40) not null country name
COUNTRY_SUBREGION VARCHAR2(30) not null e.g. Western Europe, to allow hierarchies
COUNTRY_SUBREGION_ID NUMBER not null
COUNTRY_REGION VARCHAR2(20) not null e.g. Europe, Asia
COUNTRY_REGION_ID NUMBER not null
COUNTRY_TOTAL VARCHAR2(11) not null
COUNTRY_TOTAL_ID NUMBER not null
COUNTRY_NAME_HIST VARCHAR2(40) null

Primary Key[edit]

Primary Key Columns
COUNTRIES_PK COUNTRY_ID

Check Constraints[edit]

Check Constraint Expression Description
SYS_C005180 "COUNTRY_ID" IS NOT NULL
SYS_C005181 "COUNTRY_ISO_CODE" IS NOT NULL
SYS_C005182 "COUNTRY_NAME" IS NOT NULL
SYS_C005183 "COUNTRY_SUBREGION" IS NOT NULL
SYS_C005184 "COUNTRY_SUBREGION_ID" IS NOT NULL
SYS_C005185 "COUNTRY_REGION" IS NOT NULL
SYS_C005186 "COUNTRY_REGION_ID" IS NOT NULL
SYS_C005187 "COUNTRY_TOTAL" IS NOT NULL
SYS_C005188 "COUNTRY_TOTAL_ID" IS NOT NULL

Detail Tables[edit]

Detail Table Column Referencing Column
SH.CUSTOMERS COUNTRY_ID COUNTRY_ID