Overview Tables Views Indexes Constraints Triggers Procedures Functions Packages Sequences Index

SH


Description  Columns  Primary key  Check constraints  Foreign keys  Unique keys  Indexes  Options  Referenced by  Triggers  

CUSTOMERS

Description

dimension table

Columns

Column Datatype Nullable Default value Comment
CUST_ID NUMBER(,) N   primary key
CUST_FIRST_NAME VARCHAR2(20) N   first name of the customer
CUST_LAST_NAME VARCHAR2(40) N   last name of the customer
CUST_GENDER CHAR(1) Y   gender; low cardinality attribute
CUST_YEAR_OF_BIRTH NUMBER(4,0) Y   customer year of birth
CUST_MARITAL_STATUS VARCHAR2(20) Y   customer marital status; low cardinality attribute
CUST_STREET_ADDRESS VARCHAR2(40) N   customer street address
CUST_POSTAL_CODE VARCHAR2(10) N   postal code of the customer
CUST_CITY VARCHAR2(30) N   city where the customer lives
CUST_STATE_PROVINCE VARCHAR2(40) Y   customer geography: state or province
COUNTRY_ID CHAR(2) N   foreign key to the countries table (snowflake)
CUST_MAIN_PHONE_NUMBER VARCHAR2(25) Y   customer main phone number
CUST_INCOME_LEVEL VARCHAR2(30) Y   customer income level
CUST_CREDIT_LIMIT NUMBER(,) Y   customer credit limit
CUST_EMAIL VARCHAR2(30) Y   customer email id
CUST_TOTAL VARCHAR2(14) Y 'Customer total'  

Primary key

Primary key Columns
CUSTOMERS_PK CUST_ID

Check constraints

Check constraint Check condition
CUSTOMER_CITY_NN "CUST_CITY" IS NOT NULL
CUSTOMER_COUNTRY_ID_NN "COUNTRY_ID" IS NOT NULL
CUSTOMER_FNAME_NN "CUST_FIRST_NAME" IS NOT NULL
CUSTOMER_LNAME_NN "CUST_LAST_NAME" IS NOT NULL
CUSTOMER_PCODE_NN "CUST_POSTAL_CODE" IS NOT NULL
CUSTOMER_ST_ADDR_NN "CUST_STREET_ADDRESS" IS NOT NULL

Foreign keys

Foreign key Referenced table Referenced constraint Delete rule Columns
CUSTOMERS_COUNTRY_FK COUNTRIES COUNTRY_PK NO ACTION COUNTRY_ID

Indexes

Index Type Uniqueness Columns
CUSTOMERS_GENDER_BIX BITMAP NONUNIQUE CUST_GENDER
CUSTOMERS_MARITAL_BIX BITMAP NONUNIQUE CUST_MARITAL_STATUS
CUSTOMERS_PK NORMAL UNIQUE CUST_ID
CUSTOMERS_YOB_BIX BITMAP NONUNIQUE CUST_YEAR_OF_BIRTH

Options

Option Setting
Clustered N
Generated by Oracle N
Index Organized N
Logging Y
Partitioned N
Temporary N
Nested N

Referenced by

Referenced by Constraint
SALES SALES_CUSTOMER_FK


Generated by
OraDoclet, Copyright © Oracle Corporation 2005      Last updated: 01.01.2005