Overview Tables Views Indexes Constraints Triggers Procedures Functions Packages Sequences Index

HR


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

DEPARTMENTS

Description

Departments table that shows details of departments where employees work. Contains 27 rows; references with locations, employees, and job_history tables.

Columns

Column Datatype Nullable Default value Comment
DEPARTMENT_ID NUMBER(4,0) N   Primary key column of departments table.
DEPARTMENT_NAME VARCHAR2(30) N   A not null column that shows name of a department. Administration, Marketing, Purchasing, Human Resources, Shipping, IT, Executive, Public Relations, Sales, Finance, and Accounting.
MANAGER_ID NUMBER(6,0) Y   Manager_id of a department. Foreign key to employee_id column of employees table. The manager_id column of the employee table references this column.
LOCATION_ID NUMBER(4,0) Y   Location id where a department is located. Foreign key to location_id column of locations table.

Primary key

Primary key Columns
DEPT_ID_PK DEPARTMENT_ID

Check constraints

Check constraint Check condition
DEPT_NAME_NN "DEPARTMENT_NAME" IS NOT NULL

Foreign keys

Foreign key Referenced table Referenced constraint Delete rule Columns
DEPT_LOC_FK LOCATIONS LOC_ID_PK NO ACTION LOCATION_ID
DEPT_MGR_FK EMPLOYEES EMP_EMP_ID_PK NO ACTION MANAGER_ID

Indexes

Index Type Uniqueness Columns
DEPT_ID_PK NORMAL UNIQUE DEPARTMENT_ID
DEPT_LOCATION_IX NORMAL NONUNIQUE LOCATION_ID

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
EMPLOYEES EMP_DEPT_FK
JOB_HISTORY JHIST_DEPT_FK


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