Difference between revisions of "HR.DEPARTMENTS (table)"
Line 116: | Line 116: | ||
| DEPARTMENT_ID | | DEPARTMENT_ID | ||
| DEPARTMENT_ID | | DEPARTMENT_ID | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 11:33, 27 August 2011
Contents
wikibot[edit]
Table | HR.DEPARTMENTS |
Description | Departments table that shows details of departments where employees
work. Contains 27 rows; references with locations, employees, and job_history tables. |
Columns[edit]
Column | Data Type | Nullable | Default | Description |
DEPARTMENT_ID | NUMBER(4, 0) | not null | Primary key column of departments table. | |
DEPARTMENT_NAME | VARCHAR2(30) | not null | A not null column that shows name of a department. Administration,
Marketing, Purchasing, Human Resources, Shipping, IT, Executive, Public Relations, Sales, Finance, and Accounting. | |
MANAGER_ID | NUMBER(6, 0) | null | Manager_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_ID | NUMBER(4, 0) | null | Location id where a department is located. Foreign key to location_id column of locations table. |
Primary Key[edit]
Primary Key | Columns |
DEPT_ID_PK | DEPARTMENT_ID |
Indexes[edit]
Index | Type | Columns |
DEPT_LOCATION_IX | LOCATION_ID |
Check Constraints[edit]
Check Constraint | Expression | Description |
DEPT_NAME_NN | "DEPARTMENT_NAME" IS NOT NULL |
Foreign Keys[edit]
Relation | Column | Referenced Column |
HR.LOCATIONS | LOCATION_ID | LOCATION_ID |
HR.EMPLOYEES | MANAGER_ID | EMPLOYEE_ID |
Detail Tables[edit]
Detail Table | Column | Referencing Column |
HR.EMPLOYEES | DEPARTMENT_ID | DEPARTMENT_ID |
HR.JOB_HISTORY | DEPARTMENT_ID | DEPARTMENT_ID |