Difference between revisions of "HR.DEPARTMENTS (table)"

From dbscript Online Help
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|-
+
|- valign="top"
 
| '''Table
 
| '''Table
 
| HR.DEPARTMENTS
 
| HR.DEPARTMENTS
Line 9: Line 9:
 
| Departments table that shows details of departments where employees
 
| Departments table that shows details of departments where employees
 
work. Contains 27 rows; references with locations, employees, and job_history tables.
 
work. Contains 27 rows; references with locations, employees, and job_history tables.
|-
 
 
|}
 
|}
 
  
 
=== Columns ===
 
=== Columns ===
Line 21: Line 19:
 
| '''Default
 
| '''Default
 
| '''Description
 
| '''Description
+
 
|-
+
|- valign="top"
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
 
| NUMBER(4, 0)
 
| NUMBER(4, 0)
Line 28: Line 26:
 
|  
 
|  
 
| Primary key column of departments table.
 
| Primary key column of departments table.
|-
+
|- valign="top"
 
| DEPARTMENT_NAME
 
| DEPARTMENT_NAME
 
| VARCHAR2(30)
 
| VARCHAR2(30)
Line 36: Line 34:
 
Marketing, Purchasing, Human Resources, Shipping, IT, Executive, Public
 
Marketing, Purchasing, Human Resources, Shipping, IT, Executive, Public
 
Relations, Sales, Finance, and Accounting.  
 
Relations, Sales, Finance, and Accounting.  
|-
+
|- valign="top"
 
| MANAGER_ID
 
| MANAGER_ID
 
| NUMBER(6, 0)
 
| NUMBER(6, 0)
Line 42: Line 40:
 
|  
 
|  
 
| 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.
 
| 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.
|-
+
|- valign="top"
 
| LOCATION_ID
 
| LOCATION_ID
 
| NUMBER(4, 0)
 
| NUMBER(4, 0)
Line 55: Line 53:
 
| '''Primary Key
 
| '''Primary Key
 
| '''Columns
 
| '''Columns
|-
+
|- valign="top"
 
| DEPT_ID_PK
 
| DEPT_ID_PK
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
Line 66: Line 64:
 
| '''Type
 
| '''Type
 
| '''Columns
 
| '''Columns
+
 
|-
+
|- valign="top"
 
| DEPT_LOCATION_IX
 
| DEPT_LOCATION_IX
 
|  
 
|  
Line 79: Line 77:
 
| '''Expression
 
| '''Expression
 
| '''Description
 
| '''Description
+
 
|-
+
|- valign="top"
 
| DEPT_NAME_NN
 
| DEPT_NAME_NN
 
| "DEPARTMENT_NAME" IS NOT NULL
 
| "DEPARTMENT_NAME" IS NOT NULL
Line 92: Line 90:
 
| '''Column
 
| '''Column
 
| '''Referenced Column
 
| '''Referenced Column
+
 
|-
+
|- valign="top"
 
| [[HR.LOCATIONS_(table)|HR.LOCATIONS]]
 
| [[HR.LOCATIONS_(table)|HR.LOCATIONS]]
 
| LOCATION_ID
 
| LOCATION_ID
 
| LOCATION_ID
 
| LOCATION_ID
|-
+
|- valign="top"
 
| [[HR.EMPLOYEES_(table)|HR.EMPLOYEES]]
 
| [[HR.EMPLOYEES_(table)|HR.EMPLOYEES]]
 
| MANAGER_ID
 
| MANAGER_ID
Line 109: Line 107:
 
| '''Column
 
| '''Column
 
| '''Referencing Column
 
| '''Referencing Column
+
 
|-
+
|- valign="top"
 
| [[HR.EMPLOYEES_(table)|HR.EMPLOYEES]]
 
| [[HR.EMPLOYEES_(table)|HR.EMPLOYEES]]
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
|-
+
|- valign="top"
 
| [[HR.JOB_HISTORY_(table)|HR.JOB_HISTORY]]
 
| [[HR.JOB_HISTORY_(table)|HR.JOB_HISTORY]]
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
 
| DEPARTMENT_ID
|}
 
 
=== Dependencies ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Reference Type
 
| '''Object Type
 
| '''Referencing Object
 
 
|-
 
| Select
 
| View
 
| [[OE.DEPTVIEW_(view)|OE.DEPTVIEW]]
 
 
 
|}
 
|}

Latest revision as of 10:33, 27 August 2011

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