Welcome Guest, you are in: Login

devio dbscript ScrewTurn Wiki

RSS RSS

Navigation





Search the wiki
»

PoweredBy

Page History: HR EMPLOYEES (table)

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2010/02/11 09:18


wikibot

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

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

Primary Key

Primary KeyColumns
EMP_EMP_ID_PKEMPLOYEE_ID

Indexes

IndexTypeColumns
EMP_EMAIL_UKUniqueEMAIL
EMP_MANAGER_IX MANAGER_ID
EMP_JOB_IX JOB_ID
EMP_DEPARTMENT_IX DEPARTMENT_ID
EMP_NAME_IX LAST_NAME, FIRST_NAME

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 

Foreign Keys

RelationColumnReferenced Column
HR.DEPARTMENTSDEPARTMENT_IDDEPARTMENT_ID
HR.JOBSJOB_IDJOB_ID
HR.EMPLOYEESMANAGER_IDEMPLOYEE_ID

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

Dependencies

Reference TypeObject TypeReferencing Object
SelectViewHR.EMP_DETAILS_VIEW
SelectViewOE.DEPTVIEW

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