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

From dbscript Online Help
Jump to: navigation, search
(New page: == wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- | '''Table | HR.COUNTRIES |- |} {| border="1" cellpadding="5" cellspacing="0" style="bord...)
 
 
(4 intermediate revisions 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
 
| HR.COUNTRIES
 
| HR.COUNTRIES
|-
+
|- valign="top"
 +
| '''Description
 +
| country table. Contains 25 rows. References with locations table.
 
|}
 
|}
  
 
+
=== 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
 
| CHAR(2)
 
| CHAR(2)
 
| not null
 
| not null
 
|  
 
|  
| COUNTRY_C_ID_PK
+
| Primary key of countries table.
|
+
|- valign="top"
|-
 
 
| COUNTRY_NAME
 
| COUNTRY_NAME
| VARCHAR2
+
| VARCHAR2(40)
 
| null
 
| null
 
|  
 
|  
|  
+
| Country name
|
+
|- valign="top"
|-
 
 
| REGION_ID
 
| REGION_ID
 
| NUMBER
 
| NUMBER
 
| null
 
| null
 
|  
 
|  
|  
+
| Region ID for the country. Foreign key to region_id column in the departments table.
|  
+
|}
 +
 
 +
=== Primary Key ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Primary Key
 +
| '''Columns
 +
|- valign="top"
 +
| COUNTRY_C_ID_PK
 +
| COUNTRY_ID
 
|}
 
|}
  
 +
=== Check Constraints ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Check Constraint
 +
| '''Expression
 +
| '''Description
  
 +
|- valign="top"
 +
| COUNTRY_ID_NN
 +
| "COUNTRY_ID" IS NOT NULL
 +
|
 +
|}
  
 +
=== Foreign Keys ===
 
{| 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 48: Line 68:
 
| '''Column
 
| '''Column
 
| '''Referenced Column
 
| '''Referenced Column
+
 
|-
+
|- valign="top"
 
| [[HR.REGIONS_(table)|HR.REGIONS]]
 
| [[HR.REGIONS_(table)|HR.REGIONS]]
 
| REGION_ID
 
| REGION_ID
Line 55: Line 75:
 
|}
 
|}
  
 
+
=== 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 61: Line 81:
 
| '''Column
 
| '''Column
 
| '''Referencing Column
 
| '''Referencing Column
+
 
|-
+
|- valign="top"
 
| [[HR.LOCATIONS_(table)|HR.LOCATIONS]]
 
| [[HR.LOCATIONS_(table)|HR.LOCATIONS]]
 
| COUNTRY_ID
 
| COUNTRY_ID
 
| COUNTRY_ID
 
| COUNTRY_ID
 
|}
 
|}

Latest revision as of 10:33, 27 August 2011

wikibot[edit]

Table HR.COUNTRIES
Description country table. Contains 25 rows. References with locations table.

Columns[edit]

Column Data Type Nullable Default Description
COUNTRY_ID CHAR(2) not null Primary key of countries table.
COUNTRY_NAME VARCHAR2(40) null Country name
REGION_ID NUMBER null Region ID for the country. Foreign key to region_id column in the departments table.

Primary Key[edit]

Primary Key Columns
COUNTRY_C_ID_PK COUNTRY_ID

Check Constraints[edit]

Check Constraint Expression Description
COUNTRY_ID_NN "COUNTRY_ID" IS NOT NULL

Foreign Keys[edit]

Relation Column Referenced Column
HR.REGIONS REGION_ID REGION_ID

Detail Tables[edit]

Detail Table Column Referencing Column
HR.LOCATIONS COUNTRY_ID COUNTRY_ID