HR JOB_HISTORY (table)

wikibot

TableHR.JOB_HISTORY
DescriptionTable that stores job history of the employees. If an employee

Columns

ColumnData TypeNullableDefaultDescription
EMPLOYEE_IDNUMBER(6, 0)not null A not null column in the complex primary key employee_id+start_date.
START_DATEDATE(7)not null A not null column in the complex primary key employee_id+start_date.
END_DATEDATE(7)not null Last day of the employee in this job role. A not null column. Must be
JOB_IDVARCHAR2(10)not null Job role in which the employee worked in the past; foreign key to
DEPARTMENT_IDNUMBER(4, 0)null Department id in which the employee worked in the past; foreign key to deparment_id column in the departments table

Primary Key

Primary KeyColumns
JHIST_EMP_ID_ST_DATE_PKEMPLOYEE_ID, START_DATE

Indexes

IndexTypeColumns
JHIST_DEPARTMENT_IX DEPARTMENT_ID
JHIST_EMPLOYEE_IX EMPLOYEE_ID
JHIST_JOB_IX JOB_ID

Check Constraints

Check ConstraintExpressionDescription
JHIST_DATE_INTERVALend_date > start_date 
JHIST_EMPLOYEE_NN"EMPLOYEE_ID" IS NOT NULL 
JHIST_END_DATE_NN"END_DATE" IS NOT NULL 
JHIST_JOB_NN"JOB_ID" IS NOT NULL 
JHIST_START_DATE_NN"START_DATE" IS NOT NULL 

Foreign Keys

RelationColumnReferenced Column
HR.DEPARTMENTSDEPARTMENT_IDDEPARTMENT_ID
HR.EMPLOYEESEMPLOYEE_IDEMPLOYEE_ID
HR.JOBSJOB_IDJOB_ID