Difference between revisions of "HumanResources.EmployeeDepartmentHistory (table)"

From dbscript Online Help
Jump to: navigation, search
Line 83: Line 83:
 
| ShiftID
 
| ShiftID
 
|}
 
|}
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 105: Line 104:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''Description / PK / Index
| '''PK / Index
 
 
 
|-
+
|- valign="top"
 
| EmployeeID
 
| EmployeeID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Employee identification number. Foreign key to Employee.EmployeeID.
+
| Employee identification number. Foreign key to Employee.EmployeeID.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
+
|- valign="top"
|-
 
 
| DepartmentID
 
| DepartmentID
 
| smallint
 
| smallint
 
| not null
 
| not null
 
|  
 
|  
| Department in which the employee worked including currently. Foreign key to Department.DepartmentID.
+
| Department in which the employee worked including currently. Foreign key to Department.DepartmentID.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDIX_EmployeeDepartmentHistory_DepartmentID
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDIX_EmployeeDepartmentHistory_DepartmentID
+
|- valign="top"
|-
 
 
| ShiftID
 
| ShiftID
 
| tinyint
 
| tinyint
 
| not null
 
| not null
 
|  
 
|  
| Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID.
+
| Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDIX_EmployeeDepartmentHistory_ShiftID
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDIX_EmployeeDepartmentHistory_ShiftID
+
|- valign="top"
|-
 
 
| StartDate
 
| StartDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
|  
 
|  
| Date the employee started work in the department.
+
| Date the employee started work in the department.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
+
|- valign="top"
|-
 
 
| EndDate
 
| EndDate
 
| datetime
 
| datetime
Line 142: Line 136:
 
|  
 
|  
 
| Date the employee left the department. NULL = Current department.
 
| Date the employee left the department. NULL = Current department.
|
+
|- valign="top"
|-
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
Line 149: Line 142:
 
| (GETDATE())
 
| (GETDATE())
 
| Date and time the record was last updated.
 
| Date and time the record was last updated.
|
 
 
|}
 
|}
  
Line 172: Line 164:
 
| ShiftID
 
| ShiftID
 
| ShiftID
 
| ShiftID
 +
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Referencing Object
 +
| '''Object Type
 +
| '''Reference Type
 +
 +
|-
 +
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]]
 +
| View
 +
| Select
 +
|-
 +
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]]
 +
| View
 +
| Select
 
|}
 
|}

Revision as of 00:57, 27 November 2009

wikibot

Table HumanResources.EmployeeDepartmentHistory


Column Data Type Nullable Default PK Index
EmployeeID int not null PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
DepartmentID smallint not null PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID IX_EmployeeDepartmentHistory_DepartmentID
ShiftID tinyint not null PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID IX_EmployeeDepartmentHistory_ShiftID
StartDate datetime not null PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
EndDate datetime null
ModifiedDate datetime not null (getdate())


Relation Column Referenced Column
HumanResources.Department DepartmentID DepartmentID
HumanResources.Employee EmployeeID EmployeeID
HumanResources.Shift ShiftID ShiftID

automatically generated

Table HumanResources.EmployeeDepartmentHistory
Description Employee department transfers.


Column Data Type Nullable Default Description / PK / Index
EmployeeID int not null Employee identification number. Foreign key to Employee.EmployeeID.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
DepartmentID smallint not null Department in which the employee worked including currently. Foreign key to Department.DepartmentID.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDIX_EmployeeDepartmentHistory_DepartmentID
ShiftID tinyint not null Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDIX_EmployeeDepartmentHistory_ShiftID
StartDate datetime not null Date the employee started work in the department.PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
EndDate datetime null Date the employee left the department. NULL = Current department.
ModifiedDate datetime not null (GETDATE()) Date and time the record was last updated.


Relation Column Referenced Column
HumanResources.Department DepartmentID DepartmentID
HumanResources.Employee EmployeeID EmployeeID
HumanResources.Shift ShiftID ShiftID


Referencing Object Object Type Reference Type
HumanResources.vEmployeeDepartment View Select
HumanResources.vEmployeeDepartmentHistory View Select