HumanResources.Employee

Table: 'HumanResources.Employee'

16 fields. 728 bytes.

Employee information such as salary, department, and title.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
EmployeeIDint identity int Not nullPrimary key for Employee records. 
NationalIDNumbernvarchar15  Not nullUnique national identification number such as a social security number. 
ContactIDint   Not nullIdentifies the employee in the Contact table. Foreign key to Contact.ContactID. 
LoginIDnvarchar256  Not nullNetwork login. 
ManagerIDint   NullManager to whom the employee is assigned. Foreign Key to Employee.M 
Titlenvarchar50  Not nullWork title such as Buyer or Sales Representative. 
BirthDatedatetime   Not nullDate of birth.([BirthDate]>='1930-01-01' AND [BirthDate]<=dateadd(year,(-18),getdate()))
MaritalStatusnchar1  Not nullM = Married, S = Single(upper([MaritalStatus])='S' OR upper([MaritalStatus])='M')
Gendernchar1  Not nullM = Male, F = Female(upper([Gender])='F' OR upper([Gender])='M')
HireDatedatetime   Not nullEmployee hired on this date.([HireDate]>='1996-07-01' AND [HireDate]<=dateadd(day,(1),getdate()))
SalariedFlagFlag bit(1)Not nullJob classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining. 
VacationHourssmallint  (0)Not nullNumber of available vacation hours.([VacationHours]>=(-40) AND [VacationHours]<=(240))
SickLeaveHourssmallint  (0)Not nullNumber of available sick leave hours.([SickLeaveHours]>=(0) AND [SickLeaveHours]<=(120))
CurrentFlagFlag bit(1)Not null0 = Inactive, 1 = Active 
rowguiduniqueidentifier  newid()Not nullROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'HumanResources.Employee'

Primary Key NameField Name
PK_Employee_EmployeeIDEmployeeID

Foreign keys for table 'HumanResources.Employee', 2 items

ForeignPrimaryKey Name
Employee.ManagerIDEmployee.EmployeeIDFK_Employee_Employee_ManagerID
Employee.ContactIDContact.ContactIDFK_Employee_Contact_ContactID

Indexes for table 'HumanResources.Employee', 5 items

Index NameDescriptionClusteredUniqueFields
PK_Employee_EmployeeIDClustered index created by a primary key constraint.YesYesEmployeeID
AK_Employee_LoginIDUnique nonclustered index.NoYesLoginID
AK_Employee_NationalIDNumberUnique nonclustered index.NoYesNationalIDNumber
AK_Employee_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
IX_Employee_ManagerIDNonclustered index.NoNoManagerID

Triggers for table 'HumanResources.Employee', 2 items

NameDescriptionTypeEnabled
dEmployeeINSTEAD OF DELETE trigger which keeps Employees from being deleted.instead of Delete Yes
uEmployeeAFTER UPDATE trigger setting the ModifiedDate column in the Employee table to the current date.after Update Yes

Dependencies for table 'HumanResources.Employee', 18 items

Object NameTypeField Name
dbo.ufnGetContactInformationtable functionN/A
dbo.uspGetEmployeeManagersstored procedureN/A
dbo.uspGetManagerEmployeesstored procedureN/A
HumanResources.CK_Employee_BirthDatecheck cnsN/A
HumanResources.CK_Employee_Gendercheck cnsN/A
HumanResources.CK_Employee_HireDatecheck cnsN/A
HumanResources.CK_Employee_MaritalStatuscheck cnsN/A
HumanResources.CK_Employee_SickLeaveHourscheck cnsN/A
HumanResources.CK_Employee_VacationHourscheck cnsN/A
HumanResources.uEmployeetriggerN/A
HumanResources.uspUpdateEmployeeHireInfostored procedureN/A
HumanResources.uspUpdateEmployeeLoginstored procedureN/A
HumanResources.uspUpdateEmployeePersonalInfostored procedureN/A
HumanResources.vEmployeeviewN/A
HumanResources.vEmployeeDepartmentviewN/A
HumanResources.vEmployeeDepartmentHistoryviewN/A
Sales.vSalesPersonviewN/A
Sales.vSalesPersonSalesByFiscalYearsviewN/A