The OPTIM_SALES table identifies each salesperson by name,
ID number and manager.
The OPTIM_SALES table has the following
columns:
- SALESMAN_ID
- CHAR; up to 6 characters; cannot contain null.
- FIRST_NAME
- VARCHAR; up to 15 characters; cannot contain null.
- LAST_NAME
- VARCHAR; up to 15 characters; cannot contain null.
- NATIONALITY
- VARCHAR; up to 30 characters
- NATIONAL_ID
- VARCHAR; up to 30 characters
- PHONE_NUMBER
- VARCHAR; up to 20 characters; cannot contain a null
value.
- EMAIL_ADDRESS
- VARCHAR; up to 70 characters; cannot contain null.
- AGE
- SMALLINT; cannot contain null; has a default value.
- SEX
- CHAR; 1 character; cannot contain null; has a default
value.
- TERRITORY
- VARCHAR; up to 14 characters; cannot contain null.
- MANAGER_ID
- VARCHAR; up to 6 characters.
Primary keys
The
SALESMAN_ID column is the primary key column.
Relationships to other tables
The OPTIM_SALES table is a parent of:
- The OPTIM_CUSTOMERS table, through a foreign key
on column SALESMAN_ID.
- The OPTIM_MALE_RATES table, through an Optim™ data-driven relationship on column AGE
when SEX = ‘M'.
- The OPTIM_FEMALE_RATES table, through an Optim data-driven relationship
on column AGE when SEX = ‘F'.
- The OPTIM_STATE_LOOKUP table, through an Optim substring relationship using
SUBSTR(SALESMAN_ID,1,2).