Difference between revisions of "HumanResources.EmployeeDepartmentHistory (table)"
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 | ||
| HumanResources.EmployeeDepartmentHistory | | HumanResources.EmployeeDepartmentHistory | ||
Line 8: | Line 8: | ||
| '''Description | | '''Description | ||
| Employee department transfers. | | Employee department transfers. | ||
− | |||
|} | |} | ||
− | |||
=== Columns === | === Columns === | ||
Line 20: | Line 18: | ||
| '''Default | | '''Default | ||
| '''Description | | '''Description | ||
− | + | ||
|- valign="top" | |- valign="top" | ||
| EmployeeID | | EmployeeID | ||
Line 64: | Line 62: | ||
| '''Primary Key | | '''Primary Key | ||
| '''Columns | | '''Columns | ||
− | |- | + | |- valign="top" |
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID | | PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID | ||
| EmployeeID, DepartmentID, ShiftID, StartDate | | EmployeeID, DepartmentID, ShiftID, StartDate | ||
Line 75: | Line 73: | ||
| '''Type | | '''Type | ||
| '''Columns | | '''Columns | ||
− | + | ||
− | |- | + | |- valign="top" |
| IX_EmployeeDepartmentHistory_DepartmentID | | IX_EmployeeDepartmentHistory_DepartmentID | ||
| | | | ||
| DepartmentID | | DepartmentID | ||
− | |- | + | |- valign="top" |
| IX_EmployeeDepartmentHistory_ShiftID | | IX_EmployeeDepartmentHistory_ShiftID | ||
| | | | ||
Line 92: | Line 90: | ||
| '''Expression | | '''Expression | ||
| '''Description | | '''Description | ||
− | + | ||
− | |- | + | |- valign="top" |
| CK_EmployeeDepartmentHistory_EndDate | | CK_EmployeeDepartmentHistory_EndDate | ||
| ([EndDate]>=[StartDate] OR [EndDate] IS NULL) | | ([EndDate]>=[StartDate] OR [EndDate] IS NULL) | ||
Line 105: | Line 103: | ||
| '''Column | | '''Column | ||
| '''Referenced Column | | '''Referenced Column | ||
− | + | ||
− | |- | + | |- valign="top" |
| [[HumanResources.Department_(table)|HumanResources.Department]] | | [[HumanResources.Department_(table)|HumanResources.Department]] | ||
| DepartmentID | | DepartmentID | ||
| DepartmentID | | DepartmentID | ||
− | |- | + | |- valign="top" |
| [[HumanResources.Employee_(table)|HumanResources.Employee]] | | [[HumanResources.Employee_(table)|HumanResources.Employee]] | ||
| EmployeeID | | EmployeeID | ||
| EmployeeID | | EmployeeID | ||
− | |- | + | |- valign="top" |
| [[HumanResources.Shift_(table)|HumanResources.Shift]] | | [[HumanResources.Shift_(table)|HumanResources.Shift]] | ||
| ShiftID | | ShiftID | ||
Line 127: | Line 125: | ||
| '''Referenced Object | | '''Referenced Object | ||
− | |- | + | |- valign="top" |
| Schema | | Schema | ||
| Schema | | Schema | ||
− | | [[HumanResources_(schema)|HumanResources]] | + | | [[HumanResources_(_(schema))|HumanResources]] |
|} | |} | ||
Line 141: | Line 139: | ||
| '''Referencing Object | | '''Referencing Object | ||
− | |- | + | |- valign="top" |
| Select | | Select | ||
| View | | View | ||
− | | [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]] | + | | [[HumanResources.vEmployeeDepartment_(_(view))|HumanResources.vEmployeeDepartment]] |
− | |- | + | |- valign="top" |
| Select | | Select | ||
| View | | View | ||
− | | [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]] | + | | [[HumanResources.vEmployeeDepartmentHistory_(_(view))|HumanResources.vEmployeeDepartmentHistory]] |
|} | |} |
Revision as of 23:00, 23 June 2010
Contents
[hide]wikibot
Table | HumanResources.EmployeeDepartmentHistory |
Description | Employee department transfers. |
Columns
Column | Data Type | Nullable | Default | Description |
EmployeeID | int | not null | Employee identification number. Foreign key to Employee.EmployeeID. | |
DepartmentID | smallint | not null | Department in which the employee worked including currently. Foreign key to Department.DepartmentID. | |
ShiftID | tinyint | not null | Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID. | |
StartDate | datetime | not null | Date the employee started work in the department. | |
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. |
Primary Key
Primary Key | Columns |
PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID | EmployeeID, DepartmentID, ShiftID, StartDate |
Indexes
Index | Type | Columns |
IX_EmployeeDepartmentHistory_DepartmentID | DepartmentID | |
IX_EmployeeDepartmentHistory_ShiftID | ShiftID |
Check Constraints
Check Constraint | Expression | Description |
CK_EmployeeDepartmentHistory_EndDate | ([EndDate]>=[StartDate] OR [EndDate] IS NULL) | Check constraint [EndDate] >= [StartDate] OR [EndDate] IS NUL |
Foreign Keys
Relation | Column | Referenced Column |
HumanResources.Department | DepartmentID | DepartmentID |
HumanResources.Employee | EmployeeID | EmployeeID |
HumanResources.Shift | ShiftID | ShiftID |
References
Dependency Type | Object Type | Referenced Object |
Schema | Schema | HumanResources |
Dependencies
Reference Type | Object Type | Referencing Object |
Select | View | HumanResources.vEmployeeDepartment |
Select | View | HumanResources.vEmployeeDepartmentHistory |
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 |
Dependency Type | Object Type | Referenced Object |
Schema | Schema | HumanResources |
Reference Type | Object Type | Referencing Object |
Select | View | HumanResources.vEmployeeDepartment |
Select | View | HumanResources.vEmployeeDepartmentHistory |