Schema HR
Oracle Version 11.2.0.2.0
As Of 22/03/2019 08:51:43
Prior Table | Table JOB_HISTORY | Next Table |
Comment |
---|
Table that stores job history of the employees. If an employee changes departments within the job or changes jobs within the department, new rows get inserted into this table with old job information of the employee. Contains a complex primary key: employee_id+start_date. Contains 25 rows. References with jobs, employees, and departments tables. |
Column ID | Column Name | Datatype | Not Null | Data Default | Comments |
---|---|---|---|---|---|
1 | EMPLOYEE_ID1 | NUMBER(6) | Y | A not null column in the complex primary key employee_id+start_date. Foreign key to employee_id column of the employee table test234 | |
2 | START_DATE2 | DATE | Y | A not null column in the complex primary key employee_id+start_date. Must be less than the end_date of the job_history table. (enforced by constraint jhist_date_interval) | |
3 | END_DATE | DATE | Y | Last day of the employee in this job role. A not null column. Must be greater than the start_date of the job_history table. (enforced by constraint jhist_date_interval) | |
4 | JOB_ID | VARCHAR2(10 BYTE) | Y | Job role in which the employee worked in the past; foreign key to job_id column in the jobs table. A not null column. | |
5 | DEPARTMENT_ID | NUMBER(4) | Department id in which the employee worked in the past; foreign key to deparment_id column in the departments table |
Uniqueness | Index Name | Type | Columns | Partitions | Partition Type | Partition Columns | Subpartition Type | Subpartition Columns |
---|---|---|---|---|---|---|---|---|
NON-UNIQUE | JHIST_DEPARTMENT_IX | NORMAL | DEPARTMENT_ID | <none> | ||||
NON-UNIQUE | JHIST_EMPLOYEE_IX | NORMAL | EMPLOYEE_ID | <none> | ||||
UNIQUE | JHIST_EMP_ID_ST_DATE_PK | NORMAL | EMPLOYEE_ID, START_DATE | <none> | ||||
NON-UNIQUE | JHIST_JOB_IX | NORMAL | JOB_ID | <none> |
Constraint Name | Columns | Ref Table Owner | Referenced Table Name | Referenced Columns | Delete Rule | Status | Deferrable | Deferred |
---|---|---|---|---|---|---|---|---|
JHIST_DEPT_FK | DEPARTMENT_ID | HR | DEPARTMENTS | DEPARTMENT_ID | NO ACTION | ENABLED | No | No |
JHIST_EMP_FK | EMPLOYEE_ID | HR | EMPLOYEES | EMPLOYEE_ID | NO ACTION | ENABLED | No | No |
JHIST_JOB_FK | JOB_ID | HR | JOBS | JOB_ID | NO ACTION | ENABLED | No | No |
Constraint Name | Type | Condition | Status | Columns |
---|---|---|---|---|
JHIST_DATE_INTERVAL | Check | end_date > start_date | ENABLED | END_DATE, START_DATE |
JHIST_EMPLOYEE_NN | Check | "EMPLOYEE_ID" IS NOT NULL | ENABLED | EMPLOYEE_ID |
JHIST_END_DATE_NN | Check | "END_DATE" IS NOT NULL | ENABLED | END_DATE |
JHIST_JOB_NN | Check | "JOB_ID" IS NOT NULL | ENABLED | JOB_ID |
JHIST_START_DATE_NN | Check | "START_DATE" IS NOT NULL | ENABLED | START_DATE |
JHIST_EMP_ID_ST_DATE_PK | Primary Key | ENABLED | EMPLOYEE_ID, START_DATE |
Partitions |
Redaction Policies |