HR
| Table Name: | LOCATIONS |
| Description: | Locations table that contains specific address of a specific office, warehouse, and/or production site of a company. Does not store addresses / locations of customers. Contains 23 rows; references with the departments and countries tables. |
| Primary Keys: | LOCATION_ID |
| Field | Type | Defaults | Nulls? | Comments |
|---|---|---|---|---|
| LOCATION_ID | NUMBER (4) | None | No | Primary key of locations table |
| STREET_ADDRESS | VARCHAR2 (40) | None | Yes | Street address of an office, warehouse, or production site of a company. Contains building number and street name |
| POSTAL_CODE | VARCHAR2 (12) | None | Yes | Postal code of the location of an office, warehouse, or production site of a company. |
| CITY | VARCHAR2 (30) | None | No | A not null column that shows city where an office, warehouse, or production site of a company is located. |
| STATE_PROVINCE | VARCHAR2 (25) | None | Yes | State or Province where an office, warehouse, or production site of a company is located. |
| COUNTRY_ID | CHAR (2) | None | Yes | Country where an office, warehouse, or production site of a company is located. Foreign key to country_id column of the countries table. |
| Index | Type | Unique? | Fields |
|---|---|---|---|
| LOC_CITY_IX | NORMAL | Yes | CITY |
| LOC_COUNTRY_IX | NORMAL | No | COUNTRY_ID |
| LOC_ID_PK | NORMAL | No | LOCATION_ID |
| LOC_STATE_PROVINCE_IX | NORMAL | No | STATE_PROVINCE |
| Internal Foreign Key Constraint | Affected Field | Source Table | Source Schema |
|---|---|---|---|
| LOC_C_ID_FK | COUNTRY_ID | COUNTRIES | HR |
| Primary Key as Foreign Key Constraint | Affected Schema | Affected Table | Affected Field |
|---|---|---|---|
| DEPT_LOC_FK | HR | DEPARTMENTS | LOCATION_ID |
| WAREHOUSES_LOCATION_FK | OE | WAREHOUSES | LOCATION_ID |