Difference between revisions of "SH.COUNTRIES (table)"
Line 5: | Line 5: | ||
| '''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 19: | ||
| '''Nullable | | '''Nullable | ||
| '''Default | | '''Default | ||
− | | ''' | + | | '''Description |
− | |||
|- | |- | ||
Line 23: | Line 26: | ||
| not null | | not null | ||
| | | | ||
− | | | + | | primary key |
− | |||
|- | |- | ||
| COUNTRY_ISO_CODE | | COUNTRY_ISO_CODE | ||
| CHAR(2) | | CHAR(2) | ||
| not null | | not null | ||
− | |||
| | | | ||
| | | | ||
Line 37: | Line 38: | ||
| not null | | not null | ||
| | | | ||
− | | | + | | country name |
− | |||
|- | |- | ||
| COUNTRY_SUBREGION | | COUNTRY_SUBREGION | ||
Line 44: | Line 44: | ||
| not null | | not null | ||
| | | | ||
− | | | + | | e.g. Western Europe, to allow hierarchies |
− | |||
|- | |- | ||
| COUNTRY_SUBREGION_ID | | COUNTRY_SUBREGION_ID | ||
| NUMBER | | NUMBER | ||
| not null | | not null | ||
− | |||
| | | | ||
| | | | ||
Line 58: | Line 56: | ||
| not null | | not null | ||
| | | | ||
− | | | + | | e.g. Europe, Asia |
− | |||
|- | |- | ||
| COUNTRY_REGION_ID | | COUNTRY_REGION_ID | ||
| NUMBER | | NUMBER | ||
| not null | | not null | ||
− | |||
| | | | ||
| | | | ||
Line 71: | Line 67: | ||
| VARCHAR2(11) | | VARCHAR2(11) | ||
| not null | | not null | ||
− | |||
| | | | ||
| | | | ||
Line 78: | Line 73: | ||
| NUMBER | | NUMBER | ||
| not null | | not null | ||
− | |||
| | | | ||
| | | | ||
Line 85: | Line 79: | ||
| VARCHAR2(40) | | VARCHAR2(40) | ||
| null | | null | ||
− | |||
| | | | ||
| | | | ||
|} | |} | ||
+ | === Primary Key === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''Primary Key | ||
+ | | '''Columns | ||
+ | |- | ||
+ | | COUNTRIES_PK | ||
+ | | COUNTRY_ID | ||
+ | |} | ||
+ | === Check Constraints === | ||
+ | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
+ | |- style="background:silver" | ||
+ | | '''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 === | ||
{| 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.COUNTRIES |
Description | country dimension table (snowflake) |
Columns
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
Primary Key | Columns |
COUNTRIES_PK | COUNTRY_ID |
Check Constraints
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
Detail Table | Column | Referencing Column |
SH.CUSTOMERS | COUNTRY_ID | COUNTRY_ID |