Editing HumanResources.EmployeeDepartmentHistory (table)

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
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
|- valign="top"
+
|-
| '''Description
 
| Employee department transfers.
 
 
|}
 
|}
  
=== Columns ===
+
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 17: Line 15:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''PK
 
+
| '''Index
|- valign="top"
+
 +
|-
 
| EmployeeID
 
| EmployeeID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Employee identification number. Foreign key to Employee.EmployeeID.
+
| 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.
+
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
|- valign="top"
+
| IX_EmployeeDepartmentHistory_DepartmentID
 +
|-
 
| ShiftID
 
| ShiftID
 
| tinyint
 
| tinyint
 
| not null
 
| not null
 
|  
 
|  
| Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID.
+
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
|- valign="top"
+
| IX_EmployeeDepartmentHistory_ShiftID
 +
|-
 
| StartDate
 
| StartDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
|  
 
|  
| Date the employee started work in the department.
+
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
|- valign="top"
+
|
 +
|-
 
| EndDate
 
| EndDate
 
| datetime
 
| datetime
 
| null
 
| null
 
|  
 
|  
| Date the employee left the department. NULL = Current department.
+
|  
|- valign="top"
+
|
 +
|-
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time the record was last updated.
 
|}
 
 
=== Primary Key ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Primary Key
 
| '''Columns
 
|- valign="top"
 
| PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentID
 
| EmployeeID, DepartmentID, ShiftID, StartDate
 
|}
 
 
=== Indexes ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Index
 
| '''Type
 
| '''Columns
 
 
|- valign="top"
 
| IX_EmployeeDepartmentHistory_DepartmentID
 
 
|  
 
|  
| DepartmentID
 
|- valign="top"
 
| IX_EmployeeDepartmentHistory_ShiftID
 
 
|  
 
|  
| ShiftID
 
 
|}
 
|}
  
=== Check Constraints ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Check Constraint
 
| '''Expression
 
| '''Description
 
  
|- valign="top"
 
| CK_EmployeeDepartmentHistory_EndDate
 
| ([EndDate]>=[StartDate] OR [EndDate] IS NULL)
 
| Check constraint [EndDate] >= [StartDate] OR [EndDate] IS NUL
 
|}
 
  
=== Foreign Keys ===
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 103: Line 69:
 
| '''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
 
| ShiftID
 
| ShiftID
 
|}
 
|}
 
=== References ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Dependency Type
 
| '''Object Type
 
| '''Referenced Object
 
 
|- valign="top"
 
| Schema
 
| Schema
 
| [[HumanResources_(schema)|HumanResources]]
 
 
|}
 
 
=== Dependencies ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Reference Type
 
| '''Object Type
 
| '''Referencing Object
 
 
|- valign="top"
 
| Select
 
| View
 
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]]
 
 
|- valign="top"
 
| Select
 
| View
 
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]]
 
 
|}
 
 
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 158: Line 89:
 
| '''Table
 
| '''Table
 
| HumanResources.EmployeeDepartmentHistory
 
| HumanResources.EmployeeDepartmentHistory
|- valign="top"
+
|-
 +
 
 
| '''Description
 
| '''Description
 
| Employee department transfers.
 
| Employee department transfers.
 
|-
 
|-
 +
 
|}
 
|}
  
Line 236: Line 169:
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
| '''Dependency Type
+
| '''Referencing Object
 
| '''Object Type
 
| '''Object Type
| '''Referenced Object
 
 
|-
 
| Schema
 
| Schema
 
| [[HumanResources_(schema)|HumanResources]]
 
 
|}
 
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
 
| '''Reference Type
 
| '''Reference Type
| '''Object Type
+
| '''Referencing Object
 
 
 
 
|-
 
|-
 +
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]]
 +
| View
 
| Select
 
| Select
 +
|-
 +
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]]
 
| View
 
| View
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]]
 
 
|-
 
 
| Select
 
| Select
| View
 
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]]
 
 
 
|}
 
|}

Please note that all contributions to dbscript Online Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Project:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)