ScrewTurn Wiki

Edit

wikibot

TableHR.EMPLOYEES
Descriptionemployees table. Contains 107 rows. References with departments,

Edit

Columns

ColumnData TypeNullableDefaultDescription
EMPLOYEE_IDNUMBER(6, 0)not null Primary key of employees table.
FIRST_NAMEVARCHAR2(20)null First name of the employee. A not null column.
LAST_NAMEVARCHAR2(25)not null Last name of the employee. A not null column.
EMAILVARCHAR2(25)not null Email id of the employee
PHONE_NUMBERVARCHAR2(20)null Phone number of the employee; includes country code and area code
HIRE_DATEDATE(7)not null Date when the employee started on this job. A not null column.
JOB_IDVARCHAR2(10)not null Current job of the employee; foreign key to job_id column of the
SALARYNUMBER(8, 2)null Monthly salary of the employee. Must be greater
COMMISSION_PCTNUMBER(2, 2)null Commission percentage of the employee; Only employees in sales
MANAGER_IDNUMBER(6, 0)null Manager id of the employee; has same domain as manager_id in
DEPARTMENT_IDNUMBER(4, 0)null Department id where employee works; foreign key to department_id

Edit

Primary Key

Primary KeyColumns
EMP_EMP_ID_PKEMPLOYEE_ID

Edit

Indexes

IndexTypeColumns
EMP_DEPARTMENT_IX DEPARTMENT_ID
EMP_EMAIL_UK EMAIL
EMP_JOB_IX JOB_ID
EMP_MANAGER_IX MANAGER_ID
EMP_NAME_IX LAST_NAME, FIRST_NAME

Edit

Check Constraints

Check ConstraintExpressionDescription
EMP_EMAIL_NN"EMAIL" IS NOT NULL 
EMP_HIRE_DATE_NN"HIRE_DATE" IS NOT NULL 
EMP_JOB_NN"JOB_ID" IS NOT NULL 
EMP_LAST_NAME_NN"LAST_NAME" IS NOT NULL 
EMP_SALARY_MINsalary > 0 

Edit

Foreign Keys

RelationColumnReferenced Column
HR.DEPARTMENTSDEPARTMENT_IDDEPARTMENT_ID
HR.JOBSJOB_IDJOB_ID
HR.EMPLOYEESMANAGER_IDEMPLOYEE_ID

Edit

Detail Tables

Detail TableColumnReferencing Column
OE.CUSTOMERSEMPLOYEE_IDACCOUNT_MGR_ID
HR.DEPARTMENTSEMPLOYEE_IDMANAGER_ID
HR.EMPLOYEESEMPLOYEE_IDMANAGER_ID
HR.JOB_HISTORYEMPLOYEE_IDEMPLOYEE_ID
OE.ORDERSEMPLOYEE_IDSALES_REP_ID

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.