HR

Basic Index   Expanded Index

Table Name:DEPARTMENTS
Description:Departments table that shows details of departments where employees work. Contains 27 rows; references with locations, employees, and job_history tables.
Primary Keys:DEPARTMENT_ID
FieldTypeDefaultsNulls?Comments
DEPARTMENT_IDNUMBER (4)NoneNoPrimary key column of departments table.
DEPARTMENT_NAMEVARCHAR2 (30)NoneNoA not null column that shows name of a department. Administration,
Marketing, Purchasing, Human Resources, Shipping, IT, Executive, Public
Relations, Sales, Finance, and Accounting.
MANAGER_IDNUMBER (6)NoneYesManager_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_IDNUMBER (4)NoneYesLocation id where a department is located. Foreign key to location_id column of locations table.

IndexTypeUnique?Fields
DEPT_ID_PKNORMALYesDEPARTMENT_ID
DEPT_LOCATION_IXNORMALNoLOCATION_ID

No check constraints
Internal Foreign Key ConstraintAffected FieldSource TableSource Schema
DEPT_LOC_FKLOCATION_IDLOCATIONSHR
DEPT_MGR_FKMANAGER_IDEMPLOYEESHR

Primary Key as Foreign Key ConstraintAffected SchemaAffected TableAffected Field
EMP_DEPT_FKHREMPLOYEESDEPARTMENT_ID
JHIST_DEPT_FKHRJOB_HISTORYDEPARTMENT_ID

No triggers