Adventure Works Database Schema

Table of Contents

Summary

PropertyValue
Report created20-May-2011 15:49
DBMS and versionMicrosoft SQL Server [ 09.00.1399 ]
ServerDTM-XP
Database nameAdventureWorks
User/Loginsa
Schema/Owner 
Driver and versionsqlncli10.dll [ 10.00.4000 ]
DTM Schema ReporterVersion 1.24.23, (C) 2003-2011 DTM soft.

Tables, 70 items

Table: 'dbo.AWBuildVersion'

4 fields. 83 bytes.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SystemInformationIDtinyint identity tinyint Not nullPrimary key for AWBuildVersion records. 
Database Versionnvarchar25  Not nullVersion number of the database in 9.yy.mm.dd.00 format. 
VersionDatedatetime   Not nullDate and time the record was last updated. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'dbo.AWBuildVersion'

Primary Key NameField Name
PK_AWBuildVersion_SystemInformationIDSystemInformationID
There are no Foreign Keys for this table.

Indexes for table 'dbo.AWBuildVersion', 1 item

Index NameDescriptionClusteredUniqueFields
PK_AWBuildVersion_SystemInformationIDClustered index created by a primary key constraint.YesYesSystemInformationID

Triggers for table 'dbo.AWBuildVersion', 1 item

NameDescriptionTypeEnabled
uAWBuildVersionAFTER UPDATE trigger setting the ModifiedDate column in the AWBuildVersion table to the current date.after Update Yes

Dependencies for table 'dbo.AWBuildVersion', 1 item

Object NameTypeField Name
dbo.uAWBuildVersiontriggerN/A

Table: 'dbo.DatabaseLog'

8 fields. 1044 bytes.

Audit table tracking all DDL changes made to the AdventureWorks database. Data is captured by the database trigger ddlDatabaseTriggerLog.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
DatabaseLogIDint identity int Not nullPrimary key for DatabaseLog records. 
PostTimedatetime   Not nullThe date and time the DDL change occurred. 
DatabaseUsersysname128nvarchar(128) Not nullThe user who implemented the DDL change. 
Eventsysname128nvarchar(128) Not nullThe type of DDL statement that was executed. 
Schemasysname128nvarchar(128) NullThe schema to which the changed object belongs. 
Objectsysname128nvarchar(128) NullThe object that was changed by the DDL statment. 
TSQLnvarcharmax  Not nullThe exact Transact-SQL statement that was executed. 
XmlEventxml   Not nullThe raw XML data generated by database trigger. 

Extended Properties

The object has no extended properties.

Primary key for table 'dbo.DatabaseLog'

Primary Key NameField Name
PK_DatabaseLog_DatabaseLogIDDatabaseLogID
There are no Foreign Keys for this table.

Indexes for table 'dbo.DatabaseLog', 1 item

Index NameDescriptionClusteredUniqueFields
PK_DatabaseLog_DatabaseLogIDNonclustered index created by a primary key constraint.NoYesDatabaseLogID
There are no Triggers for this table.
There are no Dependencies for this object.

Table: 'dbo.ErrorLog'

9 fields. 8544 bytes.

Audit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ErrorLogIDint identity int Not nullPrimary key for ErrorLog records. 
ErrorTimedatetime  getdate()Not nullThe date and time at which the error occurred. 
UserNamesysname128nvarchar(128) Not nullThe user who executed the batch in which the error occurred. 
ErrorNumberint   Not nullThe error number of the error that occurred. 
ErrorSeverityint   NullThe severity of the error that occurred. 
ErrorStateint   NullThe state number of the error that occurred. 
ErrorProcedurenvarchar126  NullThe name of the stored procedure or trigger where the error occurred. 
ErrorLineint   NullThe line number at which the error occurred. 
ErrorMessagenvarchar4000  Not nullThe message text of the error that occurred. 

Extended Properties

The object has no extended properties.

Primary key for table 'dbo.ErrorLog'

Primary Key NameField Name
PK_ErrorLog_ErrorLogIDErrorLogID
There are no Foreign Keys for this table.

Indexes for table 'dbo.ErrorLog', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ErrorLog_ErrorLogIDClustered index created by a primary key constraint.YesYesErrorLogID
There are no Triggers for this table.

Dependencies for table 'dbo.ErrorLog', 1 item

Object NameTypeField Name
dbo.uspLogErrorstored procedureN/A

Table: 'HumanResources.Department'

4 fields. 218 bytes.

Lookup table containing the departments within the Adventure Works Cycles company.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
DepartmentIDsmallint identity smallint Not nullPrimary key for Department records. 
NameName nvarchar(50) Not nullName of the department. 
GroupNameName nvarchar(50) Not nullName of the group to which the department belongs. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'HumanResources.Department'

Primary Key NameField Name
PK_Department_DepartmentIDDepartmentID
There are no Foreign Keys for this table.

Indexes for table 'HumanResources.Department', 2 items

Index NameDescriptionClusteredUniqueFields
PK_Department_DepartmentIDClustered index created by a primary key constraint.YesYesDepartmentID
AK_Department_NameUnique nonclustered index.NoYesName

Triggers for table 'HumanResources.Department', 1 item

NameDescriptionTypeEnabled
uDepartmentAFTER UPDATE trigger setting the ModifiedDate column in the Department table to the current date.after Update Yes

Dependencies for table 'HumanResources.Department', 3 items

Object NameTypeField Name
HumanResources.uDepartmenttriggerN/A
HumanResources.vEmployeeDepartmentviewN/A
HumanResources.vEmployeeDepartmentHistoryviewN/A

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

Table: 'HumanResources.EmployeeAddress'

4 fields. 40 bytes.

Cross-reference table mapping employees to their address(es).

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
EmployeeIDint   Not nullPrimary key. Foreign key to Employee.EmployeeID. 
AddressIDint   Not nullPrimary key. Foreign key to Address.AddressID. 
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.EmployeeAddress'

Primary Key NameField Names
PK_EmployeeAddress_EmployeeID_AddressIDEmployeeID, AddressID

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

ForeignPrimaryKey Name
EmployeeAddress.EmployeeIDEmployee.EmployeeIDFK_EmployeeAddress_Employee_EmployeeID
EmployeeAddress.AddressIDAddress.AddressIDFK_EmployeeAddress_Address_AddressID

Indexes for table 'HumanResources.EmployeeAddress', 2 items

Index NameDescriptionClusteredUniqueFields
PK_EmployeeAddress_EmployeeID_AddressIDClustered index created by a primary key constraint.YesYesEmployeeID, AddressID
AK_EmployeeAddress_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'HumanResources.EmployeeAddress', 1 item

NameDescriptionTypeEnabled
uEmployeeAddressAFTER UPDATE trigger setting the ModifiedDate column in the EmployeeAddress table to the current date.after Update Yes

Dependencies for table 'HumanResources.EmployeeAddress', 3 items

Object NameTypeField Name
HumanResources.uEmployeeAddresstriggerN/A
HumanResources.vEmployeeviewN/A
Sales.vSalesPersonviewN/A

Table: 'HumanResources.EmployeeDepartmentHistory'

6 fields. 55 bytes.

Employee department transfers.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
EmployeeIDint   Not nullEmployee identification number. Foreign key to Employee.EmployeeID. 
DepartmentIDsmallint   Not nullDepartment in which the employee worked including currently. Foreign key to Department.DepartmentID. 
ShiftIDtinyint   Not nullIdentifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID. 
StartDatedatetime   Not nullDate the employee started work in the department. 
EndDatedatetime   NullDate the employee left the department. NULL = Current department. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'HumanResources.EmployeeDepartmentHistory'

Primary Key NameField Names
PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDEmployeeID, StartDate, DepartmentID, ShiftID

Foreign keys for table 'HumanResources.EmployeeDepartmentHistory', 3 items

ForeignPrimaryKey Name
EmployeeDepartmentHistory.DepartmentIDDepartment.DepartmentIDFK_EmployeeDepartmentHistory_Department_DepartmentID
EmployeeDepartmentHistory.EmployeeIDEmployee.EmployeeIDFK_EmployeeDepartmentHistory_Employee_EmployeeID
EmployeeDepartmentHistory.ShiftIDShift.ShiftIDFK_EmployeeDepartmentHistory_Shift_ShiftID

Indexes for table 'HumanResources.EmployeeDepartmentHistory', 3 items

Index NameDescriptionClusteredUniqueFields
PK_EmployeeDepartmentHistory_EmployeeID_StartDate_DepartmentIDClustered index created by a primary key constraint.YesYesEmployeeID, StartDate, DepartmentID, ShiftID
IX_EmployeeDepartmentHistory_DepartmentIDNonclustered index.NoNoDepartmentID
IX_EmployeeDepartmentHistory_ShiftIDNonclustered index.NoNoShiftID

Triggers for table 'HumanResources.EmployeeDepartmentHistory', 1 item

NameDescriptionTypeEnabled
uEmployeeDepartmentHistoryAFTER UPDATE trigger setting the ModifiedDate column in the EmployeeDepartmentHistory table to the current date.after Update Yes

Dependencies for table 'HumanResources.EmployeeDepartmentHistory', 4 items

Object NameTypeField Name
HumanResources.CK_EmployeeDepartmentHistory_EndDatecheck cnsN/A
HumanResources.uEmployeeDepartmentHistorytriggerN/A
HumanResources.vEmployeeDepartmentviewN/A
HumanResources.vEmployeeDepartmentHistoryviewN/A

Table: 'HumanResources.EmployeePayHistory'

5 fields. 58 bytes.

Employee pay history.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
EmployeeIDint   Not nullEmployee identification number. Foreign key to Employee.EmployeeID. 
RateChangeDatedatetime   Not nullDate the change in pay is effective 
Ratemoney19,4decimal(19,4) Not nullSalary hourly rate.([Rate]>=(6.50) AND [Rate]<=(200.00))
PayFrequencytinyint   Not null1 = Salary received monthly, 2 = Salary received biweekly([PayFrequency]=(2) OR [PayFrequency]=(1))
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'HumanResources.EmployeePayHistory'

Primary Key NameField Names
PK_EmployeePayHistory_EmployeeID_RateChangeDateEmployeeID, RateChangeDate

Foreign keys for table 'HumanResources.EmployeePayHistory', 1 item

ForeignPrimaryKey Name
EmployeePayHistory.EmployeeIDEmployee.EmployeeIDFK_EmployeePayHistory_Employee_EmployeeID

Indexes for table 'HumanResources.EmployeePayHistory', 1 item

Index NameDescriptionClusteredUniqueFields
PK_EmployeePayHistory_EmployeeID_RateChangeDateClustered index created by a primary key constraint.YesYesEmployeeID, RateChangeDate

Triggers for table 'HumanResources.EmployeePayHistory', 1 item

NameDescriptionTypeEnabled
uEmployeePayHistoryAFTER UPDATE trigger setting the ModifiedDate column in the EmployeePayHistory table to the current date.after Update Yes

Dependencies for table 'HumanResources.EmployeePayHistory', 4 items

Object NameTypeField Name
HumanResources.CK_EmployeePayHistory_PayFrequencycheck cnsN/A
HumanResources.CK_EmployeePayHistory_Ratecheck cnsN/A
HumanResources.uEmployeePayHistorytriggerN/A
HumanResources.uspUpdateEmployeeHireInfostored procedureN/A

Table: 'HumanResources.JobCandidate'

4 fields. 24 bytes.

Resumes submitted to Human Resources by job applicants.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
JobCandidateIDint identity int Not nullPrimary key for JobCandidate records. 
EmployeeIDint   NullEmployee identification number if applicant was hired. Foreign key to Employee.EmployeeID. 
Resumexml   NullResume in XML format. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'HumanResources.JobCandidate'

Primary Key NameField Name
PK_JobCandidate_JobCandidateIDJobCandidateID

Foreign keys for table 'HumanResources.JobCandidate', 1 item

ForeignPrimaryKey Name
JobCandidate.EmployeeIDEmployee.EmployeeIDFK_JobCandidate_Employee_EmployeeID

Indexes for table 'HumanResources.JobCandidate', 2 items

Index NameDescriptionClusteredUniqueFields
PK_JobCandidate_JobCandidateIDClustered index created by a primary key constraint.YesYesJobCandidateID
IX_JobCandidate_EmployeeIDNonclustered index.NoNoEmployeeID

Triggers for table 'HumanResources.JobCandidate', 1 item

NameDescriptionTypeEnabled
uJobCandidateAFTER UPDATE trigger setting the ModifiedDate column in the JobCandidat table to the current date.after Update Yes

Dependencies for table 'HumanResources.JobCandidate', 4 items

Object NameTypeField Name
HumanResources.uJobCandidatetriggerN/A
HumanResources.vJobCandidateviewN/A
HumanResources.vJobCandidateEducationviewN/A
HumanResources.vJobCandidateEmploymentviewN/A

Table: 'HumanResources.Shift'

5 fields. 149 bytes.

Work shift lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ShiftIDtinyint identity tinyint Not nullPrimary key for Shift records. 
NameName nvarchar(50) Not nullShift description. 
StartTimedatetime   Not nullShift start time. 
EndTimedatetime   Not nullShift end time. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'HumanResources.Shift'

Primary Key NameField Name
PK_Shift_ShiftIDShiftID
There are no Foreign Keys for this table.

Indexes for table 'HumanResources.Shift', 3 items

Index NameDescriptionClusteredUniqueFields
PK_Shift_ShiftIDClustered index created by a primary key constraint.YesYesShiftID
AK_Shift_NameUnique nonclustered index.NoYesName
AK_Shift_StartTime_EndTimeUnique nonclustered index.NoYesStartTime, EndTime

Triggers for table 'HumanResources.Shift', 1 item

NameDescriptionTypeEnabled
uShiftAFTER UPDATE trigger setting the ModifiedDate column in the Shift table to the current date.after Update Yes

Dependencies for table 'HumanResources.Shift', 2 items

Object NameTypeField Name
HumanResources.uShifttriggerN/A
HumanResources.vEmployeeDepartmentHistoryviewN/A

Table: 'Person.Address'

8 fields. 370 bytes.

Street address information for customers, employees, and vendors.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
AddressIDint identity int Not nullPrimary key for Address records. 
AddressLine1nvarchar60  Not nullFirst street address line. 
AddressLine2nvarchar60  NullSecond street address line. 
Citynvarchar30  Not nullName of the city. 
StateProvinceIDint   Not nullUnique identification number for the state or province. Foreign key to StateProvince table. 
PostalCodenvarchar15  Not nullPostal code for the street address. 
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 'Person.Address'

Primary Key NameField Name
PK_Address_AddressIDAddressID

Foreign keys for table 'Person.Address', 1 item

ForeignPrimaryKey Name
Address.StateProvinceIDStateProvince.StateProvinceIDFK_Address_StateProvince_StateProvinceID

Indexes for table 'Person.Address', 4 items

Index NameDescriptionClusteredUniqueFields
PK_Address_AddressIDClustered index created by a primary key constraint.YesYesAddressID
AK_Address_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCodeNonclustered index.NoYesAddressLine1, AddressLine2, City, StateProvinceID, PostalCode
IX_Address_StateProvinceIDNonclustered index.NoNoStateProvinceID

Triggers for table 'Person.Address', 1 item

NameDescriptionTypeEnabled
uAddressAFTER UPDATE trigger setting the ModifiedDate column in the Address table to the current date.after Update Yes

Dependencies for table 'Person.Address', 6 items

Object NameTypeField Name
HumanResources.vEmployeeviewN/A
Person.uAddresstriggerN/A
Purchasing.vVendorviewN/A
Sales.vIndividualCustomerviewN/A
Sales.vSalesPersonviewN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Person.AddressType'

4 fields. 136 bytes.

Types of addresses stored in the Address table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
AddressTypeIDint identity int Not nullPrimary key for AddressType records. 
NameName nvarchar(50) Not nullAddress type description. For example, Billing, Home, or Shipping. 
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 'Person.AddressType'

Primary Key NameField Name
PK_AddressType_AddressTypeIDAddressTypeID
There are no Foreign Keys for this table.

Indexes for table 'Person.AddressType', 3 items

Index NameDescriptionClusteredUniqueFields
PK_AddressType_AddressTypeIDClustered index created by a primary key constraint.YesYesAddressTypeID
AK_AddressType_NameUnique nonclustered index.NoYesName
AK_AddressType_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Person.AddressType', 1 item

NameDescriptionTypeEnabled
uAddressTypeAFTER UPDATE trigger setting the ModifiedDate column in the AddressType table to the current date.after Update Yes

Dependencies for table 'Person.AddressType', 3 items

Object NameTypeField Name
Person.uAddressTypetriggerN/A
Sales.vIndividualCustomerviewN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Person.Contact'

15 fields. 577 bytes.

Names of each employee, customer contact, and vendor contact.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ContactIDint identity int Not nullPrimary key for Contact records. 
NameStyleNameStyle bit(0)Not null0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name, first name) order. 
Titlenvarchar8  NullA courtesy title. For example, Mr. or Ms. 
FirstNameName nvarchar(50) Not nullFirst name of the person. 
MiddleNameName nvarchar(50) NullMiddle name or middle initial of the person. 
LastNameName nvarchar(50) Not nullLast name of the person. 
Suffixnvarchar10  NullSurname suffix. For example, Sr. or Jr. 
EmailAddressnvarchar50  NullE-mail address for the person. 
EmailPromotionint  (0)Not null0 = Contact does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureWorks, 2 = Contact does wish to receive e-mail promotions from AdventureWorks and selected partners. ([EmailPromotion]>=(0) AND [EmailPromotion]<=(2))
PhonePhone nvarchar(25) NullPhone number associated with the person. 
PasswordHashvarchar40  Not nullPassword for the e-mail account. 
PasswordSaltvarchar10  Not nullRandom value concatenated with the password string before the password is hashed. 
AdditionalContactInfoxml   NullAdditional contact information about the person stored in xml format.  
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

Object TypeObject NameProperty NameProperty Value
TABLEContactAuthorMike Filony

Primary key for table 'Person.Contact'

Primary Key NameField Name
PK_Contact_ContactIDContactID
There are no Foreign Keys for this table.

Indexes for table 'Person.Contact', 3 items

Index NameDescriptionClusteredUniqueFields
PK_Contact_ContactIDClustered index created by a primary key constraint.YesYesContactID
AK_Contact_rowguidnonclustered, unique located on PRIMARYNoYesrowguid
IX_Contact_EmailAddressNonclustered index.NoNoEmailAddress

Triggers for table 'Person.Contact', 1 item

NameDescriptionTypeEnabled
uContactAFTER UPDATE trigger setting the ModifiedDate column in the Contact table to the current date.after Update Yes

Dependencies for table 'Person.Contact', 14 items

Object NameTypeField Name
dbo.ufnGetContactInformationtable functionN/A
dbo.uspGetEmployeeManagersstored procedureN/A
dbo.uspGetManagerEmployeesstored procedureN/A
HumanResources.vEmployeeviewN/A
HumanResources.vEmployeeDepartmentviewN/A
HumanResources.vEmployeeDepartmentHistoryviewN/A
Person.CK_Contact_EmailPromotioncheck cnsN/A
Person.uContacttriggerN/A
Person.vAdditionalContactInfoviewN/A
Purchasing.vVendorviewN/A
Sales.vIndividualCustomerviewN/A
Sales.vSalesPersonviewN/A
Sales.vSalesPersonSalesByFiscalYearsviewN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Person.ContactType'

3 fields. 120 bytes.

Lookup table containing the types of contacts stored in Contact.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ContactTypeIDint identity int Not nullPrimary key for ContactType records. 
NameName nvarchar(50) Not nullContact type description. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Person.ContactType'

Primary Key NameField Name
PK_ContactType_ContactTypeIDContactTypeID
There are no Foreign Keys for this table.

Indexes for table 'Person.ContactType', 2 items

Index NameDescriptionClusteredUniqueFields
PK_ContactType_ContactTypeIDClustered index created by a primary key constraint.YesYesContactTypeID
AK_ContactType_NameUnique nonclustered index.NoYesName

Triggers for table 'Person.ContactType', 1 item

NameDescriptionTypeEnabled
uContactTypeAFTER UPDATE trigger setting the ModifiedDate column in the ContactType table to the current date.after Update Yes

Dependencies for table 'Person.ContactType', 4 items

Object NameTypeField Name
dbo.ufnGetContactInformationtable functionN/A
Person.uContactTypetriggerN/A
Purchasing.vVendorviewN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Person.CountryRegion'

3 fields. 122 bytes.

Lookup table containing the ISO standard codes for countries and regions.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CountryRegionCodenvarchar3  Not nullISO standard code for countries and regions. 
NameName nvarchar(50) Not nullCountry or region name. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Person.CountryRegion'

Primary Key NameField Name
PK_CountryRegion_CountryRegionCodeCountryRegionCode
There are no Foreign Keys for this table.

Indexes for table 'Person.CountryRegion', 2 items

Index NameDescriptionClusteredUniqueFields
PK_CountryRegion_CountryRegionCodeClustered index created by a primary key constraint.YesYesCountryRegionCode
AK_CountryRegion_NameUnique nonclustered index.NoYesName

Triggers for table 'Person.CountryRegion', 1 item

NameDescriptionTypeEnabled
uCountryRegionAFTER UPDATE trigger setting the ModifiedDate column in the CountryRegion table to the current date.after Update Yes

Dependencies for table 'Person.CountryRegion', 7 items

Object NameTypeField Name
HumanResources.vEmployeeviewN/A
Person.uCountryRegiontriggerN/A
Person.vStateProvinceCountryRegionviewN/A
Purchasing.vVendorviewN/A
Sales.vIndividualCustomerviewN/A
Sales.vSalesPersonviewN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Person.StateProvince'

8 fields. 153 bytes.

State and province lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
StateProvinceIDint identity int Not nullPrimary key for StateProvince records. 
StateProvinceCodenchar3  Not nullISO standard state or province code. 
CountryRegionCodenvarchar3  Not nullISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.  
IsOnlyStateProvinceFlagFlag bit(1)Not null0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. 
NameName nvarchar(50) Not nullState or province description. 
TerritoryIDint   Not nullID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID. 
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 'Person.StateProvince'

Primary Key NameField Name
PK_StateProvince_StateProvinceIDStateProvinceID

Foreign keys for table 'Person.StateProvince', 2 items

ForeignPrimaryKey Name
StateProvince.CountryRegionCodeCountryRegion.CountryRegionCodeFK_StateProvince_CountryRegion_CountryRegionCode
StateProvince.TerritoryIDSalesTerritory.TerritoryIDFK_StateProvince_SalesTerritory_TerritoryID

Indexes for table 'Person.StateProvince', 4 items

Index NameDescriptionClusteredUniqueFields
PK_StateProvince_StateProvinceIDClustered index created by a primary key constraint.YesYesStateProvinceID
AK_StateProvince_NameUnique nonclustered index.NoYesName
AK_StateProvince_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
AK_StateProvince_StateProvinceCode_CountryRegionCodeUnique nonclustered index.NoYesStateProvinceCode, CountryRegionCode

Triggers for table 'Person.StateProvince', 1 item

NameDescriptionTypeEnabled
uStateProvinceAFTER UPDATE trigger setting the ModifiedDate column in the StateProvince table to the current date.after Update Yes

Dependencies for table 'Person.StateProvince', 7 items

Object NameTypeField Name
HumanResources.vEmployeeviewN/A
Person.uStateProvincetriggerN/A
Person.vStateProvinceCountryRegionviewN/A
Purchasing.vVendorviewN/A
Sales.vIndividualCustomerviewN/A
Sales.vSalesPersonviewN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Production.BillOfMaterials'

9 fields. 78 bytes.

Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
BillOfMaterialsIDint identity int Not nullPrimary key for BillOfMaterials records. 
ProductAssemblyIDint   NullParent product identification number. Foreign key to Product.ProductID. 
ComponentIDint   Not nullComponent identification number. Foreign key to Product.ProductID. 
StartDatedatetime  getdate()Not nullDate the component started being used in the assembly item. 
EndDatedatetime   NullDate the component stopped being used in the assembly item. 
UnitMeasureCodenchar3  Not nullStandard code identifying the unit of measure for the quantity. 
BOMLevelsmallint   Not nullIndicates the depth the component is from its parent (AssemblyID). 
PerAssemblyQtydecimal8,2 (1.00)Not nullQuantity of the component needed to create the assembly.([PerAssemblyQty]>=(1.00))
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.BillOfMaterials'

Primary Key NameField Name
PK_BillOfMaterials_BillOfMaterialsIDBillOfMaterialsID

Foreign keys for table 'Production.BillOfMaterials', 3 items

ForeignPrimaryKey Name
BillOfMaterials.ProductAssemblyIDProduct.ProductIDFK_BillOfMaterials_Product_ProductAssemblyID
BillOfMaterials.ComponentIDProduct.ProductIDFK_BillOfMaterials_Product_ComponentID
BillOfMaterials.UnitMeasureCodeUnitMeasure.UnitMeasureCodeFK_BillOfMaterials_UnitMeasure_UnitMeasureCode

Indexes for table 'Production.BillOfMaterials', 3 items

Index NameDescriptionClusteredUniqueFields
AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDateClustered index.YesYesProductAssemblyID, ComponentID, StartDate
PK_BillOfMaterials_BillOfMaterialsIDNonclustered index created by a primary key constraint.NoYesBillOfMaterialsID
IX_BillOfMaterials_UnitMeasureCodeNonclustered index.NoNoUnitMeasureCode

Triggers for table 'Production.BillOfMaterials', 1 item

NameDescriptionTypeEnabled
uBillOfMaterialsAFTER UPDATE trigger setting the ModifiedDate column in the BillOfMaterials table to the current date.after Update Yes

Dependencies for table 'Production.BillOfMaterials', 7 items

Object NameTypeField Name
dbo.uspGetBillOfMaterialsstored procedureN/A
dbo.uspGetWhereUsedProductIDstored procedureN/A
Production.CK_BillOfMaterials_BOMLevelcheck cnsN/A
Production.CK_BillOfMaterials_EndDatecheck cnsN/A
Production.CK_BillOfMaterials_PerAssemblyQtycheck cnsN/A
Production.CK_BillOfMaterials_ProductAssemblyIDcheck cnsN/A
Production.uBillOfMaterialstriggerN/A

Table: 'Production.Culture'

3 fields. 128 bytes.

Lookup table containing the languages in which some AdventureWorks data is stored.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CultureIDnchar6  Not nullPrimary key for Culture records. 
NameName nvarchar(50) Not nullCulture description. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.Culture'

Primary Key NameField Name
PK_Culture_CultureIDCultureID
There are no Foreign Keys for this table.

Indexes for table 'Production.Culture', 2 items

Index NameDescriptionClusteredUniqueFields
PK_Culture_CultureIDClustered index created by a primary key constraint.YesYesCultureID
AK_Culture_NameUnique nonclustered index.NoYesName

Triggers for table 'Production.Culture', 1 item

NameDescriptionTypeEnabled
uCultureAFTER UPDATE trigger setting the ModifiedDate column in the Culture table to the current date.after Update Yes

Dependencies for table 'Production.Culture', 1 item

Object NameTypeField Name
Production.uCulturetriggerN/A

Table: 'Production.Document'

10 fields. 951 bytes.

Product maintenance documents.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
DocumentIDint identity int Not nullPrimary key for Document records. 
Titlenvarchar50  Not nullTitle of the document. 
FileNamenvarchar400  Not nullDirectory path and file name of the document 
FileExtensionnvarchar8  Not nullFile extension indicating the document type. For example, .doc or .txt. 
Revisionnchar5  Not nullRevision number of the document.  
ChangeNumberint  (0)Not nullEngineering change approval number. 
Statustinyint   Not null1 = Pending approval, 2 = Approved, 3 = Obsolete([Status]>=(1) AND [Status]<=(3))
DocumentSummarynvarcharmax  NullDocument abstract. 
Documentvarbinary   NullComplete document. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.Document'

Primary Key NameField Name
PK_Document_DocumentIDDocumentID
There are no Foreign Keys for this table.

Indexes for table 'Production.Document', 2 items

Index NameDescriptionClusteredUniqueFields
PK_Document_DocumentIDClustered index created by a primary key constraint.YesYesDocumentID
AK_Document_FileName_RevisionUnique nonclustered index.NoYesFileName, Revision

Triggers for table 'Production.Document', 1 item

NameDescriptionTypeEnabled
uDocumentAFTER UPDATE trigger setting the ModifiedDate column in the Document table to the current date.after Update Yes

Dependencies for table 'Production.Document', 2 items

Object NameTypeField Name
Production.CK_Document_Statuscheck cnsN/A
Production.uDocumenttriggerN/A

Table: 'Production.Illustration'

3 fields. 20 bytes.

Bicycle assembly diagrams.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
IllustrationIDint identity int Not nullPrimary key for Illustration records. 
Diagramxml   NullIllustrations used in manufacturing instructions. Stored as XML. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.Illustration'

Primary Key NameField Name
PK_Illustration_IllustrationIDIllustrationID
There are no Foreign Keys for this table.

Indexes for table 'Production.Illustration', 1 item

Index NameDescriptionClusteredUniqueFields
PK_Illustration_IllustrationIDClustered index created by a primary key constraint.YesYesIllustrationID

Triggers for table 'Production.Illustration', 1 item

NameDescriptionTypeEnabled
uIllustrationAFTER UPDATE trigger setting the ModifiedDate column in the Illustration table to the current date.after Update Yes

Dependencies for table 'Production.Illustration', 1 item

Object NameTypeField Name
Production.uIllustrationtriggerN/A

Table: 'Production.Location'

5 fields. 140 bytes.

Product inventory and manufacturing locations.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
LocationIDsmallint identity smallint Not nullPrimary key for Location records. 
NameName nvarchar(50) Not nullLocation description. 
CostRatesmallmoney10,4decimal(10,4)(0.00)Not nullStandard hourly cost of the manufacturing location.([CostRate]>=(0.00))
Availabilitydecimal8,2 (0.00)Not nullWork capacity (in hours) of the manufacturing location.([Availability]>=(0.00))
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.Location'

Primary Key NameField Name
PK_Location_LocationIDLocationID
There are no Foreign Keys for this table.

Indexes for table 'Production.Location', 2 items

Index NameDescriptionClusteredUniqueFields
PK_Location_LocationIDClustered index created by a primary key constraint.YesYesLocationID
AK_Location_NameUnique nonclustered index.NoYesName

Triggers for table 'Production.Location', 1 item

NameDescriptionTypeEnabled
uLocationAFTER UPDATE trigger setting the ModifiedDate column in the Location table to the current date.after Update Yes

Dependencies for table 'Production.Location', 3 items

Object NameTypeField Name
Production.CK_Location_Availabilitycheck cnsN/A
Production.CK_Location_CostRatecheck cnsN/A
Production.uLocationtriggerN/A

Table: 'Production.Product'

25 fields. 368 bytes.

Products sold or used in the manfacturing of sold products.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint identity int Not nullPrimary key for Product records. 
NameName nvarchar(50) Not nullName of the product. 
ProductNumbernvarchar25  Not nullUnique product identification number. 
MakeFlagFlag bit(1)Not null0 = Product is purchased, 1 = Product is manufactured in-house. 
FinishedGoodsFlagFlag bit(1)Not null0 = Product is not a salable item. 1 = Product is salable. 
Colornvarchar15  NullProduct color. 
SafetyStockLevelsmallint   Not nullMinimum inventory quantity. ([SafetyStockLevel]>(0))
ReorderPointsmallint   Not nullInventory level that triggers a purchase order or work order. ([ReorderPoint]>(0))
StandardCostmoney19,4decimal(19,4) Not nullStandard cost of the product.([StandardCost]>=(0.00))
ListPricemoney19,4decimal(19,4) Not nullSelling price.([ListPrice]>=(0.00))
Sizenvarchar5  NullProduct size. 
SizeUnitMeasureCodenchar3  NullUnit of measure for Size column. 
WeightUnitMeasureCodenchar3  NullUnit of measure for Weight column. 
Weightdecimal8,2  NullProduct weight.([Weight]>(0.00))
DaysToManufactureint   Not nullNumber of days required to manufacture the product.([DaysToManufacture]>=(0))
ProductLinenchar2  NullR = Road, M = Mountain, T = Touring, S = Standard(upper([ProductLine])='R' OR upper([ProductLine])='M' OR upper([ProductLine])='T' OR upper([ProductLine])='S' OR [ProductLine] IS NULL)
Classnchar2  NullH = High, M = Medium, L = Low(upper([Class])='H' OR upper([Class])='M' OR upper([Class])='L' OR [Class] IS NULL)
Stylenchar2  NullW = Womens, M = Mens, U = Universal(upper([Style])='U' OR upper([Style])='M' OR upper([Style])='W' OR [Style] IS NULL)
ProductSubcategoryIDint   NullProduct is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID.  
ProductModelIDint   NullProduct is a member of this product model. Foreign key to ProductModel.ProductModelID. 
SellStartDatedatetime   Not nullDate the product was available for sale. 
SellEndDatedatetime   NullDate the product was no longer available for sale. 
DiscontinuedDatedatetime   NullDate the product was discontinued. 
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 'Production.Product'

Primary Key NameField Name
PK_Product_ProductIDProductID

Foreign keys for table 'Production.Product', 4 items

ForeignPrimaryKey Name
Product.ProductModelIDProductModel.ProductModelIDFK_Product_ProductModel_ProductModelID
Product.ProductSubcategoryIDProductSubcategory.ProductSubcategoryIDFK_Product_ProductSubcategory_ProductSubcategoryID
Product.SizeUnitMeasureCodeUnitMeasure.UnitMeasureCodeFK_Product_UnitMeasure_SizeUnitMeasureCode
Product.WeightUnitMeasureCodeUnitMeasure.UnitMeasureCodeFK_Product_UnitMeasure_WeightUnitMeasureCode

Indexes for table 'Production.Product', 4 items

Index NameDescriptionClusteredUniqueFields
PK_Product_ProductIDClustered index created by a primary key constraint.YesYesProductID
AK_Product_NameUnique nonclustered index.NoYesName
AK_Product_ProductNumberUnique nonclustered index.NoYesProductNumber
AK_Product_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Production.Product', 1 item

NameDescriptionTypeEnabled
uProductAFTER UPDATE trigger setting the ModifiedDate column in the Product table to the current date.after Update Yes

Dependencies for table 'Production.Product', 17 items

Object NameTypeField Name
dbo.ufnGetProductDealerPricescalar functionN/A
dbo.ufnGetProductListPricescalar functionN/A
dbo.ufnGetProductStandardCostscalar functionN/A
dbo.uspGetBillOfMaterialsstored procedureN/A
dbo.uspGetWhereUsedProductIDstored procedureN/A
Production.CK_Product_Classcheck cnsN/A
Production.CK_Product_DaysToManufacturecheck cnsN/A
Production.CK_Product_ListPricecheck cnsN/A
Production.CK_Product_ProductLinecheck cnsN/A
Production.CK_Product_ReorderPointcheck cnsN/A
Production.CK_Product_SafetyStockLevelcheck cnsN/A
Production.CK_Product_SellEndDatecheck cnsN/A
Production.CK_Product_StandardCostcheck cnsN/A
Production.CK_Product_Stylecheck cnsN/A
Production.CK_Product_Weightcheck cnsN/A
Production.uProducttriggerN/A
Production.vProductAndDescriptionviewN/A

Table: 'Production.ProductCategory'

4 fields. 136 bytes.

High-level product categorization.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductCategoryIDint identity int Not nullPrimary key for ProductCategory records. 
NameName nvarchar(50) Not nullCategory description. 
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 'Production.ProductCategory'

Primary Key NameField Name
PK_ProductCategory_ProductCategoryIDProductCategoryID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductCategory', 3 items

Index NameDescriptionClusteredUniqueFields
PK_ProductCategory_ProductCategoryIDClustered index created by a primary key constraint.YesYesProductCategoryID
AK_ProductCategory_NameUnique nonclustered index.NoYesName
AK_ProductCategory_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Production.ProductCategory', 1 item

NameDescriptionTypeEnabled
uProductCategoryAFTER UPDATE trigger setting the ModifiedDate column in the ProductCategory table to the current date.after Update Yes

Dependencies for table 'Production.ProductCategory', 1 item

Object NameTypeField Name
Production.uProductCategorytriggerN/A

Table: 'Production.ProductCostHistory'

5 fields. 73 bytes.

Changes in the cost of a product over time.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID 
StartDatedatetime   Not nullProduct cost start date. 
EndDatedatetime   NullProduct cost end date. 
StandardCostmoney19,4decimal(19,4) Not nullStandard cost of the product.([StandardCost]>=(0.00))
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductCostHistory'

Primary Key NameField Names
PK_ProductCostHistory_ProductID_StartDateProductID, StartDate

Foreign keys for table 'Production.ProductCostHistory', 1 item

ForeignPrimaryKey Name
ProductCostHistory.ProductIDProduct.ProductIDFK_ProductCostHistory_Product_ProductID

Indexes for table 'Production.ProductCostHistory', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductCostHistory_ProductID_StartDateClustered index created by a primary key constraint.YesYesProductID, StartDate

Triggers for table 'Production.ProductCostHistory', 1 item

NameDescriptionTypeEnabled
uProductCostHistoryAFTER UPDATE trigger setting the ModifiedDate column in the ProductCostHistory table to the current date.after Update Yes

Dependencies for table 'Production.ProductCostHistory', 4 items

Object NameTypeField Name
dbo.ufnGetProductStandardCostscalar functionN/A
Production.CK_ProductCostHistory_EndDatecheck cnsN/A
Production.CK_ProductCostHistory_StandardCostcheck cnsN/A
Production.uProductCostHistorytriggerN/A

Table: 'Production.ProductDescription'

4 fields. 836 bytes.

Product descriptions in several languages.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductDescriptionIDint identity int Not nullPrimary key for ProductDescription records. 
Descriptionnvarchar400  Not nullDescription of the product. 
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 'Production.ProductDescription'

Primary Key NameField Name
PK_ProductDescription_ProductDescriptionIDProductDescriptionID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductDescription', 2 items

Index NameDescriptionClusteredUniqueFields
PK_ProductDescription_ProductDescriptionIDClustered index created by a primary key constraint.YesYesProductDescriptionID
AK_ProductDescription_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Production.ProductDescription', 1 item

NameDescriptionTypeEnabled
uProductDescriptionAFTER UPDATE trigger setting the ModifiedDate column in the ProductDescription table to the current date.after Update Yes

Dependencies for table 'Production.ProductDescription', 2 items

Object NameTypeField Name
Production.uProductDescriptiontriggerN/A
Production.vProductAndDescriptionviewN/A

Table: 'Production.ProductDocument'

3 fields. 24 bytes.

Cross-reference table mapping products to related product documents.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
DocumentIDint   Not nullDocument identification number. Foreign key to Document.DocumentID. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductDocument'

Primary Key NameField Names
PK_ProductDocument_ProductID_DocumentIDProductID, DocumentID

Foreign keys for table 'Production.ProductDocument', 2 items

ForeignPrimaryKey Name
ProductDocument.DocumentIDDocument.DocumentIDFK_ProductDocument_Document_DocumentID
ProductDocument.ProductIDProduct.ProductIDFK_ProductDocument_Product_ProductID

Indexes for table 'Production.ProductDocument', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductDocument_ProductID_DocumentIDClustered index created by a primary key constraint.YesYesProductID, DocumentID

Triggers for table 'Production.ProductDocument', 1 item

NameDescriptionTypeEnabled
uProductDocumentAFTER UPDATE trigger setting the ModifiedDate column in the ProductDocument table to the current date.after Update Yes

Dependencies for table 'Production.ProductDocument', 1 item

Object NameTypeField Name
Production.uProductDocumenttriggerN/A

Table: 'Production.ProductInventory'

7 fields. 61 bytes.

Product inventory information.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
LocationIDsmallint   Not nullInventory location identification number. Foreign key to Location.LocationID.  
Shelfnvarchar10  Not nullStorage compartment within an inventory location.([Shelf] like '[A-Za-z]' OR [Shelf]='N/A')
Bintinyint   Not nullStorage container on a shelf in an inventory location.([Bin]>=(0) AND [Bin]<=(100))
Quantitysmallint  (0)Not nullQuantity of products in the inventory location. 
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 'Production.ProductInventory'

Primary Key NameField Names
PK_ProductInventory_ProductID_LocationIDProductID, LocationID

Foreign keys for table 'Production.ProductInventory', 2 items

ForeignPrimaryKey Name
ProductInventory.LocationIDLocation.LocationIDFK_ProductInventory_Location_LocationID
ProductInventory.ProductIDProduct.ProductIDFK_ProductInventory_Product_ProductID

Indexes for table 'Production.ProductInventory', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductInventory_ProductID_LocationIDClustered index created by a primary key constraint.YesYesProductID, LocationID

Triggers for table 'Production.ProductInventory', 1 item

NameDescriptionTypeEnabled
uProductInventoryAFTER UPDATE trigger setting the ModifiedDate column in the ProductInventory table to the current date.after Update Yes

Dependencies for table 'Production.ProductInventory', 4 items

Object NameTypeField Name
dbo.ufnGetStockscalar functionN/A
Production.CK_ProductInventory_Bincheck cnsN/A
Production.CK_ProductInventory_Shelfcheck cnsN/A
Production.uProductInventorytriggerN/A

Table: 'Production.ProductListPriceHistory'

5 fields. 73 bytes.

Changes in the list price of a product over time.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID 
StartDatedatetime   Not nullList price start date. 
EndDatedatetime   NullList price end date 
ListPricemoney19,4decimal(19,4) Not nullProduct list price.([ListPrice]>(0.00))
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductListPriceHistory'

Primary Key NameField Names
PK_ProductListPriceHistory_ProductID_StartDateProductID, StartDate

Foreign keys for table 'Production.ProductListPriceHistory', 1 item

ForeignPrimaryKey Name
ProductListPriceHistory.ProductIDProduct.ProductIDFK_ProductListPriceHistory_Product_ProductID

Indexes for table 'Production.ProductListPriceHistory', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductListPriceHistory_ProductID_StartDateClustered index created by a primary key constraint.YesYesProductID, StartDate

Triggers for table 'Production.ProductListPriceHistory', 1 item

NameDescriptionTypeEnabled
uProductListPriceHistoryAFTER UPDATE trigger setting the ModifiedDate column in the ProductListPriceHistory table to the current date.after Update Yes

Dependencies for table 'Production.ProductListPriceHistory', 5 items

Object NameTypeField Name
dbo.ufnGetProductDealerPricescalar functionN/A
dbo.ufnGetProductListPricescalar functionN/A
Production.CK_ProductListPriceHistory_EndDatecheck cnsN/A
Production.CK_ProductListPriceHistory_ListPricecheck cnsN/A
Production.uProductListPriceHistorytriggerN/A

Table: 'Production.ProductModel'

6 fields. 136 bytes.

Product model classification.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductModelIDint identity int Not nullPrimary key for ProductModel records. 
NameName nvarchar(50) Not nullProduct model description. 
CatalogDescriptionxml   NullDetailed product catalog information in xml format. 
Instructionsxml   NullManufacturing instructions in xml format. 
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 'Production.ProductModel'

Primary Key NameField Name
PK_ProductModel_ProductModelIDProductModelID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductModel', 3 items

Index NameDescriptionClusteredUniqueFields
PK_ProductModel_ProductModelIDClustered index created by a primary key constraint.YesYesProductModelID
AK_ProductModel_NameUnique nonclustered index.NoYesName
AK_ProductModel_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Production.ProductModel', 1 item

NameDescriptionTypeEnabled
uProductModelAFTER UPDATE trigger setting the ModifiedDate column in the ProductModel table to the current date.after Update Yes

Dependencies for table 'Production.ProductModel', 4 items

Object NameTypeField Name
Production.uProductModeltriggerN/A
Production.vProductAndDescriptionviewN/A
Production.vProductModelCatalogDescriptionviewN/A
Production.vProductModelInstructionsviewN/A

Table: 'Production.ProductModelIllustration'

3 fields. 24 bytes.

Cross-reference table mapping product models and illustrations.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductModelIDint   Not nullPrimary key. Foreign key to ProductModel.ProductModelID. 
IllustrationIDint   Not nullPrimary key. Foreign key to Illustration.IllustrationID. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductModelIllustration'

Primary Key NameField Names
PK_ProductModelIllustration_ProductModelID_IllustrationIDProductModelID, IllustrationID

Foreign keys for table 'Production.ProductModelIllustration', 2 items

ForeignPrimaryKey Name
ProductModelIllustration.IllustrationIDIllustration.IllustrationIDFK_ProductModelIllustration_Illustration_IllustrationID
ProductModelIllustration.ProductModelIDProductModel.ProductModelIDFK_ProductModelIllustration_ProductModel_ProductModelID

Indexes for table 'Production.ProductModelIllustration', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductModelIllustration_ProductModelID_IllustrationIDClustered index created by a primary key constraint.YesYesProductModelID, IllustrationID

Triggers for table 'Production.ProductModelIllustration', 1 item

NameDescriptionTypeEnabled
uProductModelIllustrationAFTER UPDATE trigger setting the ModifiedDate column in the ProductModelIllustration table to the current date.after Update Yes

Dependencies for table 'Production.ProductModelIllustration', 1 item

Object NameTypeField Name
Production.uProductModelIllustrationtriggerN/A

Table: 'Production.ProductModelProductDescriptionCulture'

4 fields. 36 bytes.

Cross-reference table mapping product descriptions and the language the description is written in.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductModelIDint   Not nullPrimary key. Foreign key to ProductModel.ProductModelID. 
ProductDescriptionIDint   Not nullPrimary key. Foreign key to ProductDescription.ProductDescriptionID. 
CultureIDnchar6  Not nullCulture identification number. Foreign key to Culture.CultureID. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductModelProductDescriptionCulture'

Primary Key NameField Names
PK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptionID_CultureIDProductModelID, ProductDescriptionID, CultureID

Foreign keys for table 'Production.ProductModelProductDescriptionCulture', 3 items

ForeignPrimaryKey Name
ProductModelProductDescriptionCulture.CultureIDCulture.CultureIDFK_ProductModelProductDescriptionCulture_Culture_CultureID
ProductModelProductDescriptionCulture.ProductDescriptionIDProductDescription.ProductDescriptionIDFK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID
ProductModelProductDescriptionCulture.ProductModelIDProductModel.ProductModelIDFK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID

Indexes for table 'Production.ProductModelProductDescriptionCulture', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptionID_CultureIDClustered index created by a primary key constraint.YesYesProductModelID, ProductDescriptionID, CultureID

Triggers for table 'Production.ProductModelProductDescriptionCulture', 1 item

NameDescriptionTypeEnabled
uProductModelProductDescriptionCultureAFTER UPDATE trigger setting the ModifiedDate column in the ProductModelProductDescriptionCulture table to the current date.after Update Yes

Dependencies for table 'Production.ProductModelProductDescriptionCulture', 2 items

Object NameTypeField Name
Production.uProductModelProductDescriptionCulturetriggerN/A
Production.vProductAndDescriptionviewN/A

Table: 'Production.ProductPhoto'

6 fields. 220 bytes.

Product images.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductPhotoIDint identity int Not nullPrimary key for ProductPhoto records. 
ThumbNailPhotovarbinary   NullSmall image of the product. 
ThumbnailPhotoFileNamenvarchar50  NullSmall image file name. 
LargePhotovarbinary   NullLarge image of the product. 
LargePhotoFileNamenvarchar50  NullLarge image file name. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductPhoto'

Primary Key NameField Name
PK_ProductPhoto_ProductPhotoIDProductPhotoID
There are no Foreign Keys for this table.

Indexes for table 'Production.ProductPhoto', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductPhoto_ProductPhotoIDClustered index created by a primary key constraint.YesYesProductPhotoID

Triggers for table 'Production.ProductPhoto', 1 item

NameDescriptionTypeEnabled
uProductPhotoAFTER UPDATE trigger setting the ModifiedDate column in the ProductPhoto table to the current date.after Update Yes

Dependencies for table 'Production.ProductPhoto', 1 item

Object NameTypeField Name
Production.uProductPhototriggerN/A

Table: 'Production.ProductProductPhoto'

4 fields. 25 bytes.

Cross-reference table mapping products and product photos.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
ProductPhotoIDint   Not nullProduct photo identification number. Foreign key to ProductPhoto.ProductPhotoID. 
PrimaryFlag bit(0)Not null0 = Photo is not the principal image. 1 = Photo is the principal image. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductProductPhoto'

Primary Key NameField Names
PK_ProductProductPhoto_ProductID_ProductPhotoIDProductID, ProductPhotoID

Foreign keys for table 'Production.ProductProductPhoto', 2 items

ForeignPrimaryKey Name
ProductProductPhoto.ProductIDProduct.ProductIDFK_ProductProductPhoto_Product_ProductID
ProductProductPhoto.ProductPhotoIDProductPhoto.ProductPhotoIDFK_ProductProductPhoto_ProductPhoto_ProductPhotoID

Indexes for table 'Production.ProductProductPhoto', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ProductProductPhoto_ProductID_ProductPhotoIDNonclustered index created by a primary key constraint.NoYesProductID, ProductPhotoID

Triggers for table 'Production.ProductProductPhoto', 1 item

NameDescriptionTypeEnabled
uProductProductPhotoAFTER UPDATE trigger setting the ModifiedDate column in the ProductProductPhoto table to the current date.after Update Yes

Dependencies for table 'Production.ProductProductPhoto', 1 item

Object NameTypeField Name
Production.uProductProductPhototriggerN/A

Table: 'Production.ProductReview'

8 fields. 7944 bytes.

Customer reviews of products they have purchased.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductReviewIDint identity int Not nullPrimary key for ProductReview records. 
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
ReviewerNameName nvarchar(50) Not nullName of the reviewer. 
ReviewDatedatetime  getdate()Not nullDate review was submitted. 
EmailAddressnvarchar50  Not nullReviewer's e-mail address. 
Ratingint   Not nullProduct rating given by the reviewer. Scale is 1 to 5 with 5 as the highest rating.([Rating]>=(1) AND [Rating]<=(5))
Commentsnvarchar3850  NullReviewer's comments 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ProductReview'

Primary Key NameField Name
PK_ProductReview_ProductReviewIDProductReviewID

Foreign keys for table 'Production.ProductReview', 1 item

ForeignPrimaryKey Name
ProductReview.ProductIDProduct.ProductIDFK_ProductReview_Product_ProductID

Indexes for table 'Production.ProductReview', 2 items

Index NameDescriptionClusteredUniqueFields
PK_ProductReview_ProductReviewIDClustered index created by a primary key constraint.YesYesProductReviewID
IX_ProductReview_ProductID_NameNonclustered index.NoNoProductID, ReviewerName

Triggers for table 'Production.ProductReview', 1 item

NameDescriptionTypeEnabled
uProductReviewAFTER UPDATE trigger setting the ModifiedDate column in the ProductReview table to the current date.after Update Yes

Dependencies for table 'Production.ProductReview', 2 items

Object NameTypeField Name
Production.CK_ProductReview_Ratingcheck cnsN/A
Production.uProductReviewtriggerN/A

Table: 'Production.ProductSubcategory'

5 fields. 140 bytes.

Product subcategories. See ProductCategory table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductSubcategoryIDint identity int Not nullPrimary key for ProductSubcategory records. 
ProductCategoryIDint   Not nullProduct category identification number. Foreign key to ProductCategory.ProductCategoryID. 
NameName nvarchar(50) Not nullSubcategory description. 
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 'Production.ProductSubcategory'

Primary Key NameField Name
PK_ProductSubcategory_ProductSubcategoryIDProductSubcategoryID

Foreign keys for table 'Production.ProductSubcategory', 1 item

ForeignPrimaryKey Name
ProductSubcategory.ProductCategoryIDProductCategory.ProductCategoryIDFK_ProductSubcategory_ProductCategory_ProductCategoryID

Indexes for table 'Production.ProductSubcategory', 3 items

Index NameDescriptionClusteredUniqueFields
PK_ProductSubcategory_ProductSubcategoryIDClustered index created by a primary key constraint.YesYesProductSubcategoryID
AK_ProductSubcategory_NameUnique nonclustered index.NoYesName
AK_ProductSubcategory_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Production.ProductSubcategory', 1 item

NameDescriptionTypeEnabled
uProductSubcategoryAFTER UPDATE trigger setting the ModifiedDate column in the ProductSubcategory table to the current date.after Update Yes

Dependencies for table 'Production.ProductSubcategory', 1 item

Object NameTypeField Name
Production.uProductSubcategorytriggerN/A

Table: 'Production.ScrapReason'

3 fields. 118 bytes.

Manufacturing failure reasons lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ScrapReasonIDsmallint identity smallint Not nullPrimary key for ScrapReason records. 
NameName nvarchar(50) Not nullFailure description. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.ScrapReason'

Primary Key NameField Name
PK_ScrapReason_ScrapReasonIDScrapReasonID
There are no Foreign Keys for this table.

Indexes for table 'Production.ScrapReason', 2 items

Index NameDescriptionClusteredUniqueFields
PK_ScrapReason_ScrapReasonIDClustered index created by a primary key constraint.YesYesScrapReasonID
AK_ScrapReason_NameUnique nonclustered index.NoYesName

Triggers for table 'Production.ScrapReason', 1 item

NameDescriptionTypeEnabled
uScrapReasonAFTER UPDATE trigger setting the ModifiedDate column in the ScrapReason table to the current date.after Update Yes

Dependencies for table 'Production.ScrapReason', 1 item

Object NameTypeField Name
Production.uScrapReasontriggerN/A

Table: 'Production.TransactionHistory'

9 fields. 75 bytes.

Record of each purchase order, sales order, or work order transaction year to date.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
TransactionIDint identity int Not nullPrimary key for TransactionHistory records. 
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
ReferenceOrderIDint   Not nullPurchase order, sales order, or work order identification number. 
ReferenceOrderLineIDint  (0)Not nullLine number associated with the purchase order, sales order, or work order. 
TransactionDatedatetime  getdate()Not nullDate and time of the transaction. 
TransactionTypenchar1  Not nullW = WorkOrder, S = SalesOrder, P = PurchaseOrder(upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W')
Quantityint   Not nullProduct quantity. 
ActualCostmoney19,4decimal(19,4) Not nullProduct cost. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.TransactionHistory'

Primary Key NameField Name
PK_TransactionHistory_TransactionIDTransactionID

Foreign keys for table 'Production.TransactionHistory', 1 item

ForeignPrimaryKey Name
TransactionHistory.ProductIDProduct.ProductIDFK_TransactionHistory_Product_ProductID

Indexes for table 'Production.TransactionHistory', 3 items

Index NameDescriptionClusteredUniqueFields
PK_TransactionHistory_TransactionIDClustered index created by a primary key constraint.YesYesTransactionID
IX_TransactionHistory_ProductIDNonclustered index.NoNoProductID
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineIDNonclustered index.NoNoReferenceOrderID, ReferenceOrderLineID

Triggers for table 'Production.TransactionHistory', 1 item

NameDescriptionTypeEnabled
uTransactionHistoryAFTER UPDATE trigger setting the ModifiedDate column in the TransactionHistory table to the current date.after Update Yes

Dependencies for table 'Production.TransactionHistory', 7 items

Object NameTypeField Name
Production.CK_TransactionHistory_TransactionTypecheck cnsN/A
Production.iWorkOrdertriggerN/A
Production.uTransactionHistorytriggerN/A
Production.uWorkOrdertriggerN/A
Purchasing.iPurchaseOrderDetailtriggerN/A
Purchasing.uPurchaseOrderDetailtriggerN/A
Sales.iduSalesOrderDetailtriggerN/A

Table: 'Production.TransactionHistoryArchive'

9 fields. 75 bytes.

Transactions for previous years.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
TransactionIDint   Not nullPrimary key for TransactionHistoryArchive records. 
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
ReferenceOrderIDint   Not nullPurchase order, sales order, or work order identification number. 
ReferenceOrderLineIDint  (0)Not nullLine number associated with the purchase order, sales order, or work order. 
TransactionDatedatetime  getdate()Not nullDate and time of the transaction. 
TransactionTypenchar1  Not nullW = Work Order, S = Sales Order, P = Purchase Order(upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W')
Quantityint   Not nullProduct quantity. 
ActualCostmoney19,4decimal(19,4) Not nullProduct cost. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.TransactionHistoryArchive'

Primary Key NameField Name
PK_TransactionHistoryArchive_TransactionIDTransactionID
There are no Foreign Keys for this table.

Indexes for table 'Production.TransactionHistoryArchive', 3 items

Index NameDescriptionClusteredUniqueFields
PK_TransactionHistoryArchive_TransactionIDClustered index created by a primary key constraint.YesYesTransactionID
IX_TransactionHistoryArchive_ProductIDNonclustered index.NoNoProductID
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineIDNonclustered index.NoNoReferenceOrderID, ReferenceOrderLineID

Triggers for table 'Production.TransactionHistoryArchive', 1 item

NameDescriptionTypeEnabled
uTransactionHistoryArchiveAFTER UPDATE trigger setting the ModifiedDate column in the TransactionHistoryArchive table to the current date.after Update Yes

Dependencies for table 'Production.TransactionHistoryArchive', 2 items

Object NameTypeField Name
Production.CK_TransactionHistoryArchive_TransactionTypecheck cnsN/A
Production.uTransactionHistoryArchivetriggerN/A

Table: 'Production.UnitMeasure'

3 fields. 122 bytes.

Unit of measure lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
UnitMeasureCodenchar3  Not nullPrimary key. 
NameName nvarchar(50) Not nullUnit of measure description. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.UnitMeasure'

Primary Key NameField Name
PK_UnitMeasure_UnitMeasureCodeUnitMeasureCode
There are no Foreign Keys for this table.

Indexes for table 'Production.UnitMeasure', 2 items

Index NameDescriptionClusteredUniqueFields
PK_UnitMeasure_UnitMeasureCodeClustered index created by a primary key constraint.YesYesUnitMeasureCode
AK_UnitMeasure_NameUnique nonclustered index.NoYesName

Triggers for table 'Production.UnitMeasure', 1 item

NameDescriptionTypeEnabled
uUnitMeasureAFTER UPDATE trigger setting the ModifiedDate column in the UnitMeasure table to the current date.after Update Yes

Dependencies for table 'Production.UnitMeasure', 1 item

Object NameTypeField Name
Production.uUnitMeasuretriggerN/A

Table: 'Production.WorkOrder'

10 fields. 84 bytes.

Manufacturing work orders.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
WorkOrderIDint identity int Not nullPrimary key for WorkOrder records. 
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
OrderQtyint   Not nullProduct quantity to build.([OrderQty]>(0))
StockedQtyint   Not nullQuantity built and put in inventory. 
ScrappedQtysmallint   Not nullQuantity that failed inspection.([ScrappedQty]>=(0))
StartDatedatetime   Not nullWork order start date. 
EndDatedatetime   NullWork order end date. 
DueDatedatetime   Not nullWork order due date. 
ScrapReasonIDsmallint   NullReason for inspection failure. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.WorkOrder'

Primary Key NameField Name
PK_WorkOrder_WorkOrderIDWorkOrderID

Foreign keys for table 'Production.WorkOrder', 2 items

ForeignPrimaryKey Name
WorkOrder.ProductIDProduct.ProductIDFK_WorkOrder_Product_ProductID
WorkOrder.ScrapReasonIDScrapReason.ScrapReasonIDFK_WorkOrder_ScrapReason_ScrapReasonID

Indexes for table 'Production.WorkOrder', 3 items

Index NameDescriptionClusteredUniqueFields
PK_WorkOrder_WorkOrderIDClustered index created by a primary key constraint.YesYesWorkOrderID
IX_WorkOrder_ProductIDNonclustered index.NoNoProductID
IX_WorkOrder_ScrapReasonIDNonclustered index.NoNoScrapReasonID

Triggers for table 'Production.WorkOrder', 2 items

NameDescriptionTypeEnabled
iWorkOrderAFTER INSERT trigger that inserts a row in the TransactionHistory table.after Insert Yes
uWorkOrderAFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder table.after Update Yes

Dependencies for table 'Production.WorkOrder', 2 items

Object NameTypeField Name
Production.WorkOrderuser tableOrderQty
Production.WorkOrderuser tableScrappedQty

Table: 'Production.WorkOrderRouting'

12 fields. 145 bytes.

Work order details.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
WorkOrderIDint   Not nullPrimary key. Foreign key to WorkOrder.WorkOrderID. 
ProductIDint   Not nullPrimary key. Foreign key to Product.ProductID. 
OperationSequencesmallint   Not nullPrimary key. Indicates the manufacturing process sequence. 
LocationIDsmallint   Not nullManufacturing location where the part is processed. Foreign key to Location.LocationID. 
ScheduledStartDatedatetime   Not nullPlanned manufacturing start date. 
ScheduledEndDatedatetime   Not nullPlanned manufacturing end date. 
ActualStartDatedatetime   NullActual start date. 
ActualEndDatedatetime   NullActual end date. 
ActualResourceHrsdecimal9,4  NullNumber of manufacturing hours used.([ActualResourceHrs]>=(0.0000))
PlannedCostmoney19,4decimal(19,4) Not nullEstimated manufacturing cost.([PlannedCost]>(0.00))
ActualCostmoney19,4decimal(19,4) NullActual manufacturing cost.([ActualCost]>(0.00))
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.WorkOrderRouting'

Primary Key NameField Names
PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequenceWorkOrderID, ProductID, OperationSequence

Foreign keys for table 'Production.WorkOrderRouting', 2 items

ForeignPrimaryKey Name
WorkOrderRouting.LocationIDLocation.LocationIDFK_WorkOrderRouting_Location_LocationID
WorkOrderRouting.WorkOrderIDWorkOrder.WorkOrderIDFK_WorkOrderRouting_WorkOrder_WorkOrderID

Indexes for table 'Production.WorkOrderRouting', 2 items

Index NameDescriptionClusteredUniqueFields
PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequenceClustered index created by a primary key constraint.YesYesWorkOrderID, ProductID, OperationSequence
IX_WorkOrderRouting_ProductIDNonclustered index.NoNoProductID

Triggers for table 'Production.WorkOrderRouting', 1 item

NameDescriptionTypeEnabled
uWorkOrderRoutingAFTER UPDATE trigger setting the ModifiedDate column in the WorkOrderRouting table to the current date.after Update Yes

Dependencies for table 'Production.WorkOrderRouting', 6 items

Object NameTypeField Name
Production.CK_WorkOrderRouting_ActualCostcheck cnsN/A
Production.CK_WorkOrderRouting_ActualEndDatecheck cnsN/A
Production.CK_WorkOrderRouting_ActualResourceHrscheck cnsN/A
Production.CK_WorkOrderRouting_PlannedCostcheck cnsN/A
Production.CK_WorkOrderRouting_ScheduledEndDatecheck cnsN/A
Production.uWorkOrderRoutingtriggerN/A

Table: 'Purchasing.ProductVendor'

11 fields. 104 bytes.

Cross-reference table mapping vendors with the products they supply.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ProductIDint   Not nullPrimary key. Foreign key to Product.ProductID. 
VendorIDint   Not nullPrimary key. Foreign key to Vendor.VendorID. 
AverageLeadTimeint   Not nullThe average span of time (in days) between placing an order with the vendor and receiving the purchased product.([AverageLeadTime]>=(1))
StandardPricemoney19,4decimal(19,4) Not nullThe vendor's usual selling price.([StandardPrice]>(0.00))
LastReceiptCostmoney19,4decimal(19,4) NullThe selling price when last purchased.([LastReceiptCost]>(0.00))
LastReceiptDatedatetime   NullDate the product was last received by the vendor. 
MinOrderQtyint   Not nullThe maximum quantity that should be ordered.([MinOrderQty]>=(1))
MaxOrderQtyint   Not nullThe minimum quantity that should be ordered.([MaxOrderQty]>=(1))
OnOrderQtyint   NullThe quantity currently on order.([OnOrderQty]>=(0))
UnitMeasureCodenchar3  Not nullThe product's unit of measure. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Purchasing.ProductVendor'

Primary Key NameField Names
PK_ProductVendor_ProductID_VendorIDProductID, VendorID

Foreign keys for table 'Purchasing.ProductVendor', 3 items

ForeignPrimaryKey Name
ProductVendor.ProductIDProduct.ProductIDFK_ProductVendor_Product_ProductID
ProductVendor.UnitMeasureCodeUnitMeasure.UnitMeasureCodeFK_ProductVendor_UnitMeasure_UnitMeasureCode
ProductVendor.VendorIDVendor.VendorIDFK_ProductVendor_Vendor_VendorID

Indexes for table 'Purchasing.ProductVendor', 3 items

Index NameDescriptionClusteredUniqueFields
PK_ProductVendor_ProductID_VendorIDClustered index created by a primary key constraint.YesYesProductID, VendorID
IX_ProductVendor_UnitMeasureCodeNonclustered index.NoNoUnitMeasureCode
IX_ProductVendor_VendorIDNonclustered index.NoNoVendorID

Triggers for table 'Purchasing.ProductVendor', 1 item

NameDescriptionTypeEnabled
uProductVendorAFTER UPDATE trigger setting the ModifiedDate column in the ProductVendor table to the current date.after Update Yes

Dependencies for table 'Purchasing.ProductVendor', 7 items

Object NameTypeField Name
Purchasing.CK_ProductVendor_AverageLeadTimecheck cnsN/A
Purchasing.CK_ProductVendor_LastReceiptCostcheck cnsN/A
Purchasing.CK_ProductVendor_MaxOrderQtycheck cnsN/A
Purchasing.CK_ProductVendor_MinOrderQtycheck cnsN/A
Purchasing.CK_ProductVendor_OnOrderQtycheck cnsN/A
Purchasing.CK_ProductVendor_StandardPricecheck cnsN/A
Purchasing.uProductVendortriggerN/A

Table: 'Purchasing.PurchaseOrderDetail'

11 fields. 119 bytes.

Individual products associated with a specific purchase order. See PurchaseOrderHeader.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
PurchaseOrderIDint   Not nullPrimary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID. 
PurchaseOrderDetailIDint identity int Not nullPrimary key. One line number per purchased product. 
DueDatedatetime   Not nullDate the product is expected to be received. 
OrderQtysmallint   Not nullQuantity ordered.([OrderQty]>(0))
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
UnitPricemoney19,4decimal(19,4) Not nullVendor's selling price of a single product.([UnitPrice]>=(0.00))
LineTotalmoney19,4decimal(19,4) Not nullPer product subtotal. Computed as OrderQty * UnitPrice. 
ReceivedQtydecimal8,2  Not nullQuantity actually received from the vendor.([ReceivedQty]>=(0.00))
RejectedQtydecimal8,2  Not nullQuantity rejected during inspection.([RejectedQty]>=(0.00))
StockedQtydecimal9,2  Not nullQuantity accepted into inventory. Computed as ReceivedQty - RejectedQty. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Purchasing.PurchaseOrderDetail'

Primary Key NameField Names
PK_PurchaseOrderDetail_PurchaseOrderID_PurchaseOrderDetailIDPurchaseOrderID, PurchaseOrderDetailID

Foreign keys for table 'Purchasing.PurchaseOrderDetail', 2 items

ForeignPrimaryKey Name
PurchaseOrderDetail.ProductIDProduct.ProductIDFK_PurchaseOrderDetail_Product_ProductID
PurchaseOrderDetail.PurchaseOrderIDPurchaseOrderHeader.PurchaseOrderIDFK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID

Indexes for table 'Purchasing.PurchaseOrderDetail', 2 items

Index NameDescriptionClusteredUniqueFields
PK_PurchaseOrderDetail_PurchaseOrderID_PurchaseOrderDetailIDClustered index created by a primary key constraint.YesYesPurchaseOrderID, PurchaseOrderDetailID
IX_PurchaseOrderDetail_ProductIDNonclustered index.NoNoProductID

Triggers for table 'Purchasing.PurchaseOrderDetail', 2 items

NameDescriptionTypeEnabled
iPurchaseOrderDetailAFTER INSERT trigger that inserts a row in the TransactionHistory table and updates the PurchaseOrderHeader.SubTotal column.after Insert Yes
uPurchaseOrderDetailAFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in PurchaseOrderDetail and updates the PurchaseOrderHeader.SubTotal column.after Update Yes

Dependencies for table 'Purchasing.PurchaseOrderDetail', 4 items

Object NameTypeField Name
Purchasing.PurchaseOrderDetailuser tableOrderQty
Purchasing.PurchaseOrderDetailuser tableUnitPrice
Purchasing.PurchaseOrderDetailuser tableReceivedQty
Purchasing.PurchaseOrderDetailuser tableRejectedQty

Table: 'Purchasing.PurchaseOrderHeader'

13 fields. 150 bytes.

General purchase order information. See PurchaseOrderDetail.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
PurchaseOrderIDint identity int Not nullPrimary key. 
RevisionNumbertinyint  (0)Not nullIncremental number to track changes to the purchase order over time. 
Statustinyint  (1)Not nullOrder current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete([Status]>=(1) AND [Status]<=(4))
EmployeeIDint   Not nullEmployee who created the purchase order. Foreign key to Employee.EmployeeID. 
VendorIDint   Not nullVendor with whom the purchase order is placed. Foreign key to Vendor.VendorID. 
ShipMethodIDint   Not nullShipping method. Foreign key to ShipMethod.ShipMethodID. 
OrderDatedatetime  getdate()Not nullPurchase order creation date. 
ShipDatedatetime   NullEstimated shipment date from the vendor. 
SubTotalmoney19,4decimal(19,4)(0.00)Not nullPurchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID.([SubTotal]>=(0.00))
TaxAmtmoney19,4decimal(19,4)(0.00)Not nullTax amount.([TaxAmt]>=(0.00))
Freightmoney19,4decimal(19,4)(0.00)Not nullShipping cost.([Freight]>=(0.00))
TotalDuemoney19,4decimal(19,4) Not nullTotal due to vendor. Computed as Subtotal + TaxAmt + Freight. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Purchasing.PurchaseOrderHeader'

Primary Key NameField Name
PK_PurchaseOrderHeader_PurchaseOrderIDPurchaseOrderID

Foreign keys for table 'Purchasing.PurchaseOrderHeader', 3 items

ForeignPrimaryKey Name
PurchaseOrderHeader.EmployeeIDEmployee.EmployeeIDFK_PurchaseOrderHeader_Employee_EmployeeID
PurchaseOrderHeader.ShipMethodIDShipMethod.ShipMethodIDFK_PurchaseOrderHeader_ShipMethod_ShipMethodID
PurchaseOrderHeader.VendorIDVendor.VendorIDFK_PurchaseOrderHeader_Vendor_VendorID

Indexes for table 'Purchasing.PurchaseOrderHeader', 3 items

Index NameDescriptionClusteredUniqueFields
PK_PurchaseOrderHeader_PurchaseOrderIDClustered index created by a primary key constraint.YesYesPurchaseOrderID
IX_PurchaseOrderHeader_EmployeeIDNonclustered index.NoNoEmployeeID
IX_PurchaseOrderHeader_VendorIDNonclustered index.NoNoVendorID

Triggers for table 'Purchasing.PurchaseOrderHeader', 1 item

NameDescriptionTypeEnabled
uPurchaseOrderHeaderAFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the PurchaseOrderHeader table.after Update Yes

Dependencies for table 'Purchasing.PurchaseOrderHeader', 3 items

Object NameTypeField Name
Purchasing.PurchaseOrderHeaderuser tableSubTotal
Purchasing.PurchaseOrderHeaderuser tableTaxAmt
Purchasing.PurchaseOrderHeaderuser tableFreight

Table: 'Purchasing.ShipMethod'

6 fields. 178 bytes.

Shipping company lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ShipMethodIDint identity int Not nullPrimary key for ShipMethod records. 
NameName nvarchar(50) Not nullShipping company name. 
ShipBasemoney19,4decimal(19,4)(0.00)Not nullMinimum shipping charge.([ShipBase]>(0.00))
ShipRatemoney19,4decimal(19,4)(0.00)Not nullShipping charge per pound.([ShipRate]>(0.00))
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 'Purchasing.ShipMethod'

Primary Key NameField Name
PK_ShipMethod_ShipMethodIDShipMethodID
There are no Foreign Keys for this table.

Indexes for table 'Purchasing.ShipMethod', 3 items

Index NameDescriptionClusteredUniqueFields
PK_ShipMethod_ShipMethodIDClustered index created by a primary key constraint.YesYesShipMethodID
AK_ShipMethod_NameUnique nonclustered index.NoYesName
AK_ShipMethod_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Purchasing.ShipMethod', 1 item

NameDescriptionTypeEnabled
uShipMethodAFTER UPDATE trigger setting the ModifiedDate column in the ShipMethod table to the current date.after Update Yes

Dependencies for table 'Purchasing.ShipMethod', 3 items

Object NameTypeField Name
Purchasing.CK_ShipMethod_ShipBasecheck cnsN/A
Purchasing.CK_ShipMethod_ShipRatecheck cnsN/A
Purchasing.uShipMethodtriggerN/A

Table: 'Purchasing.Vendor'

8 fields. 2201 bytes.

Companies from whom Adventure Works Cycles purchases parts or other goods.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
VendorIDint identity int Not nullPrimary key for Vendor records. 
AccountNumberAccountNumber nvarchar(15) Not nullVendor account (identification) number. 
NameName nvarchar(50) Not nullCompany name. 
CreditRatingtinyint   Not null1 = Superior, 2 = Excellent, 3 = Above average, 4 = Average, 5 = Below average([CreditRating]>=(1) AND [CreditRating]<=(5))
PreferredVendorStatusFlag bit(1)Not null0 = Do not use if another vendor is available. 1 = Preferred over other vendors supplying the same product. 
ActiveFlagFlag bit(1)Not null0 = Vendor no longer used. 1 = Vendor is actively used. 
PurchasingWebServiceURLnvarchar1024  NullVendor URL. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Purchasing.Vendor'

Primary Key NameField Name
PK_Vendor_VendorIDVendorID
There are no Foreign Keys for this table.

Indexes for table 'Purchasing.Vendor', 2 items

Index NameDescriptionClusteredUniqueFields
PK_Vendor_VendorIDClustered index created by a primary key constraint.YesYesVendorID
AK_Vendor_AccountNumberUnique nonclustered index.NoYesAccountNumber

Triggers for table 'Purchasing.Vendor', 2 items

NameDescriptionTypeEnabled
dVendorINSTEAD OF DELETE trigger which keeps Vendors from being deleted.instead of Delete Yes
uVendorAFTER UPDATE trigger setting the ModifiedDate column in the Vendor table to the current date.after Update Yes

Dependencies for table 'Purchasing.Vendor', 3 items

Object NameTypeField Name
Purchasing.CK_Vendor_CreditRatingcheck cnsN/A
Purchasing.uVendortriggerN/A
Purchasing.vVendorviewN/A

Table: 'Purchasing.VendorAddress'

4 fields. 28 bytes.

Cross-reference mapping vendors and addresses.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
VendorIDint   Not nullPrimary key. Foreign key to Vendor.VendorID. 
AddressIDint   Not nullPrimary key. Foreign key to Address.AddressID. 
AddressTypeIDint   Not nullAddress type. Foreign key to AddressType.AddressTypeID. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Purchasing.VendorAddress'

Primary Key NameField Names
PK_VendorAddress_VendorID_AddressIDVendorID, AddressID

Foreign keys for table 'Purchasing.VendorAddress', 3 items

ForeignPrimaryKey Name
VendorAddress.AddressIDAddress.AddressIDFK_VendorAddress_Address_AddressID
VendorAddress.AddressTypeIDAddressType.AddressTypeIDFK_VendorAddress_AddressType_AddressTypeID
VendorAddress.VendorIDVendor.VendorIDFK_VendorAddress_Vendor_VendorID

Indexes for table 'Purchasing.VendorAddress', 2 items

Index NameDescriptionClusteredUniqueFields
PK_VendorAddress_VendorID_AddressIDClustered index created by a primary key constraint.YesYesVendorID, AddressID
IX_VendorAddress_AddressIDNonclustered index.NoNoAddressID

Triggers for table 'Purchasing.VendorAddress', 1 item

NameDescriptionTypeEnabled
uVendorAddressAFTER UPDATE trigger setting the ModifiedDate column in the VendorAddress table to the current date.after Update Yes

Dependencies for table 'Purchasing.VendorAddress', 2 items

Object NameTypeField Name
Purchasing.uVendorAddresstriggerN/A
Purchasing.vVendorviewN/A

Table: 'Purchasing.VendorContact'

4 fields. 28 bytes.

Cross-reference table mapping vendors and their employees.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
VendorIDint   Not nullPrimary key. 
ContactIDint   Not nullContact (Vendor employee) identification number. Foreign key to Contact.ContactID. 
ContactTypeIDint   Not nullContact type such as sales manager, or sales agent. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Purchasing.VendorContact'

Primary Key NameField Names
PK_VendorContact_VendorID_ContactIDVendorID, ContactID

Foreign keys for table 'Purchasing.VendorContact', 3 items

ForeignPrimaryKey Name
VendorContact.ContactIDContact.ContactIDFK_VendorContact_Contact_ContactID
VendorContact.ContactTypeIDContactType.ContactTypeIDFK_VendorContact_ContactType_ContactTypeID
VendorContact.VendorIDVendor.VendorIDFK_VendorContact_Vendor_VendorID

Indexes for table 'Purchasing.VendorContact', 3 items

Index NameDescriptionClusteredUniqueFields
PK_VendorContact_VendorID_ContactIDClustered index created by a primary key constraint.YesYesVendorID, ContactID
IX_VendorContact_ContactIDNonclustered index.NoNoContactID
IX_VendorContact_ContactTypeIDNonclustered index.NoNoContactTypeID

Triggers for table 'Purchasing.VendorContact', 1 item

NameDescriptionTypeEnabled
uVendorContactAFTER UPDATE trigger setting the ModifiedDate column in the VendorContact table to the current date.after Update Yes

Dependencies for table 'Purchasing.VendorContact', 3 items

Object NameTypeField Name
dbo.ufnGetContactInformationtable functionN/A
Purchasing.uVendorContacttriggerN/A
Purchasing.vVendorviewN/A

Table: 'Sales.ContactCreditCard'

3 fields. 24 bytes.

Cross-reference table mapping customers in the Contact table to their credit card information in the CreditCard table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ContactIDint   Not nullCustomer identification number. Foreign key to Contact.ContactID. 
CreditCardIDint   Not nullCredit card identification number. Foreign key to CreditCard.CreditCardID. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.ContactCreditCard'

Primary Key NameField Names
PK_ContactCreditCard_ContactID_CreditCardIDContactID, CreditCardID

Foreign keys for table 'Sales.ContactCreditCard', 2 items

ForeignPrimaryKey Name
ContactCreditCard.ContactIDContact.ContactIDFK_ContactCreditCard_Contact_ContactID
ContactCreditCard.CreditCardIDCreditCard.CreditCardIDFK_ContactCreditCard_CreditCard_CreditCardID

Indexes for table 'Sales.ContactCreditCard', 1 item

Index NameDescriptionClusteredUniqueFields
PK_ContactCreditCard_ContactID_CreditCardIDClustered index created by a primary key constraint.YesYesContactID, CreditCardID

Triggers for table 'Sales.ContactCreditCard', 1 item

NameDescriptionTypeEnabled
uContactCreditCardAFTER UPDATE trigger setting the ModifiedDate column in the ContactCreditCard table to the current date.after Update Yes

Dependencies for table 'Sales.ContactCreditCard', 1 item

Object NameTypeField Name
Sales.uContactCreditCardtriggerN/A

Table: 'Sales.CountryRegionCurrency'

3 fields. 28 bytes.

Cross-reference table mapping ISO currency codes to a country or region.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CountryRegionCodenvarchar3  Not nullISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode. 
CurrencyCodenchar3  Not nullISO standard currency code. Foreign key to Currency.CurrencyCode. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.CountryRegionCurrency'

Primary Key NameField Names
PK_CountryRegionCurrency_CountryRegionCode_CurrencyCodeCountryRegionCode, CurrencyCode

Foreign keys for table 'Sales.CountryRegionCurrency', 2 items

ForeignPrimaryKey Name
CountryRegionCurrency.CountryRegionCodeCountryRegion.CountryRegionCodeFK_CountryRegionCurrency_CountryRegion_CountryRegionCode
CountryRegionCurrency.CurrencyCodeCurrency.CurrencyCodeFK_CountryRegionCurrency_Currency_CurrencyCode

Indexes for table 'Sales.CountryRegionCurrency', 2 items

Index NameDescriptionClusteredUniqueFields
PK_CountryRegionCurrency_CountryRegionCode_CurrencyCodeClustered index created by a primary key constraint.YesYesCountryRegionCode, CurrencyCode
IX_CountryRegionCurrency_CurrencyCodeNonclustered index.NoNoCurrencyCode

Triggers for table 'Sales.CountryRegionCurrency', 1 item

NameDescriptionTypeEnabled
uCountryRegionCurrencyAFTER UPDATE trigger setting the ModifiedDate column in the CountryRegionCurrency table to the current date.after Update Yes

Dependencies for table 'Sales.CountryRegionCurrency', 1 item

Object NameTypeField Name
Sales.uCountryRegionCurrencytriggerN/A

Table: 'Sales.CreditCard'

6 fields. 173 bytes.

Customer credit card information.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CreditCardIDint identity int Not nullPrimary key for CreditCard records. 
CardTypenvarchar50  Not nullCredit card name. 
CardNumbernvarchar25  Not nullCredit card number. 
ExpMonthtinyint   Not nullCredit card expiration month. 
ExpYearsmallint   Not nullCredit card expiration year. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.CreditCard'

Primary Key NameField Name
PK_CreditCard_CreditCardIDCreditCardID
There are no Foreign Keys for this table.

Indexes for table 'Sales.CreditCard', 2 items

Index NameDescriptionClusteredUniqueFields
PK_CreditCard_CreditCardIDClustered index created by a primary key constraint.YesYesCreditCardID
AK_CreditCard_CardNumberUnique nonclustered index.NoYesCardNumber

Triggers for table 'Sales.CreditCard', 1 item

NameDescriptionTypeEnabled
uCreditCardAFTER UPDATE trigger setting the ModifiedDate column in the CreditCard table to the current date.after Update Yes

Dependencies for table 'Sales.CreditCard', 1 item

Object NameTypeField Name
Sales.uCreditCardtriggerN/A

Table: 'Sales.Currency'

3 fields. 122 bytes.

Lookup table containing standard ISO currencies.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CurrencyCodenchar3  Not nullThe ISO code for the Currency. 
NameName nvarchar(50) Not nullCurrency name. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.Currency'

Primary Key NameField Name
PK_Currency_CurrencyCodeCurrencyCode
There are no Foreign Keys for this table.

Indexes for table 'Sales.Currency', 2 items

Index NameDescriptionClusteredUniqueFields
PK_Currency_CurrencyCodeClustered index created by a primary key constraint.YesYesCurrencyCode
AK_Currency_NameUnique nonclustered index.NoYesName

Triggers for table 'Sales.Currency', 1 item

NameDescriptionTypeEnabled
uCurrencyAFTER UPDATE trigger setting the ModifiedDate column in the Currency table to the current date.after Update Yes

Dependencies for table 'Sales.Currency', 1 item

Object NameTypeField Name
Sales.uCurrencytriggerN/A

Table: 'Sales.CurrencyRate'

7 fields. 90 bytes.

Currency exchange rates.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CurrencyRateIDint identity int Not nullPrimary key for CurrencyRate records. 
CurrencyRateDatedatetime   Not nullDate and time the exchange rate was obtained. 
FromCurrencyCodenchar3  Not nullExchange rate was converted from this currency code. 
ToCurrencyCodenchar3  Not nullExchange rate was converted to this currency code. 
AverageRatemoney19,4decimal(19,4) Not nullAverage exchange rate for the day. 
EndOfDayRatemoney19,4decimal(19,4) Not nullFinal exchange rate for the day. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.CurrencyRate'

Primary Key NameField Name
PK_CurrencyRate_CurrencyRateIDCurrencyRateID

Foreign keys for table 'Sales.CurrencyRate', 2 items

ForeignPrimaryKey Name
CurrencyRate.FromCurrencyCodeCurrency.CurrencyCodeFK_CurrencyRate_Currency_FromCurrencyCode
CurrencyRate.ToCurrencyCodeCurrency.CurrencyCodeFK_CurrencyRate_Currency_ToCurrencyCode

Indexes for table 'Sales.CurrencyRate', 2 items

Index NameDescriptionClusteredUniqueFields
PK_CurrencyRate_CurrencyRateIDClustered index created by a primary key constraint.YesYesCurrencyRateID
AK_CurrencyRate_CurrencyRateDate_FromCurrencyCode_ToCurrencyCodeUnique nonclustered index.NoYesCurrencyRateDate, FromCurrencyCode, ToCurrencyCode

Triggers for table 'Sales.CurrencyRate', 1 item

NameDescriptionTypeEnabled
uCurrencyRateAFTER UPDATE trigger setting the ModifiedDate column in the CurrencyRate table to the current date.after Update Yes

Dependencies for table 'Sales.CurrencyRate', 1 item

Object NameTypeField Name
Sales.uCurrencyRatetriggerN/A

Table: 'Sales.Customer'

6 fields. 52 bytes.

Current customer information. Also see the Individual and Store tables.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CustomerIDint identity int Not nullPrimary key for Customer records. 
TerritoryIDint   NullID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID. 
AccountNumbervarchar10  Not nullUnique number identifying the customer assigned by the accounting system. 
CustomerTypenchar1  Not nullCustomer type: I = Individual, S = Store(upper([CustomerType])='I' OR upper([CustomerType])='S')
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 'Sales.Customer'

Primary Key NameField Name
PK_Customer_CustomerIDCustomerID

Foreign keys for table 'Sales.Customer', 1 item

ForeignPrimaryKey Name
Customer.TerritoryIDSalesTerritory.TerritoryIDFK_Customer_SalesTerritory_TerritoryID

Indexes for table 'Sales.Customer', 4 items

Index NameDescriptionClusteredUniqueFields
PK_Customer_CustomerIDClustered index created by a primary key constraint.YesYesCustomerID
AK_Customer_AccountNumberUnique nonclustered index.NoYesAccountNumber
AK_Customer_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
IX_Customer_TerritoryIDNonclustered index.NoNoTerritoryID

Triggers for table 'Sales.Customer', 1 item

NameDescriptionTypeEnabled
uCustomerAFTER UPDATE trigger setting the ModifiedDate column in the Customer table to the current date.after Update Yes

Dependencies for table 'Sales.Customer', 2 items

Object NameTypeField Name
dbo.ufnLeadingZerosscalar functionN/A
Sales.Customeruser tableCustomerID

Table: 'Sales.CustomerAddress'

5 fields. 44 bytes.

Cross-reference table mapping customers to their address(es).

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CustomerIDint   Not nullPrimary key. Foreign key to Customer.CustomerID. 
AddressIDint   Not nullPrimary key. Foreign key to Address.AddressID. 
AddressTypeIDint   Not nullAddress type. Foreign key to AddressType.AddressTypeID. 
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 'Sales.CustomerAddress'

Primary Key NameField Names
PK_CustomerAddress_CustomerID_AddressIDCustomerID, AddressID

Foreign keys for table 'Sales.CustomerAddress', 3 items

ForeignPrimaryKey Name
CustomerAddress.AddressIDAddress.AddressIDFK_CustomerAddress_Address_AddressID
CustomerAddress.AddressTypeIDAddressType.AddressTypeIDFK_CustomerAddress_AddressType_AddressTypeID
CustomerAddress.CustomerIDCustomer.CustomerIDFK_CustomerAddress_Customer_CustomerID

Indexes for table 'Sales.CustomerAddress', 2 items

Index NameDescriptionClusteredUniqueFields
PK_CustomerAddress_CustomerID_AddressIDClustered index created by a primary key constraint.YesYesCustomerID, AddressID
AK_CustomerAddress_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Sales.CustomerAddress', 1 item

NameDescriptionTypeEnabled
uCustomerAddressAFTER UPDATE trigger setting the ModifiedDate column in the CustomerAddress table to the current date.after Update Yes

Dependencies for table 'Sales.CustomerAddress', 3 items

Object NameTypeField Name
Sales.uCustomerAddresstriggerN/A
Sales.vIndividualCustomerviewN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Sales.Individual'

4 fields. 24 bytes.

Demographic data about customers that purchase Adventure Works products online.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CustomerIDint   Not nullUnique customer identification number. Foreign key to Customer.CustomerID. 
ContactIDint   Not nullIdentifies the customer in the Contact table. Foreign key to Contact.ContactID. 
Demographicsxml   NullPersonal information such as hobbies, and income collected from online shoppers. Used for sales analysis. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.Individual'

Primary Key NameField Name
PK_Individual_CustomerIDCustomerID

Foreign keys for table 'Sales.Individual', 2 items

ForeignPrimaryKey Name
Individual.ContactIDContact.ContactIDFK_Individual_Contact_ContactID
Individual.CustomerIDCustomer.CustomerIDFK_Individual_Customer_CustomerID

Indexes for table 'Sales.Individual', 1 item

Index NameDescriptionClusteredUniqueFields
PK_Individual_CustomerIDClustered index created by a primary key constraint.YesYesCustomerID

Triggers for table 'Sales.Individual', 1 item

NameDescriptionTypeEnabled
iuIndividualAFTER INSERT, UPDATE trigger inserting Individual only if the Customer does not exist in the Store table and setting the ModifiedDate column in the Individual table to the current date.after Insert Update Yes

Dependencies for table 'Sales.Individual', 6 items

Object NameTypeField Name
dbo.ufnGetContactInformationtable functionN/A
Sales.iduSalesOrderDetailtriggerN/A
Sales.iStoretriggerN/A
Sales.iuIndividualtriggerN/A
Sales.vIndividualCustomerviewN/A
Sales.vIndividualDemographicsviewN/A

Table: 'Sales.SalesOrderDetail'

11 fields. 182 bytes.

Individual products associated with a specific sales order. See SalesOrderHeader.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesOrderIDint   Not nullPrimary key. Foreign key to SalesOrderHeader.SalesOrderID. 
SalesOrderDetailIDint identity int Not nullPrimary key. One incremental unique number per product sold. 
CarrierTrackingNumbernvarchar25  NullShipment tracking number supplied by the shipper. 
OrderQtysmallint   Not nullQuantity ordered per product.([OrderQty]>(0))
ProductIDint   Not nullProduct sold to customer. Foreign key to Product.ProductID. 
SpecialOfferIDint   Not nullPromotional code. Foreign key to SpecialOffer.SpecialOfferID. 
UnitPricemoney19,4decimal(19,4) Not nullSelling price of a single product.([UnitPrice]>=(0.00))
UnitPriceDiscountmoney19,4decimal(19,4)(0.0)Not nullDiscount amount.([UnitPriceDiscount]>=(0.00))
LineTotalnumeric38,6  Not nullPer product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty. 
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 'Sales.SalesOrderDetail'

Primary Key NameField Names
PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailIDSalesOrderID, SalesOrderDetailID

Foreign keys for table 'Sales.SalesOrderDetail', 3 items

ForeignPrimaryKey Name
SalesOrderDetail.SalesOrderIDSalesOrderHeader.SalesOrderIDFK_SalesOrderDetail_SalesOrderHeader_SalesOrderID
SalesOrderDetail.SpecialOfferIDSpecialOfferProduct.SpecialOfferIDFK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID
SalesOrderDetail.ProductIDSpecialOfferProduct.ProductIDFK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID

Indexes for table 'Sales.SalesOrderDetail', 3 items

Index NameDescriptionClusteredUniqueFields
PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailIDClustered index created by a primary key constraint.YesYesSalesOrderID, SalesOrderDetailID
AK_SalesOrderDetail_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
IX_SalesOrderDetail_ProductIDNonclustered index.NoNoProductID

Triggers for table 'Sales.SalesOrderDetail', 1 item

NameDescriptionTypeEnabled
iduSalesOrderDetailAFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in SalesOrderDetail and updates the SalesOrderHeader.SubTotal column.after Insert Update Delete Yes

Dependencies for table 'Sales.SalesOrderDetail', 3 items

Object NameTypeField Name
Sales.SalesOrderDetailuser tableOrderQty
Sales.SalesOrderDetailuser tableUnitPrice
Sales.SalesOrderDetailuser tableUnitPriceDiscount

Table: 'Sales.SalesOrderHeader'

27 fields. 608 bytes.

General sales order information.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesOrderIDint identity int Not nullPrimary key. 
RevisionNumbertinyint  (0)Not nullIncremental number to track changes to the sales order over time. 
OrderDatedatetime  getdate()Not nullDates the sales order was created. 
DueDatedatetime   Not nullDate the order is due to the customer. 
ShipDatedatetime   NullDate the order was shipped to the customer. 
Statustinyint  (1)Not nullOrder current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled([Status]>=(0) AND [Status]<=(8))
OnlineOrderFlagFlag bit(1)Not null0 = Order placed by sales person. 1 = Order placed online by customer. 
SalesOrderNumbernvarchar25  Not nullUnique sales order identification number. 
PurchaseOrderNumberOrderNumber nvarchar(25) NullCustomer purchase order number reference.  
AccountNumberAccountNumber nvarchar(15) NullFinancial accounting number reference. 
CustomerIDint   Not nullCustomer identification number. Foreign key to Customer.CustomerID. 
ContactIDint   Not nullCustomer contact identification number. Foreign key to Contact.ContactID. 
SalesPersonIDint   NullSales person who created the sales order. Foreign key to SalesPerson.SalePersonID. 
TerritoryIDint   NullTerritory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID. 
BillToAddressIDint   Not nullCustomer billing address. Foreign key to Address.AddressID. 
ShipToAddressIDint   Not nullCustomer shipping address. Foreign key to Address.AddressID. 
ShipMethodIDint   Not nullShipping method. Foreign key to ShipMethod.ShipMethodID. 
CreditCardIDint   NullCredit card identification number. Foreign key to CreditCard.CreditCardID. 
CreditCardApprovalCodevarchar15  NullApproval code provided by the credit card company. 
CurrencyRateIDint   NullCurrency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID. 
SubTotalmoney19,4decimal(19,4)(0.00)Not nullSales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID.([SubTotal]>=(0.00))
TaxAmtmoney19,4decimal(19,4)(0.00)Not nullTax amount.([TaxAmt]>=(0.00))
Freightmoney19,4decimal(19,4)(0.00)Not nullShipping cost.([Freight]>=(0.00))
TotalDuemoney19,4decimal(19,4) Not nullTotal due from customer. Computed as Subtotal + TaxAmt + Freight. 
Commentnvarchar128  NullSales representative comments. 
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 'Sales.SalesOrderHeader'

Primary Key NameField Name
PK_SalesOrderHeader_SalesOrderIDSalesOrderID

Foreign keys for table 'Sales.SalesOrderHeader', 9 items

ForeignPrimaryKey Name
SalesOrderHeader.BillToAddressIDAddress.AddressIDFK_SalesOrderHeader_Address_BillToAddressID
SalesOrderHeader.ShipToAddressIDAddress.AddressIDFK_SalesOrderHeader_Address_ShipToAddressID
SalesOrderHeader.ContactIDContact.ContactIDFK_SalesOrderHeader_Contact_ContactID
SalesOrderHeader.ShipMethodIDShipMethod.ShipMethodIDFK_SalesOrderHeader_ShipMethod_ShipMethodID
SalesOrderHeader.CreditCardIDCreditCard.CreditCardIDFK_SalesOrderHeader_CreditCard_CreditCardID
SalesOrderHeader.CurrencyRateIDCurrencyRate.CurrencyRateIDFK_SalesOrderHeader_CurrencyRate_CurrencyRateID
SalesOrderHeader.CustomerIDCustomer.CustomerIDFK_SalesOrderHeader_Customer_CustomerID
SalesOrderHeader.SalesPersonIDSalesPerson.SalesPersonIDFK_SalesOrderHeader_SalesPerson_SalesPersonID
SalesOrderHeader.TerritoryIDSalesTerritory.TerritoryIDFK_SalesOrderHeader_SalesTerritory_TerritoryID

Indexes for table 'Sales.SalesOrderHeader', 5 items

Index NameDescriptionClusteredUniqueFields
PK_SalesOrderHeader_SalesOrderIDClustered index created by a primary key constraint.YesYesSalesOrderID
AK_SalesOrderHeader_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
AK_SalesOrderHeader_SalesOrderNumberUnique nonclustered index.NoYesSalesOrderNumber
IX_SalesOrderHeader_CustomerIDNonclustered index.NoNoCustomerID
IX_SalesOrderHeader_SalesPersonIDNonclustered index.NoNoSalesPersonID

Triggers for table 'Sales.SalesOrderHeader', 1 item

NameDescriptionTypeEnabled
uSalesOrderHeaderAFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the SalesOrderHeader table.Updates the SalesYTD column in the SalesPerson and SalesTerritory tables.after Update Yes

Dependencies for table 'Sales.SalesOrderHeader', 4 items

Object NameTypeField Name
Sales.SalesOrderHeaderuser tableSalesOrderID
Sales.SalesOrderHeaderuser tableSubTotal
Sales.SalesOrderHeaderuser tableTaxAmt
Sales.SalesOrderHeaderuser tableFreight

Table: 'Sales.SalesOrderHeaderSalesReason'

3 fields. 24 bytes.

Cross-reference table mapping sales orders to sales reason codes.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesOrderIDint   Not nullPrimary key. Foreign key to SalesOrderHeader.SalesOrderID. 
SalesReasonIDint   Not nullPrimary key. Foreign key to SalesReason.SalesReasonID. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.SalesOrderHeaderSalesReason'

Primary Key NameField Names
PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonIDSalesOrderID, SalesReasonID

Foreign keys for table 'Sales.SalesOrderHeaderSalesReason', 2 items

ForeignPrimaryKey Name
SalesOrderHeaderSalesReason.SalesOrderIDSalesOrderHeader.SalesOrderIDFK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID
SalesOrderHeaderSalesReason.SalesReasonIDSalesReason.SalesReasonIDFK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID

Indexes for table 'Sales.SalesOrderHeaderSalesReason', 1 item

Index NameDescriptionClusteredUniqueFields
PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonIDClustered index created by a primary key constraint.YesYesSalesOrderID, SalesReasonID

Triggers for table 'Sales.SalesOrderHeaderSalesReason', 1 item

NameDescriptionTypeEnabled
uSalesOrderHeaderSalesReasonAFTER UPDATE trigger setting the ModifiedDate column in the SalesOrderHeaderSalesReason table to the current date.after Update Yes

Dependencies for table 'Sales.SalesOrderHeaderSalesReason', 1 item

Object NameTypeField Name
Sales.uSalesOrderHeaderSalesReasontriggerN/A

Table: 'Sales.SalesPerson'

9 fields. 136 bytes.

Sales representative current information.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesPersonIDint   Not nullPrimary key for SalesPerson records. 
TerritoryIDint   NullTerritory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID. 
SalesQuotamoney19,4decimal(19,4) NullProjected yearly sales.([SalesQuota]>(0.00))
Bonusmoney19,4decimal(19,4)(0.00)Not nullBonus due if quota is met.([Bonus]>=(0.00))
CommissionPctsmallmoney10,4decimal(10,4)(0.00)Not nullCommision percent received per sale.([CommissionPct]>=(0.00))
SalesYTDmoney19,4decimal(19,4)(0.00)Not nullSales total year to date.([SalesYTD]>=(0.00))
SalesLastYearmoney19,4decimal(19,4)(0.00)Not nullSales total of previous year.([SalesLastYear]>=(0.00))
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 'Sales.SalesPerson'

Primary Key NameField Name
PK_SalesPerson_SalesPersonIDSalesPersonID

Foreign keys for table 'Sales.SalesPerson', 2 items

ForeignPrimaryKey Name
SalesPerson.SalesPersonIDEmployee.EmployeeIDFK_SalesPerson_Employee_SalesPersonID
SalesPerson.TerritoryIDSalesTerritory.TerritoryIDFK_SalesPerson_SalesTerritory_TerritoryID

Indexes for table 'Sales.SalesPerson', 2 items

Index NameDescriptionClusteredUniqueFields
PK_SalesPerson_SalesPersonIDClustered index created by a primary key constraint.YesYesSalesPersonID
AK_SalesPerson_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Sales.SalesPerson', 1 item

NameDescriptionTypeEnabled
uSalesPersonAFTER UPDATE trigger setting the ModifiedDate column in the SalesPerson table to the current date.after Update Yes

Dependencies for table 'Sales.SalesPerson', 9 items

Object NameTypeField Name
Sales.CK_SalesPerson_Bonuscheck cnsN/A
Sales.CK_SalesPerson_CommissionPctcheck cnsN/A
Sales.CK_SalesPerson_SalesLastYearcheck cnsN/A
Sales.CK_SalesPerson_SalesQuotacheck cnsN/A
Sales.CK_SalesPerson_SalesYTDcheck cnsN/A
Sales.uSalesOrderHeadertriggerN/A
Sales.uSalesPersontriggerN/A
Sales.vSalesPersonviewN/A
Sales.vSalesPersonSalesByFiscalYearsviewN/A

Table: 'Sales.SalesPersonQuotaHistory'

5 fields. 73 bytes.

Sales performance tracking.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesPersonIDint   Not nullSales person identification number. Foreign key to SalesPerson.SalesPersonID. 
QuotaDatedatetime   Not nullSales quota date. 
SalesQuotamoney19,4decimal(19,4) Not nullSales quota amount.([SalesQuota]>(0.00))
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 'Sales.SalesPersonQuotaHistory'

Primary Key NameField Names
PK_SalesPersonQuotaHistory_SalesPersonID_QuotaDateSalesPersonID, QuotaDate

Foreign keys for table 'Sales.SalesPersonQuotaHistory', 1 item

ForeignPrimaryKey Name
SalesPersonQuotaHistory.SalesPersonIDSalesPerson.SalesPersonIDFK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID

Indexes for table 'Sales.SalesPersonQuotaHistory', 2 items

Index NameDescriptionClusteredUniqueFields
PK_SalesPersonQuotaHistory_SalesPersonID_QuotaDateClustered index created by a primary key constraint.YesYesSalesPersonID, QuotaDate
AK_SalesPersonQuotaHistory_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Sales.SalesPersonQuotaHistory', 1 item

NameDescriptionTypeEnabled
uSalesPersonQuotaHistoryAFTER UPDATE trigger setting the ModifiedDate column in the SalesPersonQuotaHistory table to the current date.after Update Yes

Dependencies for table 'Sales.SalesPersonQuotaHistory', 2 items

Object NameTypeField Name
Sales.CK_SalesPersonQuotaHistory_SalesQuotacheck cnsN/A
Sales.uSalesPersonQuotaHistorytriggerN/A

Table: 'Sales.SalesReason'

4 fields. 220 bytes.

Lookup table of customer purchase reasons.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesReasonIDint identity int Not nullPrimary key for SalesReason records. 
NameName nvarchar(50) Not nullSales reason description. 
ReasonTypeName nvarchar(50) Not nullCategory the sales reason belongs to. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.SalesReason'

Primary Key NameField Name
PK_SalesReason_SalesReasonIDSalesReasonID
There are no Foreign Keys for this table.

Indexes for table 'Sales.SalesReason', 1 item

Index NameDescriptionClusteredUniqueFields
PK_SalesReason_SalesReasonIDClustered index created by a primary key constraint.YesYesSalesReasonID

Triggers for table 'Sales.SalesReason', 1 item

NameDescriptionTypeEnabled
uSalesReasonAFTER UPDATE trigger setting the ModifiedDate column in the SalesReason table to the current date.after Update Yes

Dependencies for table 'Sales.SalesReason', 1 item

Object NameTypeField Name
Sales.uSalesReasontriggerN/A

Table: 'Sales.SalesTaxRate'

7 fields. 153 bytes.

Tax rate lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesTaxRateIDint identity int Not nullPrimary key for SalesTaxRate records. 
StateProvinceIDint   Not nullState, province, or country/region the sales tax applies to. 
TaxTypetinyint   Not null1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions.([TaxType]>=(1) AND [TaxType]<=(3))
TaxRatesmallmoney10,4decimal(10,4)(0.00)Not nullTax rate amount. 
NameName nvarchar(50) Not nullTax rate description. 
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 'Sales.SalesTaxRate'

Primary Key NameField Name
PK_SalesTaxRate_SalesTaxRateIDSalesTaxRateID

Foreign keys for table 'Sales.SalesTaxRate', 1 item

ForeignPrimaryKey Name
SalesTaxRate.StateProvinceIDStateProvince.StateProvinceIDFK_SalesTaxRate_StateProvince_StateProvinceID

Indexes for table 'Sales.SalesTaxRate', 3 items

Index NameDescriptionClusteredUniqueFields
PK_SalesTaxRate_SalesTaxRateIDClustered index created by a primary key constraint.YesYesSalesTaxRateID
AK_SalesTaxRate_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
AK_SalesTaxRate_StateProvinceID_TaxTypeUnique nonclustered index.NoYesStateProvinceID, TaxType

Triggers for table 'Sales.SalesTaxRate', 1 item

NameDescriptionTypeEnabled
uSalesTaxRateAFTER UPDATE trigger setting the ModifiedDate column in the SalesTaxRate table to the current date.after Update Yes

Dependencies for table 'Sales.SalesTaxRate', 2 items

Object NameTypeField Name
Sales.CK_SalesTaxRate_TaxTypecheck cnsN/A
Sales.uSalesTaxRatetriggerN/A

Table: 'Sales.SalesTerritory'

10 fields. 326 bytes.

Sales territory lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
TerritoryIDint identity int Not nullPrimary key for SalesTerritory records. 
NameName nvarchar(50) Not nullSales territory description 
CountryRegionCodenvarchar3  Not nullISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.  
Groupnvarchar50  Not nullGeographic area to which the sales territory belong. 
SalesYTDmoney19,4decimal(19,4)(0.00)Not nullSales in the territory year to date.([SalesYTD]>=(0.00))
SalesLastYearmoney19,4decimal(19,4)(0.00)Not nullSales in the territory the previous year.([SalesLastYear]>=(0.00))
CostYTDmoney19,4decimal(19,4)(0.00)Not nullBusiness costs in the territory year to date.([CostYTD]>=(0.00))
CostLastYearmoney19,4decimal(19,4)(0.00)Not nullBusiness costs in the territory the previous year.([CostLastYear]>=(0.00))
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 'Sales.SalesTerritory'

Primary Key NameField Name
PK_SalesTerritory_TerritoryIDTerritoryID
There are no Foreign Keys for this table.

Indexes for table 'Sales.SalesTerritory', 3 items

Index NameDescriptionClusteredUniqueFields
PK_SalesTerritory_TerritoryIDClustered index created by a primary key constraint.YesYesTerritoryID
AK_SalesTerritory_NameUnique nonclustered index.NoYesName
AK_SalesTerritory_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Sales.SalesTerritory', 1 item

NameDescriptionTypeEnabled
uSalesTerritoryAFTER UPDATE trigger setting the ModifiedDate column in the SalesTerritory table to the current date.after Update Yes

Dependencies for table 'Sales.SalesTerritory', 8 items

Object NameTypeField Name
Sales.CK_SalesTerritory_CostLastYearcheck cnsN/A
Sales.CK_SalesTerritory_CostYTDcheck cnsN/A
Sales.CK_SalesTerritory_SalesLastYearcheck cnsN/A
Sales.CK_SalesTerritory_SalesYTDcheck cnsN/A
Sales.uSalesOrderHeadertriggerN/A
Sales.uSalesTerritorytriggerN/A
Sales.vSalesPersonviewN/A
Sales.vSalesPersonSalesByFiscalYearsviewN/A

Table: 'Sales.SalesTerritoryHistory'

6 fields. 72 bytes.

Sales representative transfers to other sales territories.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesPersonIDint   Not nullPrimary key for SalesTerritoryHistory records. 
TerritoryIDint   Not nullTerritory identification number. Foreign key to SalesTerritory.SalesTerritoryID. 
StartDatedatetime   Not nullDate the sales representive started work in the territory. 
EndDatedatetime   NullDate the sales representative left work in the territory. 
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 'Sales.SalesTerritoryHistory'

Primary Key NameField Names
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryIDSalesPersonID, StartDate, TerritoryID

Foreign keys for table 'Sales.SalesTerritoryHistory', 2 items

ForeignPrimaryKey Name
SalesTerritoryHistory.SalesPersonIDSalesPerson.SalesPersonIDFK_SalesTerritoryHistory_SalesPerson_SalesPersonID
SalesTerritoryHistory.TerritoryIDSalesTerritory.TerritoryIDFK_SalesTerritoryHistory_SalesTerritory_TerritoryID

Indexes for table 'Sales.SalesTerritoryHistory', 2 items

Index NameDescriptionClusteredUniqueFields
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryIDClustered index created by a primary key constraint.YesYesSalesPersonID, StartDate, TerritoryID
AK_SalesTerritoryHistory_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Sales.SalesTerritoryHistory', 1 item

NameDescriptionTypeEnabled
uSalesTerritoryHistoryAFTER UPDATE trigger setting the ModifiedDate column in the SalesTerritoryHistory table to the current date.after Update Yes

Dependencies for table 'Sales.SalesTerritoryHistory', 2 items

Object NameTypeField Name
Sales.CK_SalesTerritoryHistory_EndDatecheck cnsN/A
Sales.uSalesTerritoryHistorytriggerN/A

Table: 'Sales.ShoppingCartItem'

6 fields. 144 bytes.

Contains online customer orders until the order is submitted or cancelled.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
ShoppingCartItemIDint identity int Not nullPrimary key for ShoppingCartItem records. 
ShoppingCartIDnvarchar50  Not nullShopping cart identification number. 
Quantityint  (1)Not nullProduct quantity ordered.([Quantity]>=(1))
ProductIDint   Not nullProduct ordered. Foreign key to Product.ProductID. 
DateCreateddatetime  getdate()Not nullDate the time the record was created. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.ShoppingCartItem'

Primary Key NameField Name
PK_ShoppingCartItem_ShoppingCartItemIDShoppingCartItemID

Foreign keys for table 'Sales.ShoppingCartItem', 1 item

ForeignPrimaryKey Name
ShoppingCartItem.ProductIDProduct.ProductIDFK_ShoppingCartItem_Product_ProductID

Indexes for table 'Sales.ShoppingCartItem', 2 items

Index NameDescriptionClusteredUniqueFields
PK_ShoppingCartItem_ShoppingCartItemIDClustered index created by a primary key constraint.YesYesShoppingCartItemID
IX_ShoppingCartItem_ShoppingCartID_ProductIDNonclustered index.NoNoShoppingCartID, ProductID

Triggers for table 'Sales.ShoppingCartItem', 1 item

NameDescriptionTypeEnabled
uShoppingCartItemAFTER UPDATE trigger setting the ModifiedDate column in the ShoppingCartItem table to the current date.after Update Yes

Dependencies for table 'Sales.ShoppingCartItem', 2 items

Object NameTypeField Name
Sales.CK_ShoppingCartItem_Quantitycheck cnsN/A
Sales.uShoppingCartItemtriggerN/A

Table: 'Sales.SpecialOffer'

11 fields. 798 bytes.

Sale discounts lookup table.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SpecialOfferIDint identity int Not nullPrimary key for SpecialOffer records. 
Descriptionnvarchar255  Not nullDiscount description. 
DiscountPctsmallmoney10,4decimal(10,4)(0.00)Not nullDiscount precentage.([DiscountPct]>=(0.00))
Typenvarchar50  Not nullDiscount type category. 
Categorynvarchar50  Not nullGroup the discount applies to such as Reseller or Customer. 
StartDatedatetime   Not nullDiscount start date. 
EndDatedatetime   Not nullDiscount end date. 
MinQtyint  (0)Not nullMinimum discount percent allowed.([MinQty]>=(0))
MaxQtyint   NullMaximum discount percent allowed.([MaxQty]>=(0))
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 'Sales.SpecialOffer'

Primary Key NameField Name
PK_SpecialOffer_SpecialOfferIDSpecialOfferID
There are no Foreign Keys for this table.

Indexes for table 'Sales.SpecialOffer', 2 items

Index NameDescriptionClusteredUniqueFields
PK_SpecialOffer_SpecialOfferIDClustered index created by a primary key constraint.YesYesSpecialOfferID
AK_SpecialOffer_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Sales.SpecialOffer', 1 item

NameDescriptionTypeEnabled
uSpecialOfferAFTER UPDATE trigger setting the ModifiedDate column in the SpecialOffer table to the current date.after Update Yes

Dependencies for table 'Sales.SpecialOffer', 5 items

Object NameTypeField Name
Sales.CK_SpecialOffer_DiscountPctcheck cnsN/A
Sales.CK_SpecialOffer_EndDatecheck cnsN/A
Sales.CK_SpecialOffer_MaxQtycheck cnsN/A
Sales.CK_SpecialOffer_MinQtycheck cnsN/A
Sales.uSpecialOffertriggerN/A

Table: 'Sales.SpecialOfferProduct'

4 fields. 40 bytes.

Cross-reference table mapping products to special offer discounts.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SpecialOfferIDint   Not nullPrimary key for SpecialOfferProduct records. 
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
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 'Sales.SpecialOfferProduct'

Primary Key NameField Names
PK_SpecialOfferProduct_SpecialOfferID_ProductIDSpecialOfferID, ProductID

Foreign keys for table 'Sales.SpecialOfferProduct', 2 items

ForeignPrimaryKey Name
SpecialOfferProduct.ProductIDProduct.ProductIDFK_SpecialOfferProduct_Product_ProductID
SpecialOfferProduct.SpecialOfferIDSpecialOffer.SpecialOfferIDFK_SpecialOfferProduct_SpecialOffer_SpecialOfferID

Indexes for table 'Sales.SpecialOfferProduct', 3 items

Index NameDescriptionClusteredUniqueFields
PK_SpecialOfferProduct_SpecialOfferID_ProductIDClustered index created by a primary key constraint.YesYesSpecialOfferID, ProductID
AK_SpecialOfferProduct_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
IX_SpecialOfferProduct_ProductIDNonclustered index.NoNoProductID

Triggers for table 'Sales.SpecialOfferProduct', 1 item

NameDescriptionTypeEnabled
uSpecialOfferProductAFTER UPDATE trigger setting the ModifiedDate column in the SpecialOfferProduct table to the current date.after Update Yes

Dependencies for table 'Sales.SpecialOfferProduct', 1 item

Object NameTypeField Name
Sales.uSpecialOfferProducttriggerN/A

Table: 'Sales.Store'

6 fields. 140 bytes.

Customers (resellers) of Adventure Works products.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CustomerIDint   Not nullPrimary key. Foreign key to Customer.CustomerID. 
NameName nvarchar(50) Not nullName of the store. 
SalesPersonIDint   NullID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID. 
Demographicsxml   NullDemographic informationg about the store such as the number of employees, annual sales and store type. 
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 'Sales.Store'

Primary Key NameField Name
PK_Store_CustomerIDCustomerID

Foreign keys for table 'Sales.Store', 2 items

ForeignPrimaryKey Name
Store.CustomerIDCustomer.CustomerIDFK_Store_Customer_CustomerID
Store.SalesPersonIDSalesPerson.SalesPersonIDFK_Store_SalesPerson_SalesPersonID

Indexes for table 'Sales.Store', 3 items

Index NameDescriptionClusteredUniqueFields
PK_Store_CustomerIDClustered index created by a primary key constraint.YesYesCustomerID
AK_Store_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
IX_Store_SalesPersonIDNonclustered index.NoNoSalesPersonID

Triggers for table 'Sales.Store', 2 items

NameDescriptionTypeEnabled
iStoreAFTER INSERT trigger inserting Store only if the Customer does not exist in the Individual table.after Insert Yes
uStoreAFTER UPDATE trigger setting the ModifiedDate column in the Store table to the current date.after Update Yes

Dependencies for table 'Sales.Store', 3 items

Object NameTypeField Name
Sales.iuIndividualtriggerN/A
Sales.uStoretriggerN/A
Sales.vStoreWithDemographicsviewN/A

Table: 'Sales.StoreContact'

5 fields. 44 bytes.

Cross-reference table mapping stores and their employees.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
CustomerIDint   Not nullStore identification number. Foreign key to Customer.CustomerID. 
ContactIDint   Not nullContact (store employee) identification number. Foreign key to Contact.ContactID. 
ContactTypeIDint   Not nullContact type such as owner or purchasing agent. Foreign key to ContactType.ContactTypeID. 
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 'Sales.StoreContact'

Primary Key NameField Names
PK_StoreContact_CustomerID_ContactIDCustomerID, ContactID

Foreign keys for table 'Sales.StoreContact', 3 items

ForeignPrimaryKey Name
StoreContact.ContactIDContact.ContactIDFK_StoreContact_Contact_ContactID
StoreContact.ContactTypeIDContactType.ContactTypeIDFK_StoreContact_ContactType_ContactTypeID
StoreContact.CustomerIDStore.CustomerIDFK_StoreContact_Store_CustomerID

Indexes for table 'Sales.StoreContact', 4 items

Index NameDescriptionClusteredUniqueFields
PK_StoreContact_CustomerID_ContactIDClustered index created by a primary key constraint.YesYesCustomerID, ContactID
AK_StoreContact_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid
IX_StoreContact_ContactIDNonclustered index.NoNoContactID
IX_StoreContact_ContactTypeIDNonclustered index.NoNoContactTypeID

Triggers for table 'Sales.StoreContact', 1 item

NameDescriptionTypeEnabled
uStoreContactAFTER UPDATE trigger setting the ModifiedDate column in the StoreContact table to the current date.after Update Yes

Dependencies for table 'Sales.StoreContact', 3 items

Object NameTypeField Name
dbo.ufnGetContactInformationtable functionN/A
Sales.uStoreContacttriggerN/A
Sales.vStoreWithDemographicsviewN/A

Views, 17 items

View: 'HumanResources.vEmployee', Employee names and addresses.

Field NameType and Size
EmployeeIDint NOT NULL
Titlenvarchar(8) NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
Suffixnvarchar(10) NULL
JobTitlenvarchar(50) NOT NULL
PhonePhone NULL
EmailAddressnvarchar(50) NULL
EmailPromotionint NOT NULL
AddressLine1nvarchar(60) NOT NULL
AddressLine2nvarchar(60) NULL
Citynvarchar(30) NOT NULL
StateProvinceNameName NOT NULL
PostalCodenvarchar(15) NOT NULL
CountryRegionNameName NOT NULL
AdditionalContactInfoxml NULL

View: 'HumanResources.vEmployeeDepartment', Returns employee name, title, and current department.

Field NameType and Size
EmployeeIDint NOT NULL
Titlenvarchar(8) NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
Suffixnvarchar(10) NULL
JobTitlenvarchar(50) NOT NULL
DepartmentName NOT NULL
GroupNameName NOT NULL
StartDatedatetime NOT NULL

View: 'HumanResources.vEmployeeDepartmentHistory', Returns employee name and current and previous departments.

Field NameType and Size
EmployeeIDint NOT NULL
Titlenvarchar(8) NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
Suffixnvarchar(10) NULL
ShiftName NOT NULL
DepartmentName NOT NULL
GroupNameName NOT NULL
StartDatedatetime NOT NULL
EndDatedatetime NULL

View: 'HumanResources.vJobCandidate', Job candidate names and resumes.

Field NameType and Size
JobCandidateIDint identity NOT NULL
EmployeeIDint NULL
Name.Prefixnvarchar(30) NULL
Name.Firstnvarchar(30) NULL
Name.Middlenvarchar(30) NULL
Name.Lastnvarchar(30) NULL
Name.Suffixnvarchar(30) NULL
Skillsnvarchar(max) NULL
Addr.Typenvarchar(30) NULL
Addr.Loc.CountryRegionnvarchar(100) NULL
Addr.Loc.Statenvarchar(100) NULL
Addr.Loc.Citynvarchar(100) NULL
Addr.PostalCodenvarchar(20) NULL
EMailnvarchar(max) NULL
WebSitenvarchar(max) NULL
ModifiedDatedatetime NOT NULL

View: 'HumanResources.vJobCandidateEducation', Displays the content from each education related element in the xml column Resume in the HumanResources.JobCandidate table. The content has been localized into French, Simplified Chinese and Thai. Some data may not display correctly unless supplemental language support is installed.

Field NameType and Size
JobCandidateIDint identity NOT NULL
Edu.Levelnvarchar(max) NULL
Edu.StartDatedatetime NULL
Edu.EndDatedatetime NULL
Edu.Degreenvarchar(50) NULL
Edu.Majornvarchar(50) NULL
Edu.Minornvarchar(50) NULL
Edu.GPAnvarchar(5) NULL
Edu.GPAScalenvarchar(5) NULL
Edu.Schoolnvarchar(100) NULL
Edu.Loc.CountryRegionnvarchar(100) NULL
Edu.Loc.Statenvarchar(100) NULL
Edu.Loc.Citynvarchar(100) NULL

View: 'HumanResources.vJobCandidateEmployment', Displays the content from each employement history related element in the xml column Resume in the HumanResources.JobCandidate table. The content has been localized into French, Simplified Chinese and Thai. Some data may not display correctly unless supplemental language support is installed.

Field NameType and Size
JobCandidateIDint identity NOT NULL
Emp.StartDatedatetime NULL
Emp.EndDatedatetime NULL
Emp.OrgNamenvarchar(100) NULL
Emp.JobTitlenvarchar(100) NULL
Emp.Responsibilitynvarchar(max) NULL
Emp.FunctionCategorynvarchar(max) NULL
Emp.IndustryCategorynvarchar(max) NULL
Emp.Loc.CountryRegionnvarchar(max) NULL
Emp.Loc.Statenvarchar(max) NULL
Emp.Loc.Citynvarchar(max) NULL

View: 'Person.vAdditionalContactInfo', Displays the contact name and content from each element in the xml column AdditionalContactInfo for that person.

Field NameType and Size
ContactIDint identity NOT NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
TelephoneNumbernvarchar(50) NULL
TelephoneSpecialInstructionsnvarchar(max) NULL
Streetnvarchar(50) NULL
Citynvarchar(50) NULL
StateProvincenvarchar(50) NULL
PostalCodenvarchar(50) NULL
CountryRegionnvarchar(50) NULL
HomeAddressSpecialInstructionsnvarchar(max) NULL
EMailAddressnvarchar(128) NULL
EMailSpecialInstructionsnvarchar(max) NULL
EMailTelephoneNumbernvarchar(50) NULL
rowguiduniqueidentifier NOT NULL
ModifiedDatedatetime NOT NULL

View: 'Person.vStateProvinceCountryRegion', Joins StateProvince table with CountryRegion table.

Field NameType and Size
StateProvinceIDint NOT NULL
StateProvinceCodenchar(3) NOT NULL
IsOnlyStateProvinceFlagFlag NOT NULL
StateProvinceNameName NOT NULL
TerritoryIDint NOT NULL
CountryRegionCodenvarchar(3) NOT NULL
CountryRegionNameName NOT NULL

View: 'Production.vProductAndDescription', Product names and descriptions. Product descriptions are provided in multiple languages.

Field NameType and Size
ProductIDint NOT NULL
NameName NOT NULL
ProductModelName NOT NULL
CultureIDnchar(6) NOT NULL
Descriptionnvarchar(400) NOT NULL

View: 'Production.vProductModelCatalogDescription', Displays the content from each element in the xml column CatalogDescription for each product in the Production.ProductModel table that has catalog data.

Field NameType and Size
ProductModelIDint identity NOT NULL
NameName NOT NULL
Summarynvarchar(max) NULL
Manufacturernvarchar(max) NULL
Copyrightnvarchar(30) NULL
ProductURLnvarchar(256) NULL
WarrantyPeriodnvarchar(256) NULL
WarrantyDescriptionnvarchar(256) NULL
NoOfYearsnvarchar(256) NULL
MaintenanceDescriptionnvarchar(256) NULL
Wheelnvarchar(256) NULL
Saddlenvarchar(256) NULL
Pedalnvarchar(256) NULL
BikeFramenvarchar(max) NULL
Cranksetnvarchar(256) NULL
PictureAnglenvarchar(256) NULL
PictureSizenvarchar(256) NULL
ProductPhotoIDnvarchar(256) NULL
Materialnvarchar(256) NULL
Colornvarchar(256) NULL
ProductLinenvarchar(256) NULL
Stylenvarchar(256) NULL
RiderExperiencenvarchar(1024) NULL
rowguiduniqueidentifier NOT NULL
ModifiedDatedatetime NOT NULL

View: 'Production.vProductModelInstructions', Displays the content from each element in the xml column Instructions for each product in the Production.ProductModel table that has manufacturing instructions.

Field NameType and Size
ProductModelIDint identity NOT NULL
NameName NOT NULL
Instructionsnvarchar(max) NULL
LocationIDint NULL
SetupHoursdecimal(9,4) NULL
MachineHoursdecimal(9,4) NULL
LaborHoursdecimal(9,4) NULL
LotSizeint NULL
Stepnvarchar(1024) NULL
rowguiduniqueidentifier NOT NULL
ModifiedDatedatetime NOT NULL

View: 'Purchasing.vVendor', Vendor (company) names and addresses and the names of vendor employees to contact.

Field NameType and Size
VendorIDint NOT NULL
NameName NOT NULL
ContactTypeName NOT NULL
Titlenvarchar(8) NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
Suffixnvarchar(10) NULL
PhonePhone NULL
EmailAddressnvarchar(50) NULL
EmailPromotionint NOT NULL
AddressLine1nvarchar(60) NOT NULL
AddressLine2nvarchar(60) NULL
Citynvarchar(30) NOT NULL
StateProvinceNameName NOT NULL
PostalCodenvarchar(15) NOT NULL
CountryRegionNameName NOT NULL

View: 'Sales.vIndividualCustomer', Individual customers (names and addresses) that purchase Adventure Works Cycles products online.

Field NameType and Size
CustomerIDint NOT NULL
Titlenvarchar(8) NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
Suffixnvarchar(10) NULL
PhonePhone NULL
EmailAddressnvarchar(50) NULL
EmailPromotionint NOT NULL
AddressTypeName NOT NULL
AddressLine1nvarchar(60) NOT NULL
AddressLine2nvarchar(60) NULL
Citynvarchar(30) NOT NULL
StateProvinceNameName NOT NULL
PostalCodenvarchar(15) NOT NULL
CountryRegionNameName NOT NULL
Demographicsxml NULL

View: 'Sales.vIndividualDemographics', Displays the content from each element in the xml column Demographics for each customer in the Sales.Individual table.

Field NameType and Size
CustomerIDint NOT NULL
TotalPurchaseYTDmoney(19,4) NULL
DateFirstPurchasedatetime NULL
BirthDatedatetime NULL
MaritalStatusnvarchar(1) NULL
YearlyIncomenvarchar(30) NULL
Gendernvarchar(1) NULL
TotalChildrenint NULL
NumberChildrenAtHomeint NULL
Educationnvarchar(30) NULL
Occupationnvarchar(30) NULL
HomeOwnerFlagbit NULL
NumberCarsOwnedint NULL

View: 'Sales.vSalesPerson', Sales representiatives (names and addresses) and their sales-related information.

Field NameType and Size
SalesPersonIDint NOT NULL
Titlenvarchar(8) NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
Suffixnvarchar(10) NULL
JobTitlenvarchar(50) NOT NULL
PhonePhone NULL
EmailAddressnvarchar(50) NULL
EmailPromotionint NOT NULL
AddressLine1nvarchar(60) NOT NULL
AddressLine2nvarchar(60) NULL
Citynvarchar(30) NOT NULL
StateProvinceNameName NOT NULL
PostalCodenvarchar(15) NOT NULL
CountryRegionNameName NOT NULL
TerritoryNameName NULL
TerritoryGroupnvarchar(50) NULL
SalesQuotamoney(19,4) NULL
SalesYTDmoney(19,4) NOT NULL
SalesLastYearmoney(19,4) NOT NULL

View: 'Sales.vSalesPersonSalesByFiscalYears', Uses PIVOT to return aggregated sales information for each sales representative.

Field NameType and Size
SalesPersonIDint NULL
FullNamenvarchar(152) NULL
Titlenvarchar(50) NOT NULL
SalesTerritoryName NOT NULL
2002money(19,4) NULL
2003money(19,4) NULL
2004money(19,4) NULL

View: 'Sales.vStoreWithDemographics', Stores (names and addresses) that sell Adventure Works Cycles products to consumers.

Field NameType and Size
CustomerIDint NOT NULL
NameName NOT NULL
ContactTypeName NOT NULL
Titlenvarchar(8) NULL
FirstNameName NOT NULL
MiddleNameName NULL
LastNameName NOT NULL
Suffixnvarchar(10) NULL
PhonePhone NULL
EmailAddressnvarchar(50) NULL
EmailPromotionint NOT NULL
AddressTypeName NOT NULL
AddressLine1nvarchar(60) NOT NULL
AddressLine2nvarchar(60) NULL
Citynvarchar(30) NOT NULL
StateProvinceNameName NOT NULL
PostalCodenvarchar(15) NOT NULL
CountryRegionNameName NOT NULL
AnnualSalesmoney(19,4) NULL
AnnualRevenuemoney(19,4) NULL
BankNamenvarchar(50) NULL
BusinessTypenvarchar(5) NULL
YearOpenedint NULL
Specialtynvarchar(50) NULL
SquareFeetint NULL
Brandsnvarchar(30) NULL
Internetnvarchar(30) NULL
NumberEmployeesint NULL

Procedures and Functions, 20 items

Procedure/Function: 'dbo.ufnGetAccountingEndDate', Scalar function used in the uSalesOrderHeader trigger to set the starting account date.

Procedure NameDescriptionParameters
dbo.ufnGetAccountingEndDateScalar function used in the uSalesOrderHeader trigger to set the starting account date.@RETURN_VALUE datetime(23) [RETURN VALUE]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetAccountingStartDate', Scalar function used in the uSalesOrderHeader trigger to set the ending account date.

Procedure NameDescriptionParameters
dbo.ufnGetAccountingStartDateScalar function used in the uSalesOrderHeader trigger to set the ending account date.@RETURN_VALUE datetime(23) [RETURN VALUE]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetContactInformation', Table value function returning the first name, last name, job title and contact type for a given contact.

Procedure NameDescriptionParameters
dbo.ufnGetContactInformationTable value function returning the first name, last name, job title and contact type for a given contact.@TABLE_RETURN_VALUE table [RESULT SET COLUMN], @ContactID int(10) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetContactInformation', 12 items

Object NameTypeField Name
Sales.StoreContactuser tableContactID
Sales.StoreContactuser tableContactTypeID
Person.Contactuser tableContactID
Person.Contactuser tableFirstName
Person.Contactuser tableLastName
Purchasing.VendorContactuser tableContactID
Purchasing.VendorContactuser tableContactTypeID
Person.ContactTypeuser tableContactTypeID
Person.ContactTypeuser tableName
HumanResources.Employeeuser tableContactID
HumanResources.Employeeuser tableTitle
Sales.Individualuser tableContactID

Procedure/Function: 'dbo.ufnGetDocumentStatusText', Scalar function returning the text representation of the Status column in the Document table.

Procedure NameDescriptionParameters
dbo.ufnGetDocumentStatusTextScalar function returning the text representation of the Status column in the Document table.@RETURN_VALUE nvarchar(15) [RETURN VALUE], @Status tinyint(3) [INPUT]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetProductDealerPrice', Scalar function returning the dealer price for a given product on a particular order date.

Procedure NameDescriptionParameters
dbo.ufnGetProductDealerPriceScalar function returning the dealer price for a given product on a particular order date.@RETURN_VALUE money(19) [RETURN VALUE], @ProductID int(10) [INPUT], @OrderDate datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetProductDealerPrice', 5 items

Object NameTypeField Name
Production.Productuser tableProductID
Production.ProductListPriceHistoryuser tableProductID
Production.ProductListPriceHistoryuser tableStartDate
Production.ProductListPriceHistoryuser tableEndDate
Production.ProductListPriceHistoryuser tableListPrice

Procedure/Function: 'dbo.ufnGetProductListPrice', Scalar function returning the list price for a given product on a particular order date.

Procedure NameDescriptionParameters
dbo.ufnGetProductListPriceScalar function returning the list price for a given product on a particular order date.@RETURN_VALUE money(19) [RETURN VALUE], @ProductID int(10) [INPUT], @OrderDate datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetProductListPrice', 5 items

Object NameTypeField Name
Production.Productuser tableProductID
Production.ProductListPriceHistoryuser tableProductID
Production.ProductListPriceHistoryuser tableStartDate
Production.ProductListPriceHistoryuser tableEndDate
Production.ProductListPriceHistoryuser tableListPrice

Procedure/Function: 'dbo.ufnGetProductStandardCost', Scalar function returning the standard cost for a given product on a particular order date.

Procedure NameDescriptionParameters
dbo.ufnGetProductStandardCostScalar function returning the standard cost for a given product on a particular order date.@RETURN_VALUE money(19) [RETURN VALUE], @ProductID int(10) [INPUT], @OrderDate datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetProductStandardCost', 5 items

Object NameTypeField Name
Production.Productuser tableProductID
Production.ProductCostHistoryuser tableProductID
Production.ProductCostHistoryuser tableStartDate
Production.ProductCostHistoryuser tableEndDate
Production.ProductCostHistoryuser tableStandardCost

Procedure/Function: 'dbo.ufnGetPurchaseOrderStatusText', Scalar function returning the text representation of the Status column in the PurchaseOrderHeader table.

Procedure NameDescriptionParameters
dbo.ufnGetPurchaseOrderStatusTextScalar function returning the text representation of the Status column in the PurchaseOrderHeader table.@RETURN_VALUE nvarchar(15) [RETURN VALUE], @Status tinyint(3) [INPUT]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetSalesOrderStatusText', Scalar function returning the text representation of the Status column in the SalesOrderHeader table.

Procedure NameDescriptionParameters
dbo.ufnGetSalesOrderStatusTextScalar function returning the text representation of the Status column in the SalesOrderHeader table.@RETURN_VALUE nvarchar(15) [RETURN VALUE], @Status tinyint(3) [INPUT]
There are no Dependencies for this object.

Procedure/Function: 'dbo.ufnGetStock', Scalar function returning the quantity of inventory in LocationID 6 (Miscellaneous Storage)for a specified ProductID.

Procedure NameDescriptionParameters
dbo.ufnGetStockScalar function returning the quantity of inventory in LocationID 6 (Miscellaneous Storage)for a specified ProductID.@RETURN_VALUE int(10) [RETURN VALUE], @ProductID int(10) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnGetStock', 3 items

Object NameTypeField Name
Production.ProductInventoryuser tableProductID
Production.ProductInventoryuser tableLocationID
Production.ProductInventoryuser tableQuantity

Procedure/Function: 'dbo.ufnLeadingZeros', Scalar function used by the Sales.Customer table to help set the account number.

Procedure NameDescriptionParameters
dbo.ufnLeadingZerosScalar function used by the Sales.Customer table to help set the account number.@RETURN_VALUE varchar(8) [RETURN VALUE], @Value int(10) [INPUT]

Dependencies for Procedure/Function 'dbo.ufnLeadingZeros', 1 item

Object NameTypeField Name
Sales.Customeruser tableN/A

Procedure/Function: 'dbo.uspGetBillOfMaterials', Stored procedure using a recursive query to return a multi-level bill of material for the specified ProductID.

Procedure NameDescriptionParameters
dbo.uspGetBillOfMaterialsStored procedure using a recursive query to return a multi-level bill of material for the specified ProductID.@RETURN_VALUE int(10) [RETURN VALUE], @StartProductID int(10) [INPUT], @CheckDate datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.uspGetBillOfMaterials', 10 items

Object NameTypeField Name
Production.BillOfMaterialsuser tableProductAssemblyID
Production.BillOfMaterialsuser tableComponentID
Production.BillOfMaterialsuser tableStartDate
Production.BillOfMaterialsuser tableEndDate
Production.BillOfMaterialsuser tableBOMLevel
Production.BillOfMaterialsuser tablePerAssemblyQty
Production.Productuser tableProductID
Production.Productuser tableName
Production.Productuser tableStandardCost
Production.Productuser tableListPrice

Procedure/Function: 'dbo.uspGetEmployeeManagers', Stored procedure using a recursive query to return the direct and indirect managers of the specified employee.

Procedure NameDescriptionParameters
dbo.uspGetEmployeeManagersStored procedure using a recursive query to return the direct and indirect managers of the specified employee.@RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT]

Dependencies for Procedure/Function 'dbo.uspGetEmployeeManagers', 7 items

Object NameTypeField Name
Person.Contactuser tableContactID
Person.Contactuser tableFirstName
Person.Contactuser tableLastName
HumanResources.Employeeuser tableEmployeeID
HumanResources.Employeeuser tableContactID
HumanResources.Employeeuser tableManagerID
HumanResources.Employeeuser tableTitle

Procedure/Function: 'dbo.uspGetManagerEmployees', Stored procedure using a recursive query to return the direct and indirect employees of the specified manager.

Procedure NameDescriptionParameters
dbo.uspGetManagerEmployeesStored procedure using a recursive query to return the direct and indirect employees of the specified manager.@RETURN_VALUE int(10) [RETURN VALUE], @ManagerID int(10) [INPUT]

Dependencies for Procedure/Function 'dbo.uspGetManagerEmployees', 6 items

Object NameTypeField Name
Person.Contactuser tableContactID
Person.Contactuser tableFirstName
Person.Contactuser tableLastName
HumanResources.Employeeuser tableEmployeeID
HumanResources.Employeeuser tableContactID
HumanResources.Employeeuser tableManagerID

Procedure/Function: 'dbo.uspGetWhereUsedProductID', Stored procedure using a recursive query to return all components or assemblies that directly or indirectly use the specified ProductID.

Procedure NameDescriptionParameters
dbo.uspGetWhereUsedProductIDStored procedure using a recursive query to return all components or assemblies that directly or indirectly use the specified ProductID.@RETURN_VALUE int(10) [RETURN VALUE], @StartProductID int(10) [INPUT], @CheckDate datetime(23) [INPUT]

Dependencies for Procedure/Function 'dbo.uspGetWhereUsedProductID', 10 items

Object NameTypeField Name
Production.BillOfMaterialsuser tableProductAssemblyID
Production.BillOfMaterialsuser tableComponentID
Production.BillOfMaterialsuser tableStartDate
Production.BillOfMaterialsuser tableEndDate
Production.BillOfMaterialsuser tableBOMLevel
Production.BillOfMaterialsuser tablePerAssemblyQty
Production.Productuser tableProductID
Production.Productuser tableName
Production.Productuser tableStandardCost
Production.Productuser tableListPrice

Procedure/Function: 'dbo.uspLogError', Logs error information in the ErrorLog table about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without inserting error information.

Procedure NameDescriptionParameters
dbo.uspLogErrorLogs error information in the ErrorLog table about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without inserting error information.@RETURN_VALUE int(10) [RETURN VALUE], @ErrorLogID int(10) [INPUT and OUTPUT]

Dependencies for Procedure/Function 'dbo.uspLogError', 8 items

Object NameTypeField Name
dbo.uspPrintErrorstored procedureN/A
dbo.ErrorLoguser tableUserName
dbo.ErrorLoguser tableErrorNumber
dbo.ErrorLoguser tableErrorSeverity
dbo.ErrorLoguser tableErrorState
dbo.ErrorLoguser tableErrorProcedure
dbo.ErrorLoguser tableErrorLine
dbo.ErrorLoguser tableErrorMessage

Procedure/Function: 'dbo.uspPrintError', Prints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information.

Procedure NameDescriptionParameters
dbo.uspPrintErrorPrints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information.@RETURN_VALUE int(10) [RETURN VALUE]

Dependencies for Procedure/Function 'dbo.uspPrintError', 32 items

Object NameTypeField Name
dbo.uspLogErrorstored procedureN/A
HumanResources.uShifttriggerN/A
Person.uStateProvincetriggerN/A
Production.iWorkOrdertriggerN/A
Production.uScrapReasontriggerN/A
Production.uTransactionHistorytriggerN/A
Production.uTransactionHistoryArchivetriggerN/A
Production.uUnitMeasuretriggerN/A
Production.uWorkOrdertriggerN/A
Production.uWorkOrderRoutingtriggerN/A
Purchasing.dVendortriggerN/A
Purchasing.iPurchaseOrderDetailtriggerN/A
Purchasing.uPurchaseOrderDetailtriggerN/A
Purchasing.uPurchaseOrderHeadertriggerN/A
Purchasing.uShipMethodtriggerN/A
Purchasing.uVendortriggerN/A
Purchasing.uVendorAddresstriggerN/A
Purchasing.uVendorContacttriggerN/A
Sales.iduSalesOrderDetailtriggerN/A
Sales.iStoretriggerN/A
Sales.uSalesOrderHeadertriggerN/A
Sales.uSalesOrderHeaderSalesReasontriggerN/A
Sales.uSalesPersontriggerN/A
Sales.uSalesPersonQuotaHistorytriggerN/A
Sales.uSalesReasontriggerN/A
Sales.uSalesTaxRatetriggerN/A
Sales.uSalesTerritorytriggerN/A
Sales.uSalesTerritoryHistorytriggerN/A
Sales.uShoppingCartItemtriggerN/A
Sales.uSpecialOffertriggerN/A
Sales.uSpecialOfferProducttriggerN/A
Sales.uStoretriggerN/A

Procedure/Function: 'HumanResources.uspUpdateEmployeeHireInfo', Updates the Employee table and inserts a new row in the EmployeePayHistory table with the values specified in the input parameters.

Procedure NameDescriptionParameters
HumanResources.uspUpdateEmployeeHireInfoUpdates the Employee table and inserts a new row in the EmployeePayHistory table with the values specified in the input parameters.@RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT], @Title nvarchar(50) [INPUT], @HireDate datetime(23) [INPUT], @RateChangeDate datetime(23) [INPUT], @Rate money(19) [INPUT], @PayFrequency tinyint(3) [INPUT], @CurrentFlag Flag(1) [INPUT]

Dependencies for Procedure/Function 'HumanResources.uspUpdateEmployeeHireInfo', 8 items

Object NameTypeField Name
dbo.uspLogErrorstored procedureN/A
HumanResources.Employeeuser tableTitle
HumanResources.Employeeuser tableHireDate
HumanResources.Employeeuser tableCurrentFlag
HumanResources.EmployeePayHistoryuser tableEmployeeID
HumanResources.EmployeePayHistoryuser tableRateChangeDate
HumanResources.EmployeePayHistoryuser tableRate
HumanResources.EmployeePayHistoryuser tablePayFrequency

Procedure/Function: 'HumanResources.uspUpdateEmployeeLogin', Updates the Employee table with the values specified in the input parameters for the given EmployeeID.

Procedure NameDescriptionParameters
HumanResources.uspUpdateEmployeeLoginUpdates the Employee table with the values specified in the input parameters for the given EmployeeID.@RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT], @ManagerID int(10) [INPUT], @LoginID nvarchar(256) [INPUT], @Title nvarchar(50) [INPUT], @HireDate datetime(23) [INPUT], @CurrentFlag Flag(1) [INPUT]

Dependencies for Procedure/Function 'HumanResources.uspUpdateEmployeeLogin', 6 items

Object NameTypeField Name
dbo.uspLogErrorstored procedureN/A
HumanResources.Employeeuser tableLoginID
HumanResources.Employeeuser tableManagerID
HumanResources.Employeeuser tableTitle
HumanResources.Employeeuser tableHireDate
HumanResources.Employeeuser tableCurrentFlag

Procedure/Function: 'HumanResources.uspUpdateEmployeePersonalInfo', Updates the Employee table with the values specified in the input parameters for the given EmployeeID.

Procedure NameDescriptionParameters
HumanResources.uspUpdateEmployeePersonalInfoUpdates the Employee table with the values specified in the input parameters for the given EmployeeID.@RETURN_VALUE int(10) [RETURN VALUE], @EmployeeID int(10) [INPUT], @NationalIDNumber nvarchar(15) [INPUT], @BirthDate datetime(23) [INPUT], @MaritalStatus nchar(1) [INPUT], @Gender nchar(1) [INPUT]

Dependencies for Procedure/Function 'HumanResources.uspUpdateEmployeePersonalInfo', 5 items

Object NameTypeField Name
dbo.uspLogErrorstored procedureN/A
HumanResources.Employeeuser tableNationalIDNumber
HumanResources.Employeeuser tableBirthDate
HumanResources.Employeeuser tableMaritalStatus
HumanResources.Employeeuser tableGender

Rules

There are no rules in this database.

Database Level Triggers, 1 item

Name
ddlDatabaseTriggerLog

Data Types, 39 items

Type nameCodeSizeSizableNullableSearchableAutoincremenalScaleUser Type
xml-1520YesYesNoNo No
sql_variant-1508000NoYesExcept likeNo No
uniqueidentifier-1136YesYesExcept likeNo No
ntext-101073741823YesYesLike onlyNo No
nvarchar-94000YesYesYesNo No
sysname-9128YesNoYesNo No
AccountNumber-915YesYesYesNo Yes
Name-950YesYesYesNo Yes
OrderNumber-925YesYesYesNo Yes
Phone-925YesYesYesNo Yes
nchar-84000YesYesYesNo No
bit-71NoYesExcept likeNo No
Flag-71NoNoExcept likeNo No
NameStyle-71NoNoExcept likeNo No
tinyint-63NoYesExcept likeNo No
tinyint identity-63NoNoExcept likeYes No
bigint-519NoYesExcept likeNo No
bigint identity-519NoNoExcept likeYes No
image-42147483647YesYesNoNo No
varbinary-38000YesYesExcept likeNo No
binary-28000YesYesExcept likeNo No
timestamp-28YesNoExcept likeNo No
text-12147483647YesYesLike onlyNo No
char18000YesYesYesNo No
numeric238YesYesExcept likeNo0..38No
numeric() identity238NoNoExcept likeYes No
decimal338YesYesExcept likeNo0..38No
money319NoYesExcept likeNo No
smallmoney310NoYesExcept likeNo No
decimal() identity338NoNoExcept likeYes No
int410NoYesExcept likeNo No
int identity410NoNoExcept likeYes No
smallint55NoYesExcept likeNo No
smallint identity55NoNoExcept likeYes No
float615YesYesExcept likeNo No
real77YesYesExcept likeNo No
datetime1123NoYesYesNo No
smalldatetime1116NoYesYesNo No
varchar128000YesYesYesNo No