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

From dbscript Online Help
Jump to: navigation, search
Line 197: Line 197:
 
| INSTEAD OF DELETE
 
| INSTEAD OF DELETE
 
|}
 
|}
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 219: Line 218:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''Description / PK / Index
| '''PK / Index
 
 
 
|-
+
|- valign="top"
 
| EmployeeID
 
| EmployeeID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for Employee records.
+
| Primary key for Employee records.PK_Employee_EmployeeID
| PK_Employee_EmployeeID
+
|- valign="top"
|-
 
 
| NationalIDNumber
 
| NationalIDNumber
 
| nvarchar(15)
 
| nvarchar(15)
 
| not null
 
| not null
 
|  
 
|  
| Unique national identification number such as a social security number.
+
| Unique national identification number such as a social security number.AK_Employee_NationalIDNumber
| AK_Employee_NationalIDNumber
+
|- valign="top"
|-
 
 
| ContactID
 
| ContactID
 
| int
 
| int
Line 242: Line 238:
 
|  
 
|  
 
| Identifies the employee in the Contact table. Foreign key to Contact.ContactID.
 
| Identifies the employee in the Contact table. Foreign key to Contact.ContactID.
|
+
|- valign="top"
|-
 
 
| LoginID
 
| LoginID
 
| nvarchar(256)
 
| nvarchar(256)
 
| not null
 
| not null
 
|  
 
|  
| Network login.
+
| Network login.AK_Employee_LoginID
| AK_Employee_LoginID
+
|- valign="top"
|-
 
 
| ManagerID
 
| ManagerID
 
| int
 
| int
 
| null
 
| null
 
|  
 
|  
| Manager to whom the employee is assigned. Foreign Key to Employee.M
+
| Manager to whom the employee is assigned. Foreign Key to Employee.MIX_Employee_ManagerID
| IX_Employee_ManagerID
+
|- valign="top"
|-
 
 
| Title
 
| Title
 
| nvarchar(50)
 
| nvarchar(50)
Line 263: Line 256:
 
|  
 
|  
 
| Work title such as Buyer or Sales Representative.
 
| Work title such as Buyer or Sales Representative.
|
+
|- valign="top"
|-
 
 
| BirthDate
 
| BirthDate
 
| datetime
 
| datetime
Line 270: Line 262:
 
|  
 
|  
 
| Date of birth.
 
| Date of birth.
|
+
|- valign="top"
|-
 
 
| MaritalStatus
 
| MaritalStatus
 
| nchar(1)
 
| nchar(1)
Line 277: Line 268:
 
|  
 
|  
 
| M = Married, S = Single
 
| M = Married, S = Single
|
+
|- valign="top"
|-
 
 
| Gender
 
| Gender
 
| nchar(1)
 
| nchar(1)
Line 284: Line 274:
 
|  
 
|  
 
| M = Male, F = Female
 
| M = Male, F = Female
|
+
|- valign="top"
|-
 
 
| HireDate
 
| HireDate
 
| datetime
 
| datetime
Line 291: Line 280:
 
|  
 
|  
 
| Employee hired on this date.
 
| Employee hired on this date.
|
+
|- valign="top"
|-
 
 
| SalariedFlag
 
| SalariedFlag
 
| Flag
 
| Flag
Line 298: Line 286:
 
| (1)
 
| (1)
 
| Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining.
 
| Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining.
|
+
|- valign="top"
|-
 
 
| VacationHours
 
| VacationHours
 
| smallint
 
| smallint
Line 305: Line 292:
 
| (0)
 
| (0)
 
| Number of available vacation hours.
 
| Number of available vacation hours.
|
+
|- valign="top"
|-
 
 
| SickLeaveHours
 
| SickLeaveHours
 
| smallint
 
| smallint
Line 312: Line 298:
 
| (0)
 
| (0)
 
| Number of available sick leave hours.
 
| Number of available sick leave hours.
|
+
|- valign="top"
|-
 
 
| CurrentFlag
 
| CurrentFlag
 
| Flag
 
| Flag
Line 319: Line 304:
 
| (1)
 
| (1)
 
| 0 = Inactive, 1 = Active
 
| 0 = Inactive, 1 = Active
|
+
|- valign="top"
|-
 
 
| rowguid
 
| rowguid
 
| uniqueidentifier
 
| uniqueidentifier
 
| not null
 
| not null
 
| (NEWID())
 
| (NEWID())
| ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
+
| ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_Employee_rowguid
| AK_Employee_rowguid
+
|- valign="top"
|-
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
Line 333: Line 316:
 
| (GETDATE())
 
| (GETDATE())
 
| Date and time the record was last updated.
 
| Date and time the record was last updated.
|
 
 
|}
 
|}
  
Line 400: Line 382:
 
| dEmployee
 
| dEmployee
 
| INSTEAD OF DELETE
 
| INSTEAD OF DELETE
 +
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Referenced Object
 +
| '''Object Type
 +
| '''Dependency Type
 +
 +
|-
 +
| [[dbo.Flag_(type)|dbo.Flag]]
 +
| Type
 +
| Data Type
 +
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Referencing Object
 +
| '''Object Type
 +
| '''Reference Type
 +
 +
|-
 +
| [[HumanResources.vEmployee_(view)|HumanResources.vEmployee]]
 +
| View
 +
| Select
 +
|-
 +
| [[HumanResources.vEmployeeDepartment_(view)|HumanResources.vEmployeeDepartment]]
 +
| View
 +
| Select
 +
|-
 +
| [[HumanResources.vEmployeeDepartmentHistory_(view)|HumanResources.vEmployeeDepartmentHistory]]
 +
| View
 +
| Select
 +
|-
 +
| [[Sales.vSalesPerson_(view)|Sales.vSalesPerson]]
 +
| View
 +
| Select
 +
|-
 +
| [[Sales.vSalesPersonSalesByFiscalYears_(view)|Sales.vSalesPersonSalesByFiscalYears]]
 +
| View
 +
| Select
 +
|-
 +
| [[dbo.uspGetEmployeeManagers_(procedure)|dbo.uspGetEmployeeManagers]]
 +
| Procedure
 +
| Select
 +
|-
 +
| [[dbo.uspGetManagerEmployees_(procedure)|dbo.uspGetManagerEmployees]]
 +
| Procedure
 +
| Select
 +
|-
 +
| [[HumanResources.uspUpdateEmployeeHireInfo_(procedure)|HumanResources.uspUpdateEmployeeHireInfo]]
 +
| Procedure
 +
| Update
 +
|-
 +
| [[HumanResources.uspUpdateEmployeeLogin_(procedure)|HumanResources.uspUpdateEmployeeLogin]]
 +
| Procedure
 +
| Update
 +
|-
 +
| [[HumanResources.uspUpdateEmployeePersonalInfo_(procedure)|HumanResources.uspUpdateEmployeePersonalInfo]]
 +
| Procedure
 +
| Update
 +
|-
 +
| [[dbo.ufnGetContactInformation_(function)|dbo.ufnGetContactInformation]]
 +
| SQL table-valued-function
 +
| Select
 
|}
 
|}

Revision as of 00:57, 27 November 2009

wikibot

Table HumanResources.Employee


Column Data Type Nullable Default PK Index
EmployeeID int not null PK_Employee_EmployeeID
NationalIDNumber nvarchar(15) not null AK_Employee_NationalIDNumber
ContactID int not null
LoginID nvarchar(256) not null AK_Employee_LoginID
ManagerID int null IX_Employee_ManagerID
Title nvarchar(50) not null
BirthDate datetime not null
MaritalStatus nchar(1) not null
Gender nchar(1) not null
HireDate datetime not null
SalariedFlag dbo.Flag not null ((1))
VacationHours smallint not null ((0))
SickLeaveHours smallint not null ((0))
CurrentFlag dbo.Flag not null ((1))
rowguid uniqueidentifier not null (newid()) AK_Employee_rowguid
ModifiedDate datetime not null (getdate())


Relation Column Referenced Column
Person.Contact ContactID ContactID
HumanResources.Employee ManagerID EmployeeID


Detail Table Column Referencing Column
HumanResources.Employee EmployeeID ManagerID
HumanResources.EmployeeAddress EmployeeID EmployeeID
HumanResources.EmployeeDepartmentHistory EmployeeID EmployeeID
HumanResources.EmployeePayHistory EmployeeID EmployeeID
HumanResources.JobCandidate EmployeeID EmployeeID
Purchasing.PurchaseOrderHeader EmployeeID EmployeeID
Sales.SalesPerson EmployeeID SalesPersonID


Triggers Type
dEmployee INSTEAD OF DELETE

automatically generated

Table HumanResources.Employee
Description Employee information such as salary, department, and title.


Column Data Type Nullable Default Description / PK / Index
EmployeeID int not null Primary key for Employee records.PK_Employee_EmployeeID
NationalIDNumber nvarchar(15) not null Unique national identification number such as a social security number.AK_Employee_NationalIDNumber
ContactID int not null Identifies the employee in the Contact table. Foreign key to Contact.ContactID.
LoginID nvarchar(256) not null Network login.AK_Employee_LoginID
ManagerID int null Manager to whom the employee is assigned. Foreign Key to Employee.MIX_Employee_ManagerID
Title nvarchar(50) not null Work title such as Buyer or Sales Representative.
BirthDate datetime not null Date of birth.
MaritalStatus nchar(1) not null M = Married, S = Single
Gender nchar(1) not null M = Male, F = Female
HireDate datetime not null Employee hired on this date.
SalariedFlag Flag not null (1) Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining.
VacationHours smallint not null (0) Number of available vacation hours.
SickLeaveHours smallint not null (0) Number of available sick leave hours.
CurrentFlag Flag not null (1) 0 = Inactive, 1 = Active
rowguid uniqueidentifier not null (NEWID()) ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.AK_Employee_rowguid
ModifiedDate datetime not null (GETDATE()) Date and time the record was last updated.


Relation Column Referenced Column
Person.Contact ContactID ContactID
HumanResources.Employee ManagerID EmployeeID


Detail Table Column Referencing Column
HumanResources.Employee EmployeeID ManagerID
HumanResources.EmployeeAddress EmployeeID EmployeeID
HumanResources.EmployeeDepartmentHistory EmployeeID EmployeeID
HumanResources.EmployeePayHistory EmployeeID EmployeeID
HumanResources.JobCandidate EmployeeID EmployeeID
Purchasing.PurchaseOrderHeader EmployeeID EmployeeID
Sales.SalesPerson EmployeeID SalesPersonID


Triggers Type
dEmployee INSTEAD OF DELETE


Referenced Object Object Type Dependency Type
dbo.Flag Type Data Type


Referencing Object Object Type Reference Type
HumanResources.vEmployee View Select
HumanResources.vEmployeeDepartment View Select
HumanResources.vEmployeeDepartmentHistory View Select
Sales.vSalesPerson View Select
Sales.vSalesPersonSalesByFiscalYears View Select
dbo.uspGetEmployeeManagers Procedure Select
dbo.uspGetManagerEmployees Procedure Select
HumanResources.uspUpdateEmployeeHireInfo Procedure Update
HumanResources.uspUpdateEmployeeLogin Procedure Update
HumanResources.uspUpdateEmployeePersonalInfo Procedure Update
dbo.ufnGetContactInformation SQL table-valued-function Select