You are on page 1of 350

Schema Name Title

dbo AWBuildVersion
dbo DatabaseLog
dbo ErrorLog
HumanResources Department
HumanResources Employee
HumanResources EmployeeDepartmentHistory
HumanResources EmployeePayHistory
HumanResources JobCandidate
HumanResources Shif
Person Address
Person AddressType
Person BusinessEntity
Person BusinessEntityAddress
Person BusinessEntityContact
Person ContactType
Person CountryRegion
Person EmailAddress
Person Password
Person Person
Person PersonPhone
Person PhoneNumberType
Person StateProvince
Production BillOfMaterials
Production Culture
Production Document
Production Illustration
Production Location
Production Product
Production ProductCategory
Production ProductCostHistory
Production ProductDescription
Production ProductDocument
Production ProductInventory
Production ProductListPriceHistory
Production ProductModel
Production ProductModelIllustration
Production ProductModelProductDescriptionCulture
Production ProductPhoto
Production ProductProductPhoto
Production ProductReview
Production ProductSubcategory
Production ScrapReason
Production TransactionHistory
Production TransactionHistoryArchive
Production UnitMeasure
Production WorkOrder
Production WorkOrderRouting
Purchasing ProductVendor
Purchasing PurchaseOrderDetail
Purchasing PurchaseOrderHeader
Purchasing ShipMethod
Purchasing Vendor
Sales CountryRegionCurrency
Sales CreditCard
Sales Currency
Sales CurrencyRate
Sales Customer
Sales PersonCreditCard
Sales SalesOrderDetail
Sales SalesOrderHeader
Sales SalesOrderHeaderSalesReason
Sales SalesPerson
Sales SalesPersonQuotaHistory
Sales SalesReason
Sales SalesTaxRate
Sales SalesTerritory
Sales SalesTerritoryHistory
Sales ShoppingCartItem
Sales SpecialOffer
Sales SpecialOfferProduct
Sales Store
Schema Name Title
HumanResources vEmployee
HumanResources vEmployeeDepartment
HumanResources vEmployeeDepartmentHistory
HumanResources vJobCandidate
HumanResources vJobCandidateEducation
HumanResources vJobCandidateEmployment
Person vAdditionalContactInfo
Person vStateProvinceCountryRegion
Production vProductAndDescription
Production vProductModelCatalogDescription
Production vProductModelInstructions
Purchasing vVendorWithAddresses
Purchasing vVendorWithContacts
Sales vIndividualCustomer
Sales vPersonDemographics
Sales vSalesPerson
Sales vSalesPersonSalesByFiscalYears
Sales vStoreWithAddresses
Sales vStoreWithContacts
Sales vStoreWithDemographics
Schema Name Title
dbo uspLogError
dbo uspPrintError
dbo uspGetEmployeeManagers
dbo uspGetManagerEmployees
dbo uspSearchCandidateResumes
dbo uspGetBillOfMaterials
dbo uspGetWhereUsedProductID
Schema Name Title
dbo ufnGetAccountingEndDate
dbo ufnGetAccountingStartDate
dbo ufnGetDocumentStatusText
dbo ufnLeadingZeros
dbo ufnGetContactInformation
dbo ufnGetProductDealerPrice
dbo ufnGetProductListPrice
dbo ufnGetProductStandardCost
dbo ufnGetPurchaseOrderStatusText
dbo ufnGetStock
dbo ufnGetSalesOrderStatusText
Table:

Schema dbo
Name AWBuildVersion
Title

Columns
# Name Title
1 SystemInformationID
2 Database Version
3 VersionDate
4 ModifiedDate

Unique keys
# Name Columns
1 PK_AWBuildVersion_SystemInformationID SystemInformationID
Data type Description
tinyint Primary key for AWBuildVersion records.
nvarchar(25) Version number of the database in 9.yy.mm.dd.00 format.
datetime Date and time the record was last updated.
datetime Date and time the record was last updated.

Description
Primary key (clustered) constraint
Table:

Schema dbo
Name DatabaseLog
Title

Columns
# Name Title Data type
1 DatabaseLogID int
2 PostTime datetime
3 DatabaseUser nvarchar(128)
4 Event nvarchar(128)
5 Schema nvarchar(128)
6 Object nvarchar(128)
7 TSQL nvarchar(MAX)
8 XmlEvent xml

Unique keys
# Name Columns Description
1 PK_DatabaseLog_DatabaseLogID DatabaseLogID Primary key (nonclustered) constraint
Description
Primary key for DatabaseLog records.
The date and time the DDL change occurred.
The user who implemented the DDL change.
The type of DDL statement that was executed.
The schema to which the changed object belongs.
The object that was changed by the DDL statment.
The exact Transact-SQL statement that was executed.
The raw XML data generated by database trigger.
Table:

Schema dbo
Name ErrorLog
Title

Columns
# Name Title Data type
1 ErrorLogID int
2 ErrorTime datetime
3 UserName nvarchar(128)
4 ErrorNumber int
5 ErrorSeverity int
6 ErrorState int
7 ErrorProcedure nvarchar(126)
8 ErrorLine int
9 ErrorMessage nvarchar(4000)

Unique keys
# Name Columns Description
1 PK_ErrorLog_ErrorLogID ErrorLogID Primary key (clustered) constraint
Description
Primary key for ErrorLog records.
The date and time at which the error occurred.
The user who executed the batch in which the error occurred.
The error number of the error that occurred.
The severity of the error that occurred.
The state number of the error that occurred.
The name of the stored procedure or trigger where the error occurred.
The line number at which the error occurred.
The message text of the error that occurred.
Table:

Schema HumanResources
Name Department
Title

Columns
# Name Title
1 DepartmentID
2 Name
3 GroupName
4 ModifiedDate

Relations
# Foreign table Primary table
1 HumanResources.EmployeeDepartmentHistory HumanResources.Department

Unique keys
# Name Columns
1 PK_Department_DepartmentID DepartmentID
2 AK_Department_Name Name
Data type
smallint
nvarchar(50)
nvarchar(50)
datetime

Join
HumanResources.EmployeeDepartmentHistory.DepartmentID = DepartmentID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Primary key for Department records.
Name of the department.
Name of the group to which the department belongs.
Date and time the record was last updated.

Relation name
FK_EmployeeDepartmentHistory_Department_DepartmentID
Description
Foreign key constraint referencing Department.DepartmentID.
Table:

Schema HumanResources
Name Employee
Title

Columns
# Name Title
1 BusinessEntityID
2 NationalIDNumber
3 LoginID
4 OrganizationNode
5 OrganizationLevel
6 JobTitle
7 BirthDate
8 MaritalStatus
9 Gender
10 HireDate
11 SalariedFlag
12 VacationHours
13 SickLeaveHours
14 CurrentFlag
15 rowguid
16 ModifiedDate

Relations
# Foreign table Primary table
1 Production.Document HumanResources.Employee
2 HumanResources.EmployeeDepartmentHistory HumanResources.Employee
3 HumanResources.EmployeePayHistory HumanResources.Employee
4 HumanResources.JobCandidate HumanResources.Employee
5 Purchasing.PurchaseOrderHeader HumanResources.Employee
6 Sales.SalesPerson HumanResources.Employee
7 HumanResources.Employee Person.Person

Unique keys
# Name Columns
1 PK_Employee_BusinessEntityID BusinessEntityID
2 AK_Employee_LoginID LoginID
3 AK_Employee_NationalIDNumber NationalIDNumber
4 AK_Employee_rowguid rowguid
Data type
int
nvarchar(15)
nvarchar(256)
hierarchyid
smallint
nvarchar(50)
date
nchar(1)
nchar(1)
date
bit
smallint
smallint
bit
uniqueidentifier
datetime

Join
Production.Document.Owner = BusinessEntityID
HumanResources.EmployeeDepartmentHistory.BusinessEntityID = BusinessEntityID
HumanResources.EmployeePayHistory.BusinessEntityID = BusinessEntityID
HumanResources.JobCandidate.BusinessEntityID = BusinessEntityID
Purchasing.PurchaseOrderHeader.EmployeeID = BusinessEntityID
Sales.SalesPerson.BusinessEntityID = BusinessEntityID
BusinessEntityID = Person.Person.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for Employee records. Foreign key to BusinessEntity.BusinessEntityID.
Unique national identification number such as a social security number.
Network login.
Where the employee is located in corporate hierarchy.
The depth of the employee in the corporate hierarchy.
Work title such as Buyer or Sales Representative.
Date of birth.
M = Married, S = Single
M = Male, F = Female
Employee hired on this date.
Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining.
Number of available vacation hours.
Number of available sick leave hours.
0 = Inactive, 1 = Active
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_Document_Employee_Owner
FK_EmployeeDepartmentHistory_Employee_BusinessEntityID
FK_EmployeePayHistory_Employee_BusinessEntityID
FK_JobCandidate_Employee_BusinessEntityID
FK_PurchaseOrderHeader_Employee_EmployeeID
FK_SalesPerson_Employee_BusinessEntityID
FK_Employee_Person_BusinessEntityID
Description
Foreign key constraint referencing Employee.BusinessEntityID.
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing Person.BusinessEntityID.
Table:

Schema HumanResources
Name EmployeeDepartmentHistory
Title

Columns
# Name
1 BusinessEntityID
2 DepartmentID
3 ShifID
4 StartDate
5 EndDate
6 ModifiedDate

Relations
# Foreign table
1 HumanResources.EmployeeDepartmentHistory
2 HumanResources.EmployeeDepartmentHistory
3 HumanResources.EmployeeDepartmentHistory

Unique keys
# Name
1 PK_EmployeeDepartmentHistory_BusinessEntityID_StartDate_DepartmentID
Title

Primary table
HumanResources.Department
HumanResources.Employee
HumanResources.Shif

Columns
BusinessEntityID, StartDate, DepartmentID, ShifID
Data type
int
smallint
tinyint
date
date
datetime

Join
DepartmentID = HumanResources.Department.DepartmentID
BusinessEntityID = HumanResources.Employee.BusinessEntityID
ShifID = HumanResources.Shif.ShifID

Description
Primary key (clustered) constraint
Description
Employee identification number. Foreign key to Employee.BusinessEntityID.
Department in which the employee worked including currently. Foreign key to Department.DepartmentID.
Identifies which 8-hour shif the employee works. Foreign key to Shif.Shif.ID.
Date the employee started work in the department.
Date the employee lef the department. NULL = Current department.
Date and time the record was last updated.

Relation name
FK_EmployeeDepartmentHistory_Department_DepartmentID
FK_EmployeeDepartmentHistory_Employee_BusinessEntityID
FK_EmployeeDepartmentHistory_Shif_ShifID
Description
Foreign key constraint referencing Department.DepartmentID.
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing Shif.ShifID
Table:

Schema HumanResources
Name EmployeePayHistory
Title

Columns
# Name
1 BusinessEntityID
2 RateChangeDate
3 Rate
4 PayFrequency
5 ModifiedDate

Relations
# Foreign table
1 HumanResources.EmployeePayHistory

Unique keys
# Name
1 PK_EmployeePayHistory_BusinessEntityID_RateChangeDate
Title Data type
int
datetime
money
tinyint
datetime

Primary table Join


HumanResources.Employee BusinessEntityID = HumanResources.Employee.BusinessEntityID

Columns Description
BusinessEntityID, RateChangeDate Primary key (clustered) constraint
Description
Employee identification number. Foreign key to Employee.BusinessEntityID.
Date the change in pay is effective
Salary hourly rate.
1 = Salary received monthly, 2 = Salary received biweekly
Date and time the record was last updated.

Relation name
FK_EmployeePayHistory_Employee_BusinessEntityID
Description
Foreign key constraint referencing Employee.EmployeeID.
Table:

Schema HumanResources
Name JobCandidate
Title

Columns
# Name Title
1 JobCandidateID
2 BusinessEntityID
3 Resume
4 ModifiedDate

Relations
# Foreign table Primary table
1 HumanResources.JobCandidate HumanResources.Employee

Unique keys
# Name Columns
1 PK_JobCandidate_JobCandidateID JobCandidateID
Data type
int
int
xml
datetime

Join
BusinessEntityID = HumanResources.Employee.BusinessEntityID

Description
Primary key (clustered) constraint
Description
Primary key for JobCandidate records.
Employee identification number if applicant was hired. Foreign key to Employee.BusinessEntityID.
Résumé in XML format.
Date and time the record was last updated.

Relation name
FK_JobCandidate_Employee_BusinessEntityID
Description
Foreign key constraint referencing Employee.EmployeeID.
Table:

Schema HumanResources
Name Shif
Title

Columns
# Name Title
1 ShifID
2 Name
3 StartTime
4 EndTime
5 ModifiedDate

Relations
# Foreign table Primary table
1 HumanResources.EmployeeDepartmentHistory HumanResources.Shif

Unique keys
# Name Columns
1 PK_Shif_ShifID ShifID
2 AK_Shif_Name Name
3 AK_Shif_StartTime_EndTime StartTime, EndTime
Data type
tinyint
nvarchar(50)
time(7)
time(7)
datetime

Join
HumanResources.EmployeeDepartmentHistory.ShifID = ShifID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index.
Description
Primary key for Shif records.
Shif description.
Shif start time.
Shif end time.
Date and time the record was last updated.

Relation name Description


FK_EmployeeDepartmentHistory_Shif_ShifID Foreign key constraint referencing Shif.ShifID
Table:

Schema Person
Name Address
Title

Columns
# Name
1 AddressID
2 AddressLine1
3 AddressLine2
4 City
5 StateProvinceID
6 PostalCode
7 SpatialLocation
8 rowguid
9 ModifiedDate

Relations
# Foreign table
1 Person.BusinessEntityAddress
2 Sales.SalesOrderHeader
3 Sales.SalesOrderHeader
4 Person.Address

Unique keys
# Name
1 PK_Address_AddressID
2 AK_Address_rowguid
3 IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode
Title

Primary table
Person.Address
Person.Address
Person.Address
Person.StateProvince

Columns
AddressID
rowguid
AddressLine1, AddressLine2, City, StateProvinceID, PostalCode
Data type
int
nvarchar(60)
nvarchar(60)
nvarchar(30)
int
nvarchar(15)
geography
uniqueidentifier
datetime

Join
Person.BusinessEntityAddress.AddressID = AddressID
Sales.SalesOrderHeader.BillToAddressID = AddressID
Sales.SalesOrderHeader.ShipToAddressID = AddressID
StateProvinceID = Person.StateProvince.StateProvinceID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Nonclustered index.
Description
Primary key for Address records.
First street address line.
Second street address line.
Name of the city.
Unique identification number for the state or province. Foreign key to StateProvince table.
Postal code for the street address.
Latitude and longitude of this address.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_BusinessEntityAddress_Address_AddressID
FK_SalesOrderHeader_Address_BillToAddressID
FK_SalesOrderHeader_Address_ShipToAddressID
FK_Address_StateProvince_StateProvinceID
Description
Foreign key constraint referencing Address.AddressID.
Foreign key constraint referencing Address.AddressID.
Foreign key constraint referencing Address.AddressID.
Foreign key constraint referencing StateProvince.StateProvinceID.
Table:

Schema Person
Name AddressType
Title

Columns
# Name Title
1 AddressTypeID
2 Name
3 rowguid
4 ModifiedDate

Relations
# Foreign table Primary table
1 Person.BusinessEntityAddress Person.AddressType

Unique keys
# Name Columns
1 PK_AddressType_AddressTypeID AddressTypeID
2 AK_AddressType_Name Name
3 AK_AddressType_rowguid rowguid
Data type
int
nvarchar(50)
uniqueidentifier
datetime

Join
Person.BusinessEntityAddress.AddressTypeID = AddressTypeID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for AddressType records.
Address type description. For example, Billing, Home, or Shipping.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_BusinessEntityAddress_AddressType_AddressTypeID
Description
Foreign key constraint referencing AddressType.AddressTypeID.
Table:

Schema Person
Name BusinessEntity
Title

Columns
# Name Title
1 BusinessEntityID
2 rowguid
3 ModifiedDate

Relations
# Foreign table Primary table
1 Person.BusinessEntityAddress Person.BusinessEntity
2 Person.BusinessEntityContact Person.BusinessEntity
3 Person.Person Person.BusinessEntity
4 Sales.Store Person.BusinessEntity
5 Purchasing.Vendor Person.BusinessEntity

Unique keys
# Name Columns
1 PK_BusinessEntity_BusinessEntityID BusinessEntityID
2 AK_BusinessEntity_rowguid rowguid
Data type
int
uniqueidentifier
datetime

Join
Person.BusinessEntityAddress.BusinessEntityID = BusinessEntityID
Person.BusinessEntityContact.BusinessEntityID = BusinessEntityID
Person.Person.BusinessEntityID = BusinessEntityID
Sales.Store.BusinessEntityID = BusinessEntityID
Purchasing.Vendor.BusinessEntityID = BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key for all customers, vendors, and employees.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID
FK_BusinessEntityContact_BusinessEntity_BusinessEntityID
FK_Person_BusinessEntity_BusinessEntityID
FK_Store_BusinessEntity_BusinessEntityID
FK_Vendor_BusinessEntity_BusinessEntityID
Description
Foreign key constraint referencing BusinessEntity.BusinessEntityID.
Foreign key constraint referencing BusinessEntity.BusinessEntityID.
Foreign key constraint referencing BusinessEntity.BusinessEntityID.
Foreign key constraint referencing BusinessEntity.BusinessEntityID
Foreign key constraint referencing BusinessEntity.BusinessEntityID
Table:

Schema Person
Name BusinessEntityAddress
Title

Columns
# Name
1 BusinessEntityID
2 AddressID
3 AddressTypeID
4 rowguid
5 ModifiedDate

Relations
# Foreign table
1 Person.BusinessEntityAddress
2 Person.BusinessEntityAddress
3 Person.BusinessEntityAddress

Unique keys
# Name
1 PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID
2 AK_BusinessEntityAddress_rowguid
Title

Primary table
Person.Address
Person.AddressType
Person.BusinessEntity

Columns
BusinessEntityID, AddressID, AddressTypeID
rowguid
Data type
int
int
int
uniqueidentifier
datetime

Join
AddressID = Person.Address.AddressID
AddressTypeID = Person.AddressType.AddressTypeID
BusinessEntityID = Person.BusinessEntity.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key. Foreign key to BusinessEntity.BusinessEntityID.
Primary key. Foreign key to Address.AddressID.
Primary key. Foreign key to AddressType.AddressTypeID.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_BusinessEntityAddress_Address_AddressID
FK_BusinessEntityAddress_AddressType_AddressTypeID
FK_BusinessEntityAddress_BusinessEntity_BusinessEntityID
Description
Foreign key constraint referencing Address.AddressID.
Foreign key constraint referencing AddressType.AddressTypeID.
Foreign key constraint referencing BusinessEntity.BusinessEntityID.
Table:

Schema Person
Name BusinessEntityContact
Title

Columns
# Name
1 BusinessEntityID
2 PersonID
3 ContactTypeID
4 rowguid
5 ModifiedDate

Relations
# Foreign table
1 Person.BusinessEntityContact
2 Person.BusinessEntityContact
3 Person.BusinessEntityContact

Unique keys
# Name
1 PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID
2 AK_BusinessEntityContact_rowguid
Title

Primary table
Person.BusinessEntity
Person.ContactType
Person.Person

Columns
BusinessEntityID, PersonID, ContactTypeID
rowguid
Data type
int
int
int
uniqueidentifier
datetime

Join
BusinessEntityID = Person.BusinessEntity.BusinessEntityID
ContactTypeID = Person.ContactType.ContactTypeID
PersonID = Person.Person.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key. Foreign key to BusinessEntity.BusinessEntityID.
Primary key. Foreign key to Person.BusinessEntityID.
Primary key. Foreign key to ContactType.ContactTypeID.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_BusinessEntityContact_BusinessEntity_BusinessEntityID
FK_BusinessEntityContact_ContactType_ContactTypeID
FK_BusinessEntityContact_Person_PersonID
Description
Foreign key constraint referencing BusinessEntity.BusinessEntityID.
Foreign key constraint referencing ContactType.ContactTypeID.
Foreign key constraint referencing Person.BusinessEntityID.
Table:

Schema Person
Name ContactType
Title

Columns
# Name Title
1 ContactTypeID
2 Name
3 ModifiedDate

Relations
# Foreign table Primary table
1 Person.BusinessEntityContact Person.ContactType

Unique keys
# Name Columns
1 PK_ContactType_ContactTypeID ContactTypeID
2 AK_ContactType_Name Name
Data type
int
nvarchar(50)
datetime

Join
Person.BusinessEntityContact.ContactTypeID = ContactTypeID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Primary key for ContactType records.
Contact type description.
Date and time the record was last updated.

Relation name
FK_BusinessEntityContact_ContactType_ContactTypeID
Description
Foreign key constraint referencing ContactType.ContactTypeID.
Table:

Schema Person
Name CountryRegion
Title

Columns
# Name Title
1 CountryRegionCode
2 Name
3 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.CountryRegionCurrency Person.CountryRegion
2 Sales.SalesTerritory Person.CountryRegion
3 Person.StateProvince Person.CountryRegion

Unique keys
# Name Columns
1 PK_CountryRegion_CountryRegionCode CountryRegionCode
2 AK_CountryRegion_Name Name
Data type
nvarchar(3)
nvarchar(50)
datetime

Join
Sales.CountryRegionCurrency.CountryRegionCode = CountryRegionCode
Sales.SalesTerritory.CountryRegionCode = CountryRegionCode
Person.StateProvince.CountryRegionCode = CountryRegionCode

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
ISO standard code for countries and regions.
Country or region name.
Date and time the record was last updated.

Relation name
FK_CountryRegionCurrency_CountryRegion_CountryRegionCode
FK_SalesTerritory_CountryRegion_CountryRegionCode
FK_StateProvince_CountryRegion_CountryRegionCode
Description
Foreign key constraint referencing CountryRegion.CountryRegionCode.
Foreign key constraint referencing CountryRegion.CountryRegionCode.
Foreign key constraint referencing CountryRegion.CountryRegionCode.
Table:

Schema Person
Name EmailAddress
Title

Columns
# Name Title
1 BusinessEntityID
2 EmailAddressID
3 EmailAddress
4 rowguid
5 ModifiedDate

Relations
# Foreign table Primary table
1 Person.EmailAddress Person.Person

Unique keys
# Name Columns
1 PK_EmailAddress_BusinessEntityID_EmailAddressID BusinessEntityID, EmailAddressID
Data type
int
int
nvarchar(50)
uniqueidentifier
datetime

Join
BusinessEntityID = Person.Person.BusinessEntityID

Description
Primary key (clustered) constraint
Description
Primary key. Person associated with this email address. Foreign key to Person.BusinessEntityID
Primary key. ID of this email address.
E-mail address for the person.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_EmailAddress_Person_BusinessEntityID
Description
Foreign key constraint referencing Person.BusinessEntityID.
Table:

Schema Person
Name Password
Title

Columns
# Name Title
1 BusinessEntityID
2 PasswordHash
3 PasswordSalt
4 rowguid
5 ModifiedDate

Relations
# Foreign table Primary table
1 Person.Password Person.Person

Unique keys
# Name Columns
1 PK_Password_BusinessEntityID BusinessEntityID
Data type
int
varchar(128)
varchar(10)
uniqueidentifier
datetime

Join
BusinessEntityID = Person.Person.BusinessEntityID

Description
Primary key (clustered) constraint
Description

Password for the e-mail account.


Random value concatenated with the password string before the password is hashed.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_Password_Person_BusinessEntityID
Description
Foreign key constraint referencing Person.BusinessEntityID.
Table:

Schema Person
Name Person
Title

Columns
# Name Title
1 BusinessEntityID
2 PersonType
3 NameStyle
4 Title
5 FirstName
6 MiddleName
7 LastName
8 Suffix
9 EmailPromotion
10 AdditionalContactInfo
11 Demographics
12 rowguid
13 ModifiedDate

Relations
# Foreign table Primary table
1 Person.BusinessEntityContact Person.Person
2 Sales.Customer Person.Person
3 Person.EmailAddress Person.Person
4 HumanResources.Employee Person.Person
5 Person.Password Person.Person
6 Sales.PersonCreditCard Person.Person
7 Person.PersonPhone Person.Person
8 Person.Person Person.BusinessEntity

Unique keys
# Name Columns
1 PK_Person_BusinessEntityID BusinessEntityID
2 AK_Person_rowguid rowguid

Triggers
# Name When
1 iuPerson Afer Insert, Update
Data type
int
nchar(2)
bit
nvarchar(8)
nvarchar(50)
nvarchar(50)
nvarchar(50)
nvarchar(10)
int
xml
xml
uniqueidentifier
datetime

Join
Person.BusinessEntityContact.PersonID = BusinessEntityID
Sales.Customer.PersonID = BusinessEntityID
Person.EmailAddress.BusinessEntityID = BusinessEntityID
HumanResources.Employee.BusinessEntityID = BusinessEntityID
Person.Password.BusinessEntityID = BusinessEntityID
Sales.PersonCreditCard.BusinessEntityID = BusinessEntityID
Person.PersonPhone.BusinessEntityID = BusinessEntityID
BusinessEntityID = Person.BusinessEntity.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.

Description
AFTER INSERT, UPDATE trigger inserting Individual only if the Customer does not exist in the Store table and setting the Modifie
Description
Primary key for Person records.
Primary type of person: SC = Store Contact, IN = Individual (retail) customer, SP = Sales person, EM = Employee (non-sales), VC
0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name,
A courtesy title. For example, Mr. or Ms.
First name of the person.
Middle name or middle initial of the person.
Last name of the person.
Surname suffix. For example, Sr. or Jr.
0 = Contact does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureW
Additional contact information about the person stored in xml format.
Personal information such as hobbies, and income collected from online shoppers. Used for sales analysis.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_BusinessEntityContact_Person_PersonID
FK_Customer_Person_PersonID
FK_EmailAddress_Person_BusinessEntityID
FK_Employee_Person_BusinessEntityID
FK_Password_Person_BusinessEntityID
FK_PersonCreditCard_Person_BusinessEntityID
FK_PersonPhone_Person_BusinessEntityID
FK_Person_BusinessEntity_BusinessEntityID
Description
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing BusinessEntity.BusinessEntityID.
Table:

Schema Person
Name PersonPhone
Title

Columns
# Name
1 BusinessEntityID
2 PhoneNumber
3 PhoneNumberTypeID
4 ModifiedDate

Relations
# Foreign table
1 Person.PersonPhone
2 Person.PersonPhone

Unique keys
# Name
1 PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID
Title

Primary table
Person.Person
Person.PhoneNumberType

Columns
BusinessEntityID, PhoneNumber, PhoneNumberTypeID
Data type
int
nvarchar(25)
int
datetime

Join
BusinessEntityID = Person.Person.BusinessEntityID
PhoneNumberTypeID = Person.PhoneNumberType.PhoneNumberTypeID

Description
Primary key (clustered) constraint
Description
Business entity identification number. Foreign key to Person.BusinessEntityID.
Telephone number identification number.
Kind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID.
Date and time the record was last updated.

Relation name
FK_PersonPhone_Person_BusinessEntityID
FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID
Description
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing PhoneNumberType.PhoneNumberTypeID.
Table:

Schema Person
Name PhoneNumberType
Title

Columns
# Name Title
1 PhoneNumberTypeID
2 Name
3 ModifiedDate

Relations
# Foreign table Primary table
1 Person.PersonPhone Person.PhoneNumberType

Unique keys
# Name Columns
1 PK_PhoneNumberType_PhoneNumberTypeID PhoneNumberTypeID
Data type
int
nvarchar(50)
datetime

Join
Person.PersonPhone.PhoneNumberTypeID = PhoneNumberTypeID

Description
Primary key (clustered) constraint
Description
Primary key for telephone number type records.
Name of the telephone number type
Date and time the record was last updated.

Relation name
FK_PersonPhone_PhoneNumberType_PhoneNumberTypeID
Description
Foreign key constraint referencing PhoneNumberType.PhoneNumberTypeID.
Table:

Schema Person
Name StateProvince
Title

Columns
# Name
1 StateProvinceID
2 StateProvinceCode
3 CountryRegionCode
4 IsOnlyStateProvinceFlag
5 Name
6 TerritoryID
7 rowguid
8 ModifiedDate

Relations
# Foreign table
1 Person.Address
2 Sales.SalesTaxRate
3 Person.StateProvince
4 Person.StateProvince

Unique keys
# Name
1 PK_StateProvince_StateProvinceID
2 AK_StateProvince_Name
3 AK_StateProvince_rowguid
4 AK_StateProvince_StateProvinceCode_CountryRegionCode
Title

Primary table
Person.StateProvince
Person.StateProvince
Person.CountryRegion
Sales.SalesTerritory

Columns
StateProvinceID
Name
rowguid
StateProvinceCode, CountryRegionCode
Data type
int
nchar(3)
nvarchar(3)
bit
nvarchar(50)
int
uniqueidentifier
datetime

Join
Person.Address.StateProvinceID = StateProvinceID
Sales.SalesTaxRate.StateProvinceID = StateProvinceID
CountryRegionCode = Person.CountryRegion.CountryRegionCode
TerritoryID = Sales.SalesTerritory.TerritoryID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Unique nonclustered index.
Description
Primary key for StateProvince records.
ISO standard state or province code.
ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
State or province description.
ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_Address_StateProvince_StateProvinceID
FK_SalesTaxRate_StateProvince_StateProvinceID
FK_StateProvince_CountryRegion_CountryRegionCode
FK_StateProvince_SalesTerritory_TerritoryID
Description
Foreign key constraint referencing StateProvince.StateProvinceID.
Foreign key constraint referencing StateProvince.StateProvinceID.
Foreign key constraint referencing CountryRegion.CountryRegionCode.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Table:

Schema Production
Name BillOfMaterials
Title

Columns
# Name
1 BillOfMaterialsID
2 ProductAssemblyID
3 ComponentID
4 StartDate
5 EndDate
6 UnitMeasureCode
7 BOMLevel
8 PerAssemblyQty
9 ModifiedDate

Relations
# Foreign table
1 Production.BillOfMaterials
2 Production.BillOfMaterials
3 Production.BillOfMaterials

Unique keys
# Name
1 PK_BillOfMaterials_BillOfMaterialsID
2 AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate
Title

Primary table
Production.Product
Production.Product
Production.UnitMeasure

Columns
BillOfMaterialsID
ProductAssemblyID, ComponentID, StartDate
Data type
int
int
int
datetime
datetime
nchar(3)
smallint
decimal(8, 2)
datetime

Join
ComponentID = Production.Product.ProductID
ProductAssemblyID = Production.Product.ProductID
UnitMeasureCode = Production.UnitMeasure.UnitMeasureCode

Description
Primary key (clustered) constraint
Clustered index.
Description
Primary key for BillOfMaterials records.
Parent product identification number. Foreign key to Product.ProductID.
Component identification number. Foreign key to Product.ProductID.
Date the component started being used in the assembly item.
Date the component stopped being used in the assembly item.
Standard code identifying the unit of measure for the quantity.
Indicates the depth the component is from its parent (AssemblyID).
Quantity of the component needed to create the assembly.
Date and time the record was last updated.

Relation name
FK_BillOfMaterials_Product_ComponentID
FK_BillOfMaterials_Product_ProductAssemblyID
FK_BillOfMaterials_UnitMeasure_UnitMeasureCode
Description
Foreign key constraint referencing Product.ProductAssemblyID.
Foreign key constraint referencing Product.ProductAssemblyID.
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Table:

Schema Production
Name Culture
Title

Columns
# Name Title
1 CultureID
2 Name
3 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductModelProductDescriptionCulture Production.Culture

Unique keys
# Name Columns
1 PK_Culture_CultureID CultureID
2 AK_Culture_Name Name
Data type
nchar(6)
nvarchar(50)
datetime

Join
Production.ProductModelProductDescriptionCulture.CultureID = CultureID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Primary key for Culture records.
Culture description.
Date and time the record was last updated.

Relation name
FK_ProductModelProductDescriptionCulture_Culture_CultureID
Description
Foreign key constraint referencing Culture.CultureID.
Table:

Schema Production
Name Document
Title

Columns
# Name Title
1 DocumentNode
2 DocumentLevel
3 Title
4 Owner
5 FolderFlag
6 FileName
7 FileExtension
8 Revision
9 ChangeNumber
10 Status
11 DocumentSummary
12 Document
13 rowguid
14 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductDocument Production.Document
2 Production.Document HumanResources.Employee

Unique keys
# Name Columns
1 PK_Document_DocumentNode DocumentNode
2 AK_Document_DocumentLevel_DocumentNode DocumentLevel, DocumentNode
3 AK_Document_rowguid rowguid
4 UQ__Document__F73921F793071A63 rowguid
Data type
hierarchyid
smallint
nvarchar(50)
int
bit
nvarchar(400)
nvarchar(8)
nchar(5)
int
tinyint
nvarchar(MAX)
varbinary(MAX)
uniqueidentifier
datetime

Join
Production.ProductDocument.DocumentNode = DocumentNode
Owner = HumanResources.Employee.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support FileStream.
Description
Primary key for Document records.
Depth in the document hierarchy.
Title of the document.
Employee who controls the document. Foreign key to Employee.BusinessEntityID
0 = This is a folder, 1 = This is a document.
File name of the document
File extension indicating the document type. For example, .doc or .txt.
Revision number of the document.
Engineering change approval number.
1 = Pending approval, 2 = Approved, 3 = Obsolete
Document abstract.
Complete document.
ROWGUIDCOL number uniquely identifying the record. Required for FileStream.
Date and time the record was last updated.

Relation name
FK_ProductDocument_Document_DocumentNode
FK_Document_Employee_Owner
Description
Foreign key constraint referencing Document.DocumentNode.
Foreign key constraint referencing Employee.BusinessEntityID.
Table:

Schema Production
Name Illustration
Title

Columns
# Name Title
1 IllustrationID
2 Diagram
3 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductModelIllustration Production.Illustration

Unique keys
# Name Columns
1 PK_Illustration_IllustrationID IllustrationID
Data type
int
xml
datetime

Join
Production.ProductModelIllustration.IllustrationID = IllustrationID

Description
Primary key (clustered) constraint
Description
Primary key for Illustration records.
Illustrations used in manufacturing instructions. Stored as XML.
Date and time the record was last updated.

Relation name
FK_ProductModelIllustration_Illustration_IllustrationID
Description
Foreign key constraint referencing Illustration.IllustrationID.
Table:

Schema Production
Name Location
Title

Columns
# Name Title
1 LocationID
2 Name
3 CostRate
4 Availability
5 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductInventory Production.Location
2 Production.WorkOrderRouting Production.Location

Unique keys
# Name Columns
1 PK_Location_LocationID LocationID
2 AK_Location_Name Name
Data type
smallint
nvarchar(50)
smallmoney
decimal(8, 2)
datetime

Join
Production.ProductInventory.LocationID = LocationID
Production.WorkOrderRouting.LocationID = LocationID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Primary key for Location records.
Location description.
Standard hourly cost of the manufacturing location.
Work capacity (in hours) of the manufacturing location.
Date and time the record was last updated.

Relation name
FK_ProductInventory_Location_LocationID
FK_WorkOrderRouting_Location_LocationID
Description
Foreign key constraint referencing Location.LocationID.
Foreign key constraint referencing Location.LocationID.
Table:

Schema Production
Name Product
Title

Columns
# Name Title
1 ProductID
2 Name
3 ProductNumber
4 MakeFlag
5 FinishedGoodsFlag
6 Color
7 SafetyStockLevel
8 ReorderPoint
9 StandardCost
10 ListPrice
11 Size
12 SizeUnitMeasureCode
13 WeightUnitMeasureCode
14 Weight
15 DaysToManufacture
16 ProductLine
17 Class
18 Style
19 ProductSubcategoryID
20 ProductModelID
21 SellStartDate
22 SellEndDate
23 DiscontinuedDate
24 rowguid
25 ModifiedDate

Relations
# Foreign table Primary table
1 Production.BillOfMaterials Production.Product
2 Production.BillOfMaterials Production.Product
3 Production.ProductCostHistory Production.Product
4 Production.ProductDocument Production.Product
5 Production.ProductInventory Production.Product
6 Production.ProductListPriceHistory Production.Product
7 Production.ProductProductPhoto Production.Product
8 Production.ProductReview Production.Product
9 Purchasing.ProductVendor Production.Product
10 Purchasing.PurchaseOrderDetail Production.Product
11 Sales.ShoppingCartItem Production.Product
12 Sales.SpecialOfferProduct Production.Product
13 Production.TransactionHistory Production.Product
14 Production.WorkOrder Production.Product
15 Production.Product Production.ProductModel
16 Production.Product Production.ProductSubcategory
17 Production.Product Production.UnitMeasure
18 Production.Product Production.UnitMeasure

Unique keys
# Name Columns
1 PK_Product_ProductID ProductID
2 AK_Product_Name Name
3 AK_Product_ProductNumber ProductNumber
4 AK_Product_rowguid rowguid
Data type
int
nvarchar(50)
nvarchar(25)
bit
bit
nvarchar(15)
smallint
smallint
money
money
nvarchar(5)
nchar(3)
nchar(3)
decimal(8, 2)
int
nchar(2)
nchar(2)
nchar(2)
int
int
datetime
datetime
datetime
uniqueidentifier
datetime

Join
Production.BillOfMaterials.ComponentID = ProductID
Production.BillOfMaterials.ProductAssemblyID = ProductID
Production.ProductCostHistory.ProductID = ProductID
Production.ProductDocument.ProductID = ProductID
Production.ProductInventory.ProductID = ProductID
Production.ProductListPriceHistory.ProductID = ProductID
Production.ProductProductPhoto.ProductID = ProductID
Production.ProductReview.ProductID = ProductID
Purchasing.ProductVendor.ProductID = ProductID
Purchasing.PurchaseOrderDetail.ProductID = ProductID
Sales.ShoppingCartItem.ProductID = ProductID
Sales.SpecialOfferProduct.ProductID = ProductID
Production.TransactionHistory.ProductID = ProductID
Production.WorkOrder.ProductID = ProductID
ProductModelID = Production.ProductModel.ProductModelID
ProductSubcategoryID = Production.ProductSubcategory.ProductSubcategoryID
SizeUnitMeasureCode = Production.UnitMeasure.UnitMeasureCode
WeightUnitMeasureCode = Production.UnitMeasure.UnitMeasureCode

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for Product records.
Name of the product.
Unique product identification number.
0 = Product is purchased, 1 = Product is manufactured in-house.
0 = Product is not a salable item. 1 = Product is salable.
Product color.
Minimum inventory quantity.
Inventory level that triggers a purchase order or work order.
Standard cost of the product.
Selling price.
Product size.
Unit of measure for Size column.
Unit of measure for Weight column.
Product weight.
Number of days required to manufacture the product.
R = Road, M = Mountain, T = Touring, S = Standard
H = High, M = Medium, L = Low
W = Womens, M = Mens, U = Universal
Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID.
Product is a member of this product model. Foreign key to ProductModel.ProductModelID.
Date the product was available for sale.
Date the product was no longer available for sale.
Date the product was discontinued.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_BillOfMaterials_Product_ComponentID
FK_BillOfMaterials_Product_ProductAssemblyID
FK_ProductCostHistory_Product_ProductID
FK_ProductDocument_Product_ProductID
FK_ProductInventory_Product_ProductID
FK_ProductListPriceHistory_Product_ProductID
FK_ProductProductPhoto_Product_ProductID
FK_ProductReview_Product_ProductID
FK_ProductVendor_Product_ProductID
FK_PurchaseOrderDetail_Product_ProductID
FK_ShoppingCartItem_Product_ProductID
FK_SpecialOfferProduct_Product_ProductID
FK_TransactionHistory_Product_ProductID
FK_WorkOrder_Product_ProductID
FK_Product_ProductModel_ProductModelID
FK_Product_ProductSubcategory_ProductSubcategoryID
FK_Product_UnitMeasure_SizeUnitMeasureCode
FK_Product_UnitMeasure_WeightUnitMeasureCode
Description
Foreign key constraint referencing Product.ProductAssemblyID.
Foreign key constraint referencing Product.ProductAssemblyID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing ProductModel.ProductModelID.
Foreign key constraint referencing ProductSubcategory.ProductSubcategoryID.
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Table:

Schema Production
Name ProductCategory
Title

Columns
# Name Title
1 ProductCategoryID
2 Name
3 rowguid
4 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductSubcategory Production.ProductCategory

Unique keys
# Name Columns
1 PK_ProductCategory_ProductCategoryID ProductCategoryID
2 AK_ProductCategory_Name Name
3 AK_ProductCategory_rowguid rowguid
Data type
int
nvarchar(50)
uniqueidentifier
datetime

Join
Production.ProductSubcategory.ProductCategoryID = ProductCategoryID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for ProductCategory records.
Category description.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_ProductSubcategory_ProductCategory_ProductCategoryID
Description
Foreign key constraint referencing ProductCategory.ProductCategoryID.
Table:

Schema Production
Name ProductCostHistory
Title

Columns
# Name Title
1 ProductID
2 StartDate
3 EndDate
4 StandardCost
5 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductCostHistory Production.Product

Unique keys
# Name Columns
1 PK_ProductCostHistory_ProductID_StartDate ProductID, StartDate
Data type
int
datetime
datetime
money
datetime

Join
ProductID = Production.Product.ProductID

Description
Primary key (clustered) constraint
Description
Product identification number. Foreign key to Product.ProductID
Product cost start date.
Product cost end date.
Standard cost of the product.
Date and time the record was last updated.

Relation name
FK_ProductCostHistory_Product_ProductID
Description
Foreign key constraint referencing Product.ProductID.
Table:

Schema Production
Name ProductDescription
Title

Columns
# Name Title
1 ProductDescriptionID
2 Description
3 rowguid
4 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductModelProductDescriptionCulture Production.ProductDescription

Unique keys
# Name Columns
1 PK_ProductDescription_ProductDescriptionID ProductDescriptionID
2 AK_ProductDescription_rowguid rowguid
Data type
int
nvarchar(400)
uniqueidentifier
datetime

Join
Production.ProductModelProductDescriptionCulture.ProductDescriptionID = ProductDescriptionID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key for ProductDescription records.
Description of the product.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID
Description
Foreign key constraint referencing ProductDescription.ProductDescriptionID.
Table:

Schema Production
Name ProductDocument
Title

Columns
# Name Title
1 ProductID
2 DocumentNode
3 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductDocument Production.Document
2 Production.ProductDocument Production.Product

Unique keys
# Name Columns
1 PK_ProductDocument_ProductID_DocumentNode ProductID, DocumentNode
Data type
int
hierarchyid
datetime

Join
DocumentNode = Production.Document.DocumentNode
ProductID = Production.Product.ProductID

Description
Primary key (clustered) constraint
Description
Product identification number. Foreign key to Product.ProductID.
Document identification number. Foreign key to Document.DocumentNode.
Date and time the record was last updated.

Relation name
FK_ProductDocument_Document_DocumentNode
FK_ProductDocument_Product_ProductID
Description
Foreign key constraint referencing Document.DocumentNode.
Foreign key constraint referencing Product.ProductID.
Table:

Schema Production
Name ProductInventory
Title

Columns
# Name Title
1 ProductID
2 LocationID
3 Shelf
4 Bin
5 Quantity
6 rowguid
7 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductInventory Production.Location
2 Production.ProductInventory Production.Product

Unique keys
# Name Columns
1 PK_ProductInventory_ProductID_LocationID ProductID, LocationID
Data type
int
smallint
nvarchar(10)
tinyint
smallint
uniqueidentifier
datetime

Join
LocationID = Production.Location.LocationID
ProductID = Production.Product.ProductID

Description
Primary key (clustered) constraint
Description
Product identification number. Foreign key to Product.ProductID.
Inventory location identification number. Foreign key to Location.LocationID.
Storage compartment within an inventory location.
Storage container on a shelf in an inventory location.
Quantity of products in the inventory location.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_ProductInventory_Location_LocationID
FK_ProductInventory_Product_ProductID
Description
Foreign key constraint referencing Location.LocationID.
Foreign key constraint referencing Product.ProductID.
Table:

Schema Production
Name ProductListPriceHistory
Title

Columns
# Name Title
1 ProductID
2 StartDate
3 EndDate
4 ListPrice
5 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductListPriceHistory Production.Product

Unique keys
# Name Columns
1 PK_ProductListPriceHistory_ProductID_StartDate ProductID, StartDate
Data type
int
datetime
datetime
money
datetime

Join
ProductID = Production.Product.ProductID

Description
Primary key (clustered) constraint
Description
Product identification number. Foreign key to Product.ProductID
List price start date.
List price end date
Product list price.
Date and time the record was last updated.

Relation name
FK_ProductListPriceHistory_Product_ProductID
Description
Foreign key constraint referencing Product.ProductID.
Table:

Schema Production
Name ProductModel
Title

Columns
# Name Title
1 ProductModelID
2 Name
3 CatalogDescription
4 Instructions
5 rowguid
6 ModifiedDate

Relations
# Foreign table Primary table
1 Production.Product Production.ProductModel
2 Production.ProductModelIllustration Production.ProductModel
3 Production.ProductModelProductDescriptionCulture Production.ProductModel

Unique keys
# Name Columns
1 PK_ProductModel_ProductModelID ProductModelID
2 AK_ProductModel_Name Name
3 AK_ProductModel_rowguid rowguid
Data type
int
nvarchar(50)
xml
xml
uniqueidentifier
datetime

Join
Production.Product.ProductModelID = ProductModelID
Production.ProductModelIllustration.ProductModelID = ProductModelID
Production.ProductModelProductDescriptionCulture.ProductModelID = ProductModelID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for ProductModel records.
Product model description.
Detailed product catalog information in xml format.
Manufacturing instructions in xml format.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_Product_ProductModel_ProductModelID
FK_ProductModelIllustration_ProductModel_ProductModelID
FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID
Description
Foreign key constraint referencing ProductModel.ProductModelID.
Foreign key constraint referencing ProductModel.ProductModelID.
Foreign key constraint referencing ProductModel.ProductModelID.
Table:

Schema Production
Name ProductModelIllustration
Title

Columns
# Name
1 ProductModelID
2 IllustrationID
3 ModifiedDate

Relations
# Foreign table
1 Production.ProductModelIllustration
2 Production.ProductModelIllustration

Unique keys
# Name
1 PK_ProductModelIllustration_ProductModelID_IllustrationID
Title Data type
int
int
datetime

Primary table Join


Production.Illustration IllustrationID = Production.Illustration.IllustrationID
Production.ProductModel ProductModelID = Production.ProductModel.ProductModelID

Columns Description
ProductModelID, IllustrationID Primary key (clustered) constraint
Description
Primary key. Foreign key to ProductModel.ProductModelID.
Primary key. Foreign key to Illustration.IllustrationID.
Date and time the record was last updated.

Relation name
FK_ProductModelIllustration_Illustration_IllustrationID
FK_ProductModelIllustration_ProductModel_ProductModelID
Description
Foreign key constraint referencing Illustration.IllustrationID.
Foreign key constraint referencing ProductModel.ProductModelID.
Table:

Schema
Name
Title

Columns
#
1
2
3
4

Relations
#
1
2
3

Unique keys
#
1
Production
ProductModelProductDescriptionCulture

Name
ProductModelID
ProductDescriptionID
CultureID
ModifiedDate

Foreign table
Production.ProductModelProductDescriptionCulture
Production.ProductModelProductDescriptionCulture
Production.ProductModelProductDescriptionCulture

Name
PK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptionID_CultureID
Title

Primary table
Production.Culture
Production.ProductDescription
Production.ProductModel

Columns
ProductModelID, ProductDescriptionID, CultureID
Data type
int
int
nchar(6)
datetime

Join
CultureID = Production.Culture.CultureID
ProductDescriptionID = Production.ProductDescription.ProductDescriptionID
ProductModelID = Production.ProductModel.ProductModelID

Description
Primary key (clustered) constraint
Description
Primary key. Foreign key to ProductModel.ProductModelID.
Primary key. Foreign key to ProductDescription.ProductDescriptionID.
Culture identification number. Foreign key to Culture.CultureID.
Date and time the record was last updated.

Relation name
FK_ProductModelProductDescriptionCulture_Culture_CultureID
FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID
FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID
Description
Foreign key constraint referencing Culture.CultureID.
Foreign key constraint referencing ProductDescription.ProductDescriptionID.
Foreign key constraint referencing ProductModel.ProductModelID.
Table:

Schema Production
Name ProductPhoto
Title

Columns
# Name Title
1 ProductPhotoID
2 ThumbNailPhoto
3 ThumbnailPhotoFileName
4 LargePhoto
5 LargePhotoFileName
6 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductProductPhoto Production.ProductPhoto

Unique keys
# Name Columns
1 PK_ProductPhoto_ProductPhotoID ProductPhotoID
Data type
int
varbinary(MAX)
nvarchar(50)
varbinary(MAX)
nvarchar(50)
datetime

Join
Production.ProductProductPhoto.ProductPhotoID = ProductPhotoID

Description
Primary key (clustered) constraint
Description
Primary key for ProductPhoto records.
Small image of the product.
Small image file name.
Large image of the product.
Large image file name.
Date and time the record was last updated.

Relation name
FK_ProductProductPhoto_ProductPhoto_ProductPhotoID
Description
Foreign key constraint referencing ProductPhoto.ProductPhotoID.
Table:

Schema Production
Name ProductProductPhoto
Title

Columns
# Name Title
1 ProductID
2 ProductPhotoID
3 Primary
4 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductProductPhoto Production.Product
2 Production.ProductProductPhoto Production.ProductPhoto

Unique keys
# Name Columns
1 PK_ProductProductPhoto_ProductID_ProductPhotoID ProductID, ProductPhotoID
Data type
int
int
bit
datetime

Join
ProductID = Production.Product.ProductID
ProductPhotoID = Production.ProductPhoto.ProductPhotoID

Description
Primary key (clustered) constraint
Description
Product identification number. Foreign key to Product.ProductID.
Product photo identification number. Foreign key to ProductPhoto.ProductPhotoID.
0 = Photo is not the principal image. 1 = Photo is the principal image.
Date and time the record was last updated.

Relation name
FK_ProductProductPhoto_Product_ProductID
FK_ProductProductPhoto_ProductPhoto_ProductPhotoID
Description
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing ProductPhoto.ProductPhotoID.
Table:

Schema Production
Name ProductReview
Title

Columns
# Name Title
1 ProductReviewID
2 ProductID
3 ReviewerName
4 ReviewDate
5 EmailAddress
6 Rating
7 Comments
8 ModifiedDate

Relations
# Foreign table Primary table
1 Production.ProductReview Production.Product

Unique keys
# Name Columns
1 PK_ProductReview_ProductReviewID ProductReviewID
Data type
int
int
nvarchar(50)
datetime
nvarchar(50)
int
nvarchar(3850)
datetime

Join
ProductID = Production.Product.ProductID

Description
Primary key (clustered) constraint
Description
Primary key for ProductReview records.
Product identification number. Foreign key to Product.ProductID.
Name of the reviewer.
Date review was submitted.
Reviewer's e-mail address.
Product rating given by the reviewer. Scale is 1 to 5 with 5 as the highest rating.
Reviewer's comments
Date and time the record was last updated.

Relation name
FK_ProductReview_Product_ProductID
Description
Foreign key constraint referencing Product.ProductID.
Table:

Schema Production
Name ProductSubcategory
Title

Columns
# Name Title
1 ProductSubcategoryID
2 ProductCategoryID
3 Name
4 rowguid
5 ModifiedDate

Relations
# Foreign table Primary table
1 Production.Product Production.ProductSubcategory
2 Production.ProductSubcategory Production.ProductCategory

Unique keys
# Name Columns
1 PK_ProductSubcategory_ProductSubcategoryID ProductSubcategoryID
2 AK_ProductSubcategory_Name Name
3 AK_ProductSubcategory_rowguid rowguid
Data type
int
int
nvarchar(50)
uniqueidentifier
datetime

Join
Production.Product.ProductSubcategoryID = ProductSubcategoryID
ProductCategoryID = Production.ProductCategory.ProductCategoryID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for ProductSubcategory records.
Product category identification number. Foreign key to ProductCategory.ProductCategoryID.
Subcategory description.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_Product_ProductSubcategory_ProductSubcategoryID
FK_ProductSubcategory_ProductCategory_ProductCategoryID
Description
Foreign key constraint referencing ProductSubcategory.ProductSubcategoryID.
Foreign key constraint referencing ProductCategory.ProductCategoryID.
Table:

Schema Production
Name ScrapReason
Title

Columns
# Name Title
1 ScrapReasonID
2 Name
3 ModifiedDate

Relations
# Foreign table Primary table
1 Production.WorkOrder Production.ScrapReason

Unique keys
# Name Columns
1 PK_ScrapReason_ScrapReasonID ScrapReasonID
2 AK_ScrapReason_Name Name
Data type Description
smallint Primary key for ScrapReason records.
nvarchar(50) Failure description.
datetime Date and time the record was last updated.

Join Relation name


Production.WorkOrder.ScrapReasonID = ScrapReasonID FK_WorkOrder_ScrapReason_ScrapReasonID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Foreign key constraint referencing ScrapReason.ScrapReasonID.
Table:

Schema Production
Name TransactionHistory
Title

Columns
# Name Title
1 TransactionID
2 ProductID
3 ReferenceOrderID
4 ReferenceOrderLineID
5 TransactionDate
6 TransactionType
7 Quantity
8 ActualCost
9 ModifiedDate

Relations
# Foreign table Primary table
1 Production.TransactionHistory Production.Product

Unique keys
# Name Columns
1 PK_TransactionHistory_TransactionID TransactionID
Data type
int
int
int
int
datetime
nchar(1)
int
money
datetime

Join
ProductID = Production.Product.ProductID

Description
Primary key (clustered) constraint
Description
Primary key for TransactionHistory records.
Product identification number. Foreign key to Product.ProductID.
Purchase order, sales order, or work order identification number.
Line number associated with the purchase order, sales order, or work order.
Date and time of the transaction.
W = WorkOrder, S = SalesOrder, P = PurchaseOrder
Product quantity.
Product cost.
Date and time the record was last updated.

Relation name
FK_TransactionHistory_Product_ProductID
Description
Foreign key constraint referencing Product.ProductID.
Table:

Schema Production
Name TransactionHistoryArchive
Title

Columns
# Name Title
1 TransactionID
2 ProductID
3 ReferenceOrderID
4 ReferenceOrderLineID
5 TransactionDate
6 TransactionType
7 Quantity
8 ActualCost
9 ModifiedDate

Unique keys
# Name Columns
1 PK_TransactionHistoryArchive_TransactionID TransactionID
Data type
int
int
int
int
datetime
nchar(1)
int
money
datetime

Description
Primary key (clustered) constraint
Description
Primary key for TransactionHistoryArchive records.
Product identification number. Foreign key to Product.ProductID.
Purchase order, sales order, or work order identification number.
Line number associated with the purchase order, sales order, or work order.
Date and time of the transaction.
W = Work Order, S = Sales Order, P = Purchase Order
Product quantity.
Product cost.
Date and time the record was last updated.
Table:

Schema Production
Name UnitMeasure
Title

Columns
# Name Title
1 UnitMeasureCode
2 Name
3 ModifiedDate

Relations
# Foreign table Primary table
1 Production.BillOfMaterials Production.UnitMeasure
2 Production.Product Production.UnitMeasure
3 Production.Product Production.UnitMeasure
4 Purchasing.ProductVendor Production.UnitMeasure

Unique keys
# Name Columns
1 PK_UnitMeasure_UnitMeasureCode UnitMeasureCode
2 AK_UnitMeasure_Name Name
Data type
nchar(3)
nvarchar(50)
datetime

Join
Production.BillOfMaterials.UnitMeasureCode = UnitMeasureCode
Production.Product.SizeUnitMeasureCode = UnitMeasureCode
Production.Product.WeightUnitMeasureCode = UnitMeasureCode
Purchasing.ProductVendor.UnitMeasureCode = UnitMeasureCode

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Primary key.
Unit of measure description.
Date and time the record was last updated.

Relation name
FK_BillOfMaterials_UnitMeasure_UnitMeasureCode
FK_Product_UnitMeasure_SizeUnitMeasureCode
FK_Product_UnitMeasure_WeightUnitMeasureCode
FK_ProductVendor_UnitMeasure_UnitMeasureCode
Description
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Table:

Schema Production
Name WorkOrder
Title

Columns
# Name Title
1 WorkOrderID
2 ProductID
3 OrderQty
4 StockedQty
5 ScrappedQty
6 StartDate
7 EndDate
8 DueDate
9 ScrapReasonID
10 ModifiedDate

Relations
# Foreign table Primary table
1 Production.WorkOrderRouting Production.WorkOrder
2 Production.WorkOrder Production.Product
3 Production.WorkOrder Production.ScrapReason

Unique keys
# Name Columns
1 PK_WorkOrder_WorkOrderID WorkOrderID
Data type
int
int
int
int
smallint
datetime
datetime
datetime
smallint
datetime

Join
Production.WorkOrderRouting.WorkOrderID = WorkOrderID
ProductID = Production.Product.ProductID
ScrapReasonID = Production.ScrapReason.ScrapReasonID

Description
Primary key (clustered) constraint
Description
Primary key for WorkOrder records.
Product identification number. Foreign key to Product.ProductID.
Product quantity to build.
Quantity built and put in inventory.
Quantity that failed inspection.
Work order start date.
Work order end date.
Work order due date.
Reason for inspection failure.
Date and time the record was last updated.

Relation name
FK_WorkOrderRouting_WorkOrder_WorkOrderID
FK_WorkOrder_Product_ProductID
FK_WorkOrder_ScrapReason_ScrapReasonID
Description
Foreign key constraint referencing WorkOrder.WorkOrderID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing ScrapReason.ScrapReasonID.
Table:

Schema Production
Name WorkOrderRouting
Title

Columns
# Name
1 WorkOrderID
2 ProductID
3 OperationSequence
4 LocationID
5 ScheduledStartDate
6 ScheduledEndDate
7 ActualStartDate
8 ActualEndDate
9 ActualResourceHrs
10 PlannedCost
11 ActualCost
12 ModifiedDate

Relations
# Foreign table
1 Production.WorkOrderRouting
2 Production.WorkOrderRouting

Unique keys
# Name
1 PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence
Title Data type
int
int
smallint
smallint
datetime
datetime
datetime
datetime
decimal(9, 4)
money
money
datetime

Primary table Join


Production.Location LocationID = Production.Location.LocationID
Production.WorkOrder WorkOrderID = Production.WorkOrder.WorkOrderID

Columns Description
WorkOrderID, ProductID, OperationSequence Primary key (clustered) constraint
Description
Primary key. Foreign key to WorkOrder.WorkOrderID.
Primary key. Foreign key to Product.ProductID.
Primary key. Indicates the manufacturing process sequence.
Manufacturing location where the part is processed. Foreign key to Location.LocationID.
Planned manufacturing start date.
Planned manufacturing end date.
Actual start date.
Actual end date.
Number of manufacturing hours used.
Estimated manufacturing cost.
Actual manufacturing cost.
Date and time the record was last updated.

Relation name
FK_WorkOrderRouting_Location_LocationID
FK_WorkOrderRouting_WorkOrder_WorkOrderID
Description
Foreign key constraint referencing Location.LocationID.
Foreign key constraint referencing WorkOrder.WorkOrderID.
Table:

Schema Purchasing
Name ProductVendor
Title

Columns
# Name Title
1 ProductID
2 BusinessEntityID
3 AverageLeadTime
4 StandardPrice
5 LastReceiptCost
6 LastReceiptDate
7 MinOrderQty
8 MaxOrderQty
9 OnOrderQty
10 UnitMeasureCode
11 ModifiedDate

Relations
# Foreign table Primary table
1 Purchasing.ProductVendor Production.Product
2 Purchasing.ProductVendor Production.UnitMeasure
3 Purchasing.ProductVendor Purchasing.Vendor

Unique keys
# Name Columns
1 PK_ProductVendor_ProductID_BusinessEntityID ProductID, BusinessEntityID
Data type
int
int
int
money
money
datetime
int
int
int
nchar(3)
datetime

Join
ProductID = Production.Product.ProductID
UnitMeasureCode = Production.UnitMeasure.UnitMeasureCode
BusinessEntityID = Purchasing.Vendor.BusinessEntityID

Description
Primary key (clustered) constraint
Description
Primary key. Foreign key to Product.ProductID.
Primary key. Foreign key to Vendor.BusinessEntityID.
The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
The vendor's usual selling price.
The selling price when last purchased.
Date the product was last received by the vendor.
The maximum quantity that should be ordered.
The minimum quantity that should be ordered.
The quantity currently on order.
The product's unit of measure.
Date and time the record was last updated.

Relation name
FK_ProductVendor_Product_ProductID
FK_ProductVendor_UnitMeasure_UnitMeasureCode
FK_ProductVendor_Vendor_BusinessEntityID
Description
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing UnitMeasure.UnitMeasureCode.
Foreign key constraint referencing Vendor.BusinessEntityID.
Table:

Schema Purchasing
Name PurchaseOrderDetail
Title

Columns
# Name
1 PurchaseOrderID
2 PurchaseOrderDetailID
3 DueDate
4 OrderQty
5 ProductID
6 UnitPrice
7 LineTotal
8 ReceivedQty
9 RejectedQty
10 StockedQty
11 ModifiedDate

Relations
# Foreign table
1 Purchasing.PurchaseOrderDetail
2 Purchasing.PurchaseOrderDetail

Unique keys
# Name
1 PK_PurchaseOrderDetail_PurchaseOrderID_PurchaseOrderDetailID
Title

Primary table
Production.Product
Purchasing.PurchaseOrderHeader

Columns
PurchaseOrderID, PurchaseOrderDetailID
Data type
int
int
datetime
smallint
int
money
money
decimal(8, 2)
decimal(8, 2)
decimal(9, 2)
datetime

Join
ProductID = Production.Product.ProductID
PurchaseOrderID = Purchasing.PurchaseOrderHeader.PurchaseOrderID

Description
Primary key (clustered) constraint
Description
Primary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID.
Primary key. One line number per purchased product.
Date the product is expected to be received.
Quantity ordered.
Product identification number. Foreign key to Product.ProductID.
Vendor's selling price of a single product.
Per product subtotal. Computed as OrderQty * UnitPrice.
Quantity actually received from the vendor.
Quantity rejected during inspection.
Quantity accepted into inventory. Computed as ReceivedQty - RejectedQty.
Date and time the record was last updated.

Relation name
FK_PurchaseOrderDetail_Product_ProductID
FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID
Description
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing PurchaseOrderHeader.PurchaseOrderID.
Table:

Schema Purchasing
Name PurchaseOrderHeader
Title

Columns
# Name Title
1 PurchaseOrderID
2 RevisionNumber
3 Status
4 EmployeeID
5 VendorID
6 ShipMethodID
7 OrderDate
8 ShipDate
9 SubTotal
10 TaxAmt
11 Freight
12 TotalDue
13 ModifiedDate

Relations
# Foreign table Primary table
1 Purchasing.PurchaseOrderDetail Purchasing.PurchaseOrderHeader
2 Purchasing.PurchaseOrderHeader HumanResources.Employee
3 Purchasing.PurchaseOrderHeader Purchasing.ShipMethod
4 Purchasing.PurchaseOrderHeader Purchasing.Vendor

Unique keys
# Name Columns
1 PK_PurchaseOrderHeader_PurchaseOrderID PurchaseOrderID
Data type
int
tinyint
tinyint
int
int
int
datetime
datetime
money
money
money
money
datetime

Join
Purchasing.PurchaseOrderDetail.PurchaseOrderID = PurchaseOrderID
EmployeeID = HumanResources.Employee.BusinessEntityID
ShipMethodID = Purchasing.ShipMethod.ShipMethodID
VendorID = Purchasing.Vendor.BusinessEntityID

Description
Primary key (clustered) constraint
Description
Primary key.
Incremental number to track changes to the purchase order over time.
Order current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete
Employee who created the purchase order. Foreign key to Employee.BusinessEntityID.
Vendor with whom the purchase order is placed. Foreign key to Vendor.BusinessEntityID.
Shipping method. Foreign key to ShipMethod.ShipMethodID.
Purchase order creation date.
Estimated shipment date from the vendor.
Purchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID.
Tax amount.
Shipping cost.
Total due to vendor. Computed as Subtotal + TaxAmt + Freight.
Date and time the record was last updated.

Relation name
FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID
FK_PurchaseOrderHeader_Employee_EmployeeID
FK_PurchaseOrderHeader_ShipMethod_ShipMethodID
FK_PurchaseOrderHeader_Vendor_VendorID
Description
Foreign key constraint referencing PurchaseOrderHeader.PurchaseOrderID.
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing ShipMethod.ShipMethodID.
Foreign key constraint referencing Vendor.VendorID.
Table:

Schema Purchasing
Name ShipMethod
Title

Columns
# Name Title
1 ShipMethodID
2 Name
3 ShipBase
4 ShipRate
5 rowguid
6 ModifiedDate

Relations
# Foreign table Primary table
1 Purchasing.PurchaseOrderHeader Purchasing.ShipMethod
2 Sales.SalesOrderHeader Purchasing.ShipMethod

Unique keys
# Name Columns
1 PK_ShipMethod_ShipMethodID ShipMethodID
2 AK_ShipMethod_Name Name
3 AK_ShipMethod_rowguid rowguid
Data type
int
nvarchar(50)
money
money
uniqueidentifier
datetime

Join
Purchasing.PurchaseOrderHeader.ShipMethodID = ShipMethodID
Sales.SalesOrderHeader.ShipMethodID = ShipMethodID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for ShipMethod records.
Shipping company name.
Minimum shipping charge.
Shipping charge per pound.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_PurchaseOrderHeader_ShipMethod_ShipMethodID
FK_SalesOrderHeader_ShipMethod_ShipMethodID
Description
Foreign key constraint referencing ShipMethod.ShipMethodID.
Foreign key constraint referencing ShipMethod.ShipMethodID.
Table:

Schema Purchasing
Name Vendor
Title

Columns
# Name Title
1 BusinessEntityID
2 AccountNumber
3 Name
4 CreditRating
5 PreferredVendorStatus
6 ActiveFlag
7 PurchasingWebServiceURL
8 ModifiedDate

Relations
# Foreign table Primary table
1 Purchasing.ProductVendor Purchasing.Vendor
2 Purchasing.PurchaseOrderHeader Purchasing.Vendor
3 Purchasing.Vendor Person.BusinessEntity

Unique keys
# Name Columns
1 PK_Vendor_BusinessEntityID BusinessEntityID
2 AK_Vendor_AccountNumber AccountNumber
Data type
int
nvarchar(15)
nvarchar(50)
tinyint
bit
bit
nvarchar(1024)
datetime

Join
Purchasing.ProductVendor.BusinessEntityID = BusinessEntityID
Purchasing.PurchaseOrderHeader.VendorID = BusinessEntityID
BusinessEntityID = Person.BusinessEntity.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Primary key for Vendor records. Foreign key to BusinessEntity.BusinessEntityID
Vendor account (identification) number.
Company name.
1 = Superior, 2 = Excellent, 3 = Above average, 4 = Average, 5 = Below average
0 = Do not use if another vendor is available. 1 = Preferred over other vendors supplying the same product.
0 = Vendor no longer used. 1 = Vendor is actively used.
Vendor URL.
Date and time the record was last updated.

Relation name
FK_ProductVendor_Vendor_BusinessEntityID
FK_PurchaseOrderHeader_Vendor_VendorID
FK_Vendor_BusinessEntity_BusinessEntityID
Description
Foreign key constraint referencing Vendor.BusinessEntityID.
Foreign key constraint referencing Vendor.VendorID.
Foreign key constraint referencing BusinessEntity.BusinessEntityID
Table:

Schema Sales
Name CountryRegionCurrency
Title

Columns
# Name
1 CountryRegionCode
2 CurrencyCode
3 ModifiedDate

Relations
# Foreign table
1 Sales.CountryRegionCurrency
2 Sales.CountryRegionCurrency

Unique keys
# Name
1 PK_CountryRegionCurrency_CountryRegionCode_CurrencyCode
Title Data type
nvarchar(3)
nchar(3)
datetime

Primary table Join


Person.CountryRegion CountryRegionCode = Person.CountryRegion.CountryRegionCode
Sales.Currency CurrencyCode = Sales.Currency.CurrencyCode

Columns Description
CountryRegionCode, CurrencyCode Primary key (clustered) constraint
Description
ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode.
ISO standard currency code. Foreign key to Currency.CurrencyCode.
Date and time the record was last updated.

Relation name
FK_CountryRegionCurrency_CountryRegion_CountryRegionCode
FK_CountryRegionCurrency_Currency_CurrencyCode
Description
Foreign key constraint referencing CountryRegion.CountryRegionCode.
Foreign key constraint referencing Currency.CurrencyCode.
Table:

Schema Sales
Name CreditCard
Title

Columns
# Name Title
1 CreditCardID
2 CardType
3 CardNumber
4 ExpMonth
5 ExpYear
6 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.PersonCreditCard Sales.CreditCard
2 Sales.SalesOrderHeader Sales.CreditCard

Unique keys
# Name Columns
1 PK_CreditCard_CreditCardID CreditCardID
2 AK_CreditCard_CardNumber CardNumber
Data type Description
int Primary key for CreditCard records.
nvarchar(50) Credit card name.
nvarchar(25) Credit card number.
tinyint Credit card expiration month.
smallint Credit card expiration year.
datetime Date and time the record was last updated.

Join Relation name


Sales.PersonCreditCard.CreditCardID = CreditCardID FK_PersonCreditCard_CreditCard_CreditCardID
Sales.SalesOrderHeader.CreditCardID = CreditCardID FK_SalesOrderHeader_CreditCard_CreditCardID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Foreign key constraint referencing CreditCard.CreditCardID.
Foreign key constraint referencing CreditCard.CreditCardID.
Table:

Schema Sales
Name Currency
Title

Columns
# Name Title
1 CurrencyCode
2 Name
3 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.CountryRegionCurrency Sales.Currency
2 Sales.CurrencyRate Sales.Currency
3 Sales.CurrencyRate Sales.Currency

Unique keys
# Name Columns
1 PK_Currency_CurrencyCode CurrencyCode
2 AK_Currency_Name Name
Data type
nchar(3)
nvarchar(50)
datetime

Join
Sales.CountryRegionCurrency.CurrencyCode = CurrencyCode
Sales.CurrencyRate.FromCurrencyCode = CurrencyCode
Sales.CurrencyRate.ToCurrencyCode = CurrencyCode

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
The ISO code for the Currency.
Currency name.
Date and time the record was last updated.

Relation name
FK_CountryRegionCurrency_Currency_CurrencyCode
FK_CurrencyRate_Currency_FromCurrencyCode
FK_CurrencyRate_Currency_ToCurrencyCode
Description
Foreign key constraint referencing Currency.CurrencyCode.
Foreign key constraint referencing Currency.FromCurrencyCode.
Foreign key constraint referencing Currency.FromCurrencyCode.
Table:

Schema Sales
Name CurrencyRate
Title

Columns
# Name
1 CurrencyRateID
2 CurrencyRateDate
3 FromCurrencyCode
4 ToCurrencyCode
5 AverageRate
6 EndOfDayRate
7 ModifiedDate

Relations
# Foreign table
1 Sales.SalesOrderHeader
2 Sales.CurrencyRate
3 Sales.CurrencyRate

Unique keys
# Name
1 PK_CurrencyRate_CurrencyRateID
2 AK_CurrencyRate_CurrencyRateDate_FromCurrencyCode_ToCurrencyCode
Title

Primary table
Sales.CurrencyRate
Sales.Currency
Sales.Currency

Columns
CurrencyRateID
CurrencyRateDate, FromCurrencyCode, ToCurrencyCode
Data type
int
datetime
nchar(3)
nchar(3)
money
money
datetime

Join
Sales.SalesOrderHeader.CurrencyRateID = CurrencyRateID
FromCurrencyCode = Sales.Currency.CurrencyCode
ToCurrencyCode = Sales.Currency.CurrencyCode

Description
Primary key (clustered) constraint
Unique nonclustered index.
Description
Primary key for CurrencyRate records.
Date and time the exchange rate was obtained.
Exchange rate was converted from this currency code.
Exchange rate was converted to this currency code.
Average exchange rate for the day.
Final exchange rate for the day.
Date and time the record was last updated.

Relation name
FK_SalesOrderHeader_CurrencyRate_CurrencyRateID
FK_CurrencyRate_Currency_FromCurrencyCode
FK_CurrencyRate_Currency_ToCurrencyCode
Description
Foreign key constraint referencing CurrencyRate.CurrencyRateID.
Foreign key constraint referencing Currency.FromCurrencyCode.
Foreign key constraint referencing Currency.FromCurrencyCode.
Table:

Schema Sales
Name Customer
Title

Columns
# Name Title
1 CustomerID
2 PersonID
3 StoreID
4 TerritoryID
5 AccountNumber
6 rowguid
7 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesOrderHeader Sales.Customer
2 Sales.Customer Person.Person
3 Sales.Customer Sales.SalesTerritory
4 Sales.Customer Sales.Store

Unique keys
# Name Columns
1 PK_Customer_CustomerID CustomerID
2 AK_Customer_AccountNumber AccountNumber
3 AK_Customer_rowguid rowguid
Data type
int
int
int
int
varchar(10)
uniqueidentifier
datetime

Join
Sales.SalesOrderHeader.CustomerID = CustomerID
PersonID = Person.Person.BusinessEntityID
TerritoryID = Sales.SalesTerritory.TerritoryID
StoreID = Sales.Store.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key.
Foreign key to Person.BusinessEntityID
Foreign key to Store.BusinessEntityID
ID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID.
Unique number identifying the customer assigned by the accounting system.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesOrderHeader_Customer_CustomerID
FK_Customer_Person_PersonID
FK_Customer_SalesTerritory_TerritoryID
FK_Customer_Store_StoreID
Description
Foreign key constraint referencing Customer.CustomerID.
Foreign key constraint referencing Person.BusinessEntityID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Foreign key constraint referencing Store.BusinessEntityID.
Table:

Schema Sales
Name PersonCreditCard
Title

Columns
# Name Title
1 BusinessEntityID
2 CreditCardID
3 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.PersonCreditCard Sales.CreditCard
2 Sales.PersonCreditCard Person.Person

Unique keys
# Name Columns
1 PK_PersonCreditCard_BusinessEntityID_CreditCardID BusinessEntityID, CreditCardID
Data type
int
int
datetime

Join
CreditCardID = Sales.CreditCard.CreditCardID
BusinessEntityID = Person.Person.BusinessEntityID

Description
Primary key (clustered) constraint
Description
Business entity identification number. Foreign key to Person.BusinessEntityID.
Credit card identification number. Foreign key to CreditCard.CreditCardID.
Date and time the record was last updated.

Relation name
FK_PersonCreditCard_CreditCard_CreditCardID
FK_PersonCreditCard_Person_BusinessEntityID
Description
Foreign key constraint referencing CreditCard.CreditCardID.
Foreign key constraint referencing Person.BusinessEntityID.
Table:

Schema Sales
Name SalesOrderDetail
Title

Columns
# Name Title
1 SalesOrderID
2 SalesOrderDetailID
3 CarrierTrackingNumber
4 OrderQty
5 ProductID
6 SpecialOfferID
7 UnitPrice
8 UnitPriceDiscount
9 LineTotal
10 rowguid
11 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesOrderDetail Sales.SalesOrderHeader
2 Sales.SalesOrderDetail Sales.SpecialOfferProduct

Unique keys
# Name Columns
1 PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID SalesOrderID, SalesOrderDetailID
2 AK_SalesOrderDetail_rowguid rowguid
Data type
int
int
nvarchar(25)
smallint
int
int
money
money
numeric(38, 6)
uniqueidentifier
datetime

Join
SalesOrderID
SpecialOfferID==Sales.SalesOrderHeader.SalesOrderID
Sales.SpecialOfferProduct.SpecialOfferID and
ProductID = Sales.SpecialOfferProduct.ProductID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key. Foreign key to SalesOrderHeader.SalesOrderID.
Primary key. One incremental unique number per product sold.
Shipment tracking number supplied by the shipper.
Quantity ordered per product.
Product sold to customer. Foreign key to Product.ProductID.
Promotional code. Foreign key to SpecialOffer.SpecialOfferID.
Selling price of a single product.
Discount amount.
Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID
FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID
Description
Foreign key constraint referencing SalesOrderHeader.PurchaseOrderID.
Foreign key constraint referencing SpecialOfferProduct.SpecialOfferIDProductID.
Table:

Schema Sales
Name SalesOrderHeader
Title

Columns
# Name Title
1 SalesOrderID
2 RevisionNumber
3 OrderDate
4 DueDate
5 ShipDate
6 Status
7 OnlineOrderFlag
8 SalesOrderNumber
9 PurchaseOrderNumber
10 AccountNumber
11 CustomerID
12 SalesPersonID
13 TerritoryID
14 BillToAddressID
15 ShipToAddressID
16 ShipMethodID
17 CreditCardID
18 CreditCardApprovalCode
19 CurrencyRateID
20 SubTotal
21 TaxAmt
22 Freight
23 TotalDue
24 Comment
25 rowguid
26 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesOrderDetail Sales.SalesOrderHeader
2 Sales.SalesOrderHeaderSalesReason Sales.SalesOrderHeader
3 Sales.SalesOrderHeader Person.Address
4 Sales.SalesOrderHeader Person.Address
5 Sales.SalesOrderHeader Sales.CreditCard
6 Sales.SalesOrderHeader Sales.CurrencyRate
7 Sales.SalesOrderHeader Sales.Customer
8 Sales.SalesOrderHeader Sales.SalesPerson
9 Sales.SalesOrderHeader Sales.SalesTerritory
10 Sales.SalesOrderHeader Purchasing.ShipMethod

Unique keys
# Name Columns
1 PK_SalesOrderHeader_SalesOrderID SalesOrderID
2 AK_SalesOrderHeader_rowguid rowguid
3 AK_SalesOrderHeader_SalesOrderNumber SalesOrderNumber
Data type
int
tinyint
datetime
datetime
datetime
tinyint
bit
nvarchar(25)
nvarchar(25)
nvarchar(15)
int
int
int
int
int
int
int
varchar(15)
int
money
money
money
money
nvarchar(128)
uniqueidentifier
datetime

Join
Sales.SalesOrderDetail.SalesOrderID = SalesOrderID
Sales.SalesOrderHeaderSalesReason.SalesOrderID = SalesOrderID
BillToAddressID = Person.Address.AddressID
ShipToAddressID = Person.Address.AddressID
CreditCardID = Sales.CreditCard.CreditCardID
CurrencyRateID = Sales.CurrencyRate.CurrencyRateID
CustomerID = Sales.Customer.CustomerID
SalesPersonID = Sales.SalesPerson.BusinessEntityID
TerritoryID = Sales.SalesTerritory.TerritoryID
ShipMethodID = Purchasing.ShipMethod.ShipMethodID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Unique nonclustered index.
Description
Primary key.
Incremental number to track changes to the sales order over time.
Dates the sales order was created.
Date the order is due to the customer.
Date the order was shipped to the customer.
Order current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled
0 = Order placed by sales person. 1 = Order placed online by customer.
Unique sales order identification number.
Customer purchase order number reference.
Financial accounting number reference.
Customer identification number. Foreign key to Customer.BusinessEntityID.
Sales person who created the sales order. Foreign key to SalesPerson.BusinessEntityID.
Territory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID.
Customer billing address. Foreign key to Address.AddressID.
Customer shipping address. Foreign key to Address.AddressID.
Shipping method. Foreign key to ShipMethod.ShipMethodID.
Credit card identification number. Foreign key to CreditCard.CreditCardID.
Approval code provided by the credit card company.
Currency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID.
Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID.
Tax amount.
Shipping cost.
Total due from customer. Computed as Subtotal + TaxAmt + Freight.
Sales representative comments.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID
FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID
FK_SalesOrderHeader_Address_BillToAddressID
FK_SalesOrderHeader_Address_ShipToAddressID
FK_SalesOrderHeader_CreditCard_CreditCardID
FK_SalesOrderHeader_CurrencyRate_CurrencyRateID
FK_SalesOrderHeader_Customer_CustomerID
FK_SalesOrderHeader_SalesPerson_SalesPersonID
FK_SalesOrderHeader_SalesTerritory_TerritoryID
FK_SalesOrderHeader_ShipMethod_ShipMethodID
Description
Foreign key constraint referencing SalesOrderHeader.PurchaseOrderID.
Foreign key constraint referencing SalesOrderHeader.SalesOrderID.
Foreign key constraint referencing Address.AddressID.
Foreign key constraint referencing Address.AddressID.
Foreign key constraint referencing CreditCard.CreditCardID.
Foreign key constraint referencing CurrencyRate.CurrencyRateID.
Foreign key constraint referencing Customer.CustomerID.
Foreign key constraint referencing SalesPerson.SalesPersonID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Foreign key constraint referencing ShipMethod.ShipMethodID.
Table:

Schema Sales
Name SalesOrderHeaderSalesReason
Title

Columns
# Name
1 SalesOrderID
2 SalesReasonID
3 ModifiedDate

Relations
# Foreign table
1 Sales.SalesOrderHeaderSalesReason
2 Sales.SalesOrderHeaderSalesReason

Unique keys
# Name
1 PK_SalesOrderHeaderSalesReason_SalesOrderID_SalesReasonID
Title Data type
int
int
datetime

Primary table Join


Sales.SalesOrderHeader SalesOrderID = Sales.SalesOrderHeader.SalesOrderID
Sales.SalesReason SalesReasonID = Sales.SalesReason.SalesReasonID

Columns Description
SalesOrderID, SalesReasonID Primary key (clustered) constraint
Description
Primary key. Foreign key to SalesOrderHeader.SalesOrderID.
Primary key. Foreign key to SalesReason.SalesReasonID.
Date and time the record was last updated.

Relation name
FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID
FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID
Description
Foreign key constraint referencing SalesOrderHeader.SalesOrderID.
Foreign key constraint referencing SalesReason.SalesReasonID.
Table:

Schema Sales
Name SalesPerson
Title

Columns
# Name Title
1 BusinessEntityID
2 TerritoryID
3 SalesQuota
4 Bonus
5 CommissionPct
6 SalesYTD
7 SalesLastYear
8 rowguid
9 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesOrderHeader Sales.SalesPerson
2 Sales.SalesPersonQuotaHistory Sales.SalesPerson
3 Sales.SalesTerritoryHistory Sales.SalesPerson
4 Sales.Store Sales.SalesPerson
5 Sales.SalesPerson HumanResources.Employee
6 Sales.SalesPerson Sales.SalesTerritory

Unique keys
# Name Columns
1 PK_SalesPerson_BusinessEntityID BusinessEntityID
2 AK_SalesPerson_rowguid rowguid
Data type
int
int
money
money
smallmoney
money
money
uniqueidentifier
datetime

Join
Sales.SalesOrderHeader.SalesPersonID = BusinessEntityID
Sales.SalesPersonQuotaHistory.BusinessEntityID = BusinessEntityID
Sales.SalesTerritoryHistory.BusinessEntityID = BusinessEntityID
Sales.Store.SalesPersonID = BusinessEntityID
BusinessEntityID = HumanResources.Employee.BusinessEntityID
TerritoryID = Sales.SalesTerritory.TerritoryID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key for SalesPerson records. Foreign key to Employee.BusinessEntityID
Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID.
Projected yearly sales.
Bonus due if quota is met.
Commision percent received per sale.
Sales total year to date.
Sales total of previous year.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesOrderHeader_SalesPerson_SalesPersonID
FK_SalesPersonQuotaHistory_SalesPerson_BusinessEntityID
FK_SalesTerritoryHistory_SalesPerson_BusinessEntityID
FK_Store_SalesPerson_SalesPersonID
FK_SalesPerson_Employee_BusinessEntityID
FK_SalesPerson_SalesTerritory_TerritoryID
Description
Foreign key constraint referencing SalesPerson.SalesPersonID.
Foreign key constraint referencing SalesPerson.SalesPersonID.
Foreign key constraint referencing SalesPerson.SalesPersonID.
Foreign key constraint referencing SalesPerson.SalesPersonID
Foreign key constraint referencing Employee.EmployeeID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Table:

Schema Sales
Name SalesPersonQuotaHistory
Title

Columns
# Name Title
1 BusinessEntityID
2 QuotaDate
3 SalesQuota
4 rowguid
5 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesPersonQuotaHistory Sales.SalesPerson

Unique keys
# Name Columns
1 PK_SalesPersonQuotaHistory_BusinessEntityID_QuotaDate BusinessEntityID, QuotaDate
2 AK_SalesPersonQuotaHistory_rowguid rowguid
Data type
int
datetime
money
uniqueidentifier
datetime

Join
BusinessEntityID = Sales.SalesPerson.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Sales person identification number. Foreign key to SalesPerson.BusinessEntityID.
Sales quota date.
Sales quota amount.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesPersonQuotaHistory_SalesPerson_BusinessEntityID
Description
Foreign key constraint referencing SalesPerson.SalesPersonID.
Table:

Schema Sales
Name SalesReason
Title

Columns
# Name Title
1 SalesReasonID
2 Name
3 ReasonType
4 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesOrderHeaderSalesReason Sales.SalesReason

Unique keys
# Name Columns
1 PK_SalesReason_SalesReasonID SalesReasonID
Data type
int
nvarchar(50)
nvarchar(50)
datetime

Join
Sales.SalesOrderHeaderSalesReason.SalesReasonID = SalesReasonID

Description
Primary key (clustered) constraint
Description
Primary key for SalesReason records.
Sales reason description.
Category the sales reason belongs to.
Date and time the record was last updated.

Relation name
FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID
Description
Foreign key constraint referencing SalesReason.SalesReasonID.
Table:

Schema Sales
Name SalesTaxRate
Title

Columns
# Name Title
1 SalesTaxRateID
2 StateProvinceID
3 TaxType
4 TaxRate
5 Name
6 rowguid
7 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesTaxRate Person.StateProvince

Unique keys
# Name Columns
1 PK_SalesTaxRate_SalesTaxRateID SalesTaxRateID
2 AK_SalesTaxRate_rowguid rowguid
3 AK_SalesTaxRate_StateProvinceID_TaxType StateProvinceID, TaxType
Data type
int
int
tinyint
smallmoney
nvarchar(50)
uniqueidentifier
datetime

Join
StateProvinceID = Person.StateProvince.StateProvinceID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Unique nonclustered index.
Description
Primary key for SalesTaxRate records.
State, province, or country/region the sales tax applies to.
1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale
Tax rate amount.
Tax rate description.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesTaxRate_StateProvince_StateProvinceID
Description
Foreign key constraint referencing StateProvince.StateProvinceID.
Table:

Schema Sales
Name SalesTerritory
Title

Columns
# Name Title
1 TerritoryID
2 Name
3 CountryRegionCode
4 Group
5 SalesYTD
6 SalesLastYear
7 CostYTD
8 CostLastYear
9 rowguid
10 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.Customer Sales.SalesTerritory
2 Sales.SalesOrderHeader Sales.SalesTerritory
3 Sales.SalesPerson Sales.SalesTerritory
4 Sales.SalesTerritoryHistory Sales.SalesTerritory
5 Person.StateProvince Sales.SalesTerritory
6 Sales.SalesTerritory Person.CountryRegion

Unique keys
# Name Columns
1 PK_SalesTerritory_TerritoryID TerritoryID
2 AK_SalesTerritory_Name Name
3 AK_SalesTerritory_rowguid rowguid
Data type
int
nvarchar(50)
nvarchar(3)
nvarchar(50)
money
money
money
money
uniqueidentifier
datetime

Join
Sales.Customer.TerritoryID = TerritoryID
Sales.SalesOrderHeader.TerritoryID = TerritoryID
Sales.SalesPerson.TerritoryID = TerritoryID
Sales.SalesTerritoryHistory.TerritoryID = TerritoryID
Person.StateProvince.TerritoryID = TerritoryID
CountryRegionCode = Person.CountryRegion.CountryRegionCode

Description
Primary key (clustered) constraint
Unique nonclustered index.
Unique nonclustered index. Used to support replication samples.
Description
Primary key for SalesTerritory records.
Sales territory description
ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
Geographic area to which the sales territory belong.
Sales in the territory year to date.
Sales in the territory the previous year.
Business costs in the territory year to date.
Business costs in the territory the previous year.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_Customer_SalesTerritory_TerritoryID
FK_SalesOrderHeader_SalesTerritory_TerritoryID
FK_SalesPerson_SalesTerritory_TerritoryID
FK_SalesTerritoryHistory_SalesTerritory_TerritoryID
FK_StateProvince_SalesTerritory_TerritoryID
FK_SalesTerritory_CountryRegion_CountryRegionCode
Description
Foreign key constraint referencing SalesTerritory.TerritoryID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Foreign key constraint referencing CountryRegion.CountryRegionCode.
Table:

Schema Sales
Name SalesTerritoryHistory
Title

Columns
# Name
1 BusinessEntityID
2 TerritoryID
3 StartDate
4 EndDate
5 rowguid
6 ModifiedDate

Relations
# Foreign table
1 Sales.SalesTerritoryHistory
2 Sales.SalesTerritoryHistory

Unique keys
# Name
1 PK_SalesTerritoryHistory_BusinessEntityID_StartDate_TerritoryID
2 AK_SalesTerritoryHistory_rowguid
Title

Primary table
Sales.SalesPerson
Sales.SalesTerritory

Columns
BusinessEntityID, StartDate, TerritoryID
rowguid
Data type
int
int
datetime
datetime
uniqueidentifier
datetime

Join
BusinessEntityID = Sales.SalesPerson.BusinessEntityID
TerritoryID = Sales.SalesTerritory.TerritoryID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key. The sales rep. Foreign key to SalesPerson.BusinessEntityID.
Primary key. Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID.
Primary key. Date the sales representive started work in the territory.
Date the sales representative lef work in the territory.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesTerritoryHistory_SalesPerson_BusinessEntityID
FK_SalesTerritoryHistory_SalesTerritory_TerritoryID
Description
Foreign key constraint referencing SalesPerson.SalesPersonID.
Foreign key constraint referencing SalesTerritory.TerritoryID.
Table:

Schema Sales
Name ShoppingCartItem
Title

Columns
# Name Title
1 ShoppingCartItemID
2 ShoppingCartID
3 Quantity
4 ProductID
5 DateCreated
6 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.ShoppingCartItem Production.Product

Unique keys
# Name Columns
1 PK_ShoppingCartItem_ShoppingCartItemID ShoppingCartItemID
Data type Description
int Primary key for ShoppingCartItem records.
nvarchar(50) Shopping cart identification number.
int Product quantity ordered.
int Product ordered. Foreign key to Product.ProductID.
datetime Date the time the record was created.
datetime Date and time the record was last updated.

Join Relation name


ProductID = Production.Product.ProductID FK_ShoppingCartItem_Product_ProductID

Description
Primary key (clustered) constraint
Description
Foreign key constraint referencing Product.ProductID.
Table:

Schema Sales
Name SpecialOffer
Title

Columns
# Name Title
1 SpecialOfferID
2 Description
3 DiscountPct
4 Type
5 Category
6 StartDate
7 EndDate
8 MinQty
9 MaxQty
10 rowguid
11 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SpecialOfferProduct Sales.SpecialOffer

Unique keys
# Name Columns
1 PK_SpecialOffer_SpecialOfferID SpecialOfferID
2 AK_SpecialOffer_rowguid rowguid
Data type
int
nvarchar(255)
smallmoney
nvarchar(50)
nvarchar(50)
datetime
datetime
int
int
uniqueidentifier
datetime

Join
Sales.SpecialOfferProduct.SpecialOfferID = SpecialOfferID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key for SpecialOffer records.
Discount description.
Discount precentage.
Discount type category.
Group the discount applies to such as Reseller or Customer.
Discount start date.
Discount end date.
Minimum discount percent allowed.
Maximum discount percent allowed.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID
Description
Foreign key constraint referencing SpecialOffer.SpecialOfferID.
Table:

Schema Sales
Name SpecialOfferProduct
Title

Columns
# Name Title
1 SpecialOfferID
2 ProductID
3 rowguid
4 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.SalesOrderDetail Sales.SpecialOfferProduct
2 Sales.SpecialOfferProduct Production.Product
3 Sales.SpecialOfferProduct Sales.SpecialOffer

Unique keys
# Name Columns
1 PK_SpecialOfferProduct_SpecialOfferID_ProductID SpecialOfferID, ProductID
2 AK_SpecialOfferProduct_rowguid rowguid
Data type
int
int
uniqueidentifier
datetime

Join
Sales.SalesOrderDetail.SpecialOfferID = SpecialOfferID and
Sales.SalesOrderDetail.ProductID = ProductID
ProductID = Production.Product.ProductID
SpecialOfferID = Sales.SpecialOffer.SpecialOfferID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key for SpecialOfferProduct records.
Product identification number. Foreign key to Product.ProductID.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID
FK_SpecialOfferProduct_Product_ProductID
FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID
Description
Foreign key constraint referencing SpecialOfferProduct.SpecialOfferIDProductID.
Foreign key constraint referencing Product.ProductID.
Foreign key constraint referencing SpecialOffer.SpecialOfferID.
Table:

Schema Sales
Name Store
Title

Columns
# Name Title
1 BusinessEntityID
2 Name
3 SalesPersonID
4 Demographics
5 rowguid
6 ModifiedDate

Relations
# Foreign table Primary table
1 Sales.Customer Sales.Store
2 Sales.Store Person.BusinessEntity
3 Sales.Store Sales.SalesPerson

Unique keys
# Name Columns
1 PK_Store_BusinessEntityID BusinessEntityID
2 AK_Store_rowguid rowguid
Data type
int
nvarchar(50)
int
xml
uniqueidentifier
datetime

Join
Sales.Customer.StoreID = BusinessEntityID
BusinessEntityID = Person.BusinessEntity.BusinessEntityID
SalesPersonID = Sales.SalesPerson.BusinessEntityID

Description
Primary key (clustered) constraint
Unique nonclustered index. Used to support replication samples.
Description
Primary key. Foreign key to Customer.BusinessEntityID.
Name of the store.
ID of the sales person assigned to the customer. Foreign key to SalesPerson.BusinessEntityID.
Demographic informationg about the store such as the number of employees, annual sales and store type.
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
Date and time the record was last updated.

Relation name
FK_Customer_Store_StoreID
FK_Store_BusinessEntity_BusinessEntityID
FK_Store_SalesPerson_SalesPersonID
Description
Foreign key constraint referencing Store.BusinessEntityID.
Foreign key constraint referencing BusinessEntity.BusinessEntityID
Foreign key constraint referencing SalesPerson.SalesPersonID
View:

Schema HumanResources
Name vEmployee
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Title nvarchar(8)
3 FirstName nvarchar(50)
4 MiddleName nvarchar(50)
5 LastName nvarchar(50)
6 Suffix nvarchar(10)
7 JobTitle nvarchar(50)
8 PhoneNumber nvarchar(25)
9 PhoneNumberType nvarchar(50)
10 EmailAddress nvarchar(50)
11 EmailPromotion int
12 AddressLine1 nvarchar(60)
13 AddressLine2 nvarchar(60)
14 City nvarchar(30)
15 StateProvinceName nvarchar(50)
16 PostalCode nvarchar(15)
17 CountryRegionName nvarchar(50)
18 AdditionalContactInfo xml
View:

Schema HumanResources
Name vEmployeeDepartment
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Title nvarchar(8)
3 FirstName nvarchar(50)
4 MiddleName nvarchar(50)
5 LastName nvarchar(50)
6 Suffix nvarchar(10)
7 JobTitle nvarchar(50)
8 Department nvarchar(50)
9 GroupName nvarchar(50)
10 StartDate date
View:

Schema HumanResources
Name vEmployeeDepartmentHistory
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Title nvarchar(8)
3 FirstName nvarchar(50)
4 MiddleName nvarchar(50)
5 LastName nvarchar(50)
6 Suffix nvarchar(10)
7 Shif nvarchar(50)
8 Department nvarchar(50)
9 GroupName nvarchar(50)
10 StartDate date
11 EndDate date
View:

Schema HumanResources
Name vJobCandidate
Title

Columns
# Name Title Data type Description
1 JobCandidateID int
2 BusinessEntityID int
3 Name.Prefix nvarchar(30)
4 Name.First nvarchar(30)
5 Name.Middle nvarchar(30)
6 Name.Last nvarchar(30)
7 Name.Suffix nvarchar(30)
8 Skills nvarchar(MAX)
9 Addr.Type nvarchar(30)
10 Addr.Loc.CountryRegion nvarchar(100)
11 Addr.Loc.State nvarchar(100)
12 Addr.Loc.City nvarchar(100)
13 Addr.PostalCode nvarchar(20)
14 EMail nvarchar(MAX)
15 WebSite nvarchar(MAX)
16 ModifiedDate datetime
View:

Schema HumanResources
Name vJobCandidateEducation
Title

Columns
# Name Title Data type Description
1 JobCandidateID int
2 Edu.Level nvarchar(MAX)
3 Edu.StartDate datetime
4 Edu.EndDate datetime
5 Edu.Degree nvarchar(50)
6 Edu.Major nvarchar(50)
7 Edu.Minor nvarchar(50)
8 Edu.GPA nvarchar(5)
9 Edu.GPAScale nvarchar(5)
10 Edu.School nvarchar(100)
11 Edu.Loc.CountryRegion nvarchar(100)
12 Edu.Loc.State nvarchar(100)
13 Edu.Loc.City nvarchar(100)
View:

Schema HumanResources
Name vJobCandidateEmployment
Title

Columns
# Name Title Data type Description
1 JobCandidateID int
2 Emp.StartDate datetime
3 Emp.EndDate datetime
4 Emp.OrgName nvarchar(100)
5 Emp.JobTitle nvarchar(100)
6 Emp.Responsibility nvarchar(MAX)
7 Emp.FunctionCategory nvarchar(MAX)
8 Emp.IndustryCategory nvarchar(MAX)
9 Emp.Loc.CountryRegion nvarchar(MAX)
10 Emp.Loc.State nvarchar(MAX)
11 Emp.Loc.City nvarchar(MAX)
View:

Schema Person
Name vAdditionalContactInfo
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 FirstName nvarchar(50)
3 MiddleName nvarchar(50)
4 LastName nvarchar(50)
5 TelephoneNumber nvarchar(50)
6 TelephoneSpecialInstructions nvarchar(MAX)
7 Street nvarchar(50)
8 City nvarchar(50)
9 StateProvince nvarchar(50)
10 PostalCode nvarchar(50)
11 CountryRegion nvarchar(50)
12 HomeAddressSpecialInstructions nvarchar(MAX)
13 EMailAddress nvarchar(128)
14 EMailSpecialInstructions nvarchar(MAX)
15 EMailTelephoneNumber nvarchar(50)
16 rowguid uniqueidentifier
17 ModifiedDate datetime
View:

Schema Person
Name vStateProvinceCountryRegion
Title

Columns
# Name Title Data type Description
1 StateProvinceID int
2 StateProvinceCode nchar(3)
3 IsOnlyStateProvinceFlag bit
4 StateProvinceName nvarchar(50)
5 TerritoryID int
6 CountryRegionCode nvarchar(3)
7 CountryRegionName nvarchar(50)
View:

Schema Production
Name vProductAndDescription
Title

Columns
# Name Title Data type Description
1 ProductID int
2 Name nvarchar(50)
3 ProductModel nvarchar(50)
4 CultureID nchar(6)
5 Description nvarchar(400)
View:

Schema Production
Name vProductModelCatalogDescription
Title

Columns
# Name Title Data type Description
1 ProductModelID int
2 Name nvarchar(50)
3 Summary nvarchar(MAX)
4 Manufacturer nvarchar(MAX)
5 Copyright nvarchar(30)
6 ProductURL nvarchar(256)
7 WarrantyPeriod nvarchar(256)
8 WarrantyDescription nvarchar(256)
9 NoOfYears nvarchar(256)
10 MaintenanceDescription nvarchar(256)
11 Wheel nvarchar(256)
12 Saddle nvarchar(256)
13 Pedal nvarchar(256)
14 BikeFrame nvarchar(MAX)
15 Crankset nvarchar(256)
16 PictureAngle nvarchar(256)
17 PictureSize nvarchar(256)
18 ProductPhotoID nvarchar(256)
19 Material nvarchar(256)
20 Color nvarchar(256)
21 ProductLine nvarchar(256)
22 Style nvarchar(256)
23 RiderExperience nvarchar(1024)
24 rowguid uniqueidentifier
25 ModifiedDate datetime
View:

Schema Production
Name vProductModelInstructions
Title

Columns
# Name Title Data type Description
1 ProductModelID int
2 Name nvarchar(50)
3 Instructions nvarchar(MAX)
4 LocationID int
5 SetupHours decimal(9, 4)
6 MachineHours decimal(9, 4)
7 LaborHours decimal(9, 4)
8 LotSize int
9 Step nvarchar(1024)
10 rowguid uniqueidentifier
11 ModifiedDate datetime
View:

Schema Purchasing
Name vVendorWithAddresses
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Name nvarchar(50)
3 AddressType nvarchar(50)
4 AddressLine1 nvarchar(60)
5 AddressLine2 nvarchar(60)
6 City nvarchar(30)
7 StateProvinceName nvarchar(50)
8 PostalCode nvarchar(15)
9 CountryRegionName nvarchar(50)
View:

Schema Purchasing
Name vVendorWithContacts
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Name nvarchar(50)
3 ContactType nvarchar(50)
4 Title nvarchar(8)
5 FirstName nvarchar(50)
6 MiddleName nvarchar(50)
7 LastName nvarchar(50)
8 Suffix nvarchar(10)
9 PhoneNumber nvarchar(25)
10 PhoneNumberType nvarchar(50)
11 EmailAddress nvarchar(50)
12 EmailPromotion int
View:

Schema Sales
Name vIndividualCustomer
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Title nvarchar(8)
3 FirstName nvarchar(50)
4 MiddleName nvarchar(50)
5 LastName nvarchar(50)
6 Suffix nvarchar(10)
7 PhoneNumber nvarchar(25)
8 PhoneNumberType nvarchar(50)
9 EmailAddress nvarchar(50)
10 EmailPromotion int
11 AddressType nvarchar(50)
12 AddressLine1 nvarchar(60)
13 AddressLine2 nvarchar(60)
14 City nvarchar(30)
15 StateProvinceName nvarchar(50)
16 PostalCode nvarchar(15)
17 CountryRegionName nvarchar(50)
18 Demographics xml
View:

Schema Sales
Name vPersonDemographics
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 TotalPurchaseYTD money
3 DateFirstPurchase datetime
4 BirthDate datetime
5 MaritalStatus nvarchar(1)
6 YearlyIncome nvarchar(30)
7 Gender nvarchar(1)
8 TotalChildren int
9 NumberChildrenAtHome int
10 Education nvarchar(30)
11 Occupation nvarchar(30)
12 HomeOwnerFlag bit
13 NumberCarsOwned int
View:

Schema Sales
Name vSalesPerson
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Title nvarchar(8)
3 FirstName nvarchar(50)
4 MiddleName nvarchar(50)
5 LastName nvarchar(50)
6 Suffix nvarchar(10)
7 JobTitle nvarchar(50)
8 PhoneNumber nvarchar(25)
9 PhoneNumberType nvarchar(50)
10 EmailAddress nvarchar(50)
11 EmailPromotion int
12 AddressLine1 nvarchar(60)
13 AddressLine2 nvarchar(60)
14 City nvarchar(30)
15 StateProvinceName nvarchar(50)
16 PostalCode nvarchar(15)
17 CountryRegionName nvarchar(50)
18 TerritoryName nvarchar(50)
19 TerritoryGroup nvarchar(50)
20 SalesQuota money
21 SalesYTD money
22 SalesLastYear money
View:

Schema Sales
Name vSalesPersonSalesByFiscalYears
Title

Columns
# Name Title Data type Description
1 SalesPersonID int
2 FullName nvarchar(152)
3 JobTitle nvarchar(50)
4 SalesTerritory nvarchar(50)
5 2002 money
6 2003 money
7 2004 money
View:

Schema Sales
Name vStoreWithAddresses
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Name nvarchar(50)
3 AddressType nvarchar(50)
4 AddressLine1 nvarchar(60)
5 AddressLine2 nvarchar(60)
6 City nvarchar(30)
7 StateProvinceName nvarchar(50)
8 PostalCode nvarchar(15)
9 CountryRegionName nvarchar(50)
View:

Schema Sales
Name vStoreWithContacts
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Name nvarchar(50)
3 ContactType nvarchar(50)
4 Title nvarchar(8)
5 FirstName nvarchar(50)
6 MiddleName nvarchar(50)
7 LastName nvarchar(50)
8 Suffix nvarchar(10)
9 PhoneNumber nvarchar(25)
10 PhoneNumberType nvarchar(50)
11 EmailAddress nvarchar(50)
12 EmailPromotion int
View:

Schema Sales
Name vStoreWithDemographics
Title

Columns
# Name Title Data type Description
1 BusinessEntityID int
2 Name nvarchar(50)
3 AnnualSales money
4 AnnualRevenue money
5 BankName nvarchar(50)
6 BusinessType nvarchar(5)
7 YearOpened int
8 Specialty nvarchar(50)
9 SquareFeet int
10 Brands nvarchar(30)
11 Internet nvarchar(30)
12 NumberEmployees int
Procedure:

Schema dbo
Name uspLogError
Title

Input/Output
# Mode Name Data type
1 INOUT ErrorLogID int
Description
Output parameter for the stored procedure uspLogError. Contains the ErrorLogID value corresponding to the row inserted by u
Procedure:

Schema dbo
Name uspPrintError
Title
Procedure:

Schema dbo
Name uspGetEmployeeManagers
Title

Input/Output
# Mode Name Data type
1 IN BusinessEntityID int
Description
Input parameter for the stored procedure uspGetEmployeeManagers. Enter a valid BusinessEntityID from the HumanResource
Procedure:

Schema dbo
Name uspGetManagerEmployees
Title

Input/Output
# Mode Name Data type
1 IN BusinessEntityID int
Description
Input parameter for the stored procedure uspGetManagerEmployees. Enter a valid BusinessEntityID of the manager from the H
Procedure:

Schema dbo
Name uspSearchCandidateResumes
Title

Input/Output
# Mode Name Data type Description
1 IN searchString nvarchar(1000)
2 IN useInflectional bit
3 IN useThesaurus bit
4 IN language int
Procedure:

Schema dbo
Name uspGetBillOfMaterials
Title

Input/Output
# Mode Name Data type
1 IN StartProductID int
2 IN CheckDate datetime
Description
Input parameter for the stored procedure uspGetBillOfMaterials. Enter a valid ProductID from the Production.Product table.
Input parameter for the stored procedure uspGetBillOfMaterials used to eliminate components not used afer that date. Enter
Procedure:

Schema dbo
Name uspGetWhereUsedProductID
Title

Input/Output
# Mode Name Data type
1 IN StartProductID int
2 IN CheckDate datetime
Description
Input parameter for the stored procedure uspGetWhereUsedProductID. Enter a valid ProductID from the Production.Product t
Input parameter for the stored procedure uspGetWhereUsedProductID used to eliminate components not used afer that date
Function:

Schema dbo
Name ufnGetAccountingEndDate
Title

Input/Output
# Mode Name Data type Description
1 OUT Returns datetime
Function:

Schema dbo
Name ufnGetAccountingStartDate
Title

Input/Output
# Mode Name Data type Description
1 OUT Returns datetime
Function:

Schema dbo
Name ufnGetDocumentStatusText
Title

Input/Output
# Mode Name Data type
1 OUT Returns nvarchar(16)
2 IN Status tinyint
Description

Input parameter for the scalar function ufnGetDocumentStatusText. Enter a valid integer.
Function:

Schema dbo
Name ufnLeadingZeros
Title

Input/Output
# Mode Name Data type
1 OUT Returns varchar(8)
2 IN Value int
Description

Input parameter for the scalar function ufnLeadingZeros. Enter a valid integer.
Function:

Schema dbo
Name ufnGetContactInformation
Title

Input/Output
# Mode Name Data type
1 OUT Returns table type
2 IN PersonID int
Description

Input parameter for the table value function ufnGetContactInformation. Enter a valid PersonID from the Person.Contact table.
Function:

Schema dbo
Name ufnGetProductDealerPrice
Title

Input/Output
# Mode Name Data type
1 OUT Returns money
2 IN ProductID int
3 IN OrderDate datetime
Description

Input parameter for the scalar function ufnGetProductDealerPrice. Enter a valid ProductID from the Production.Product table.
Input parameter for the scalar function ufnGetProductDealerPrice. Enter a valid order date.
Function:

Schema dbo
Name ufnGetProductListPrice
Title

Input/Output
# Mode Name Data type
1 OUT Returns money
2 IN ProductID int
3 IN OrderDate datetime
Description

Input parameter for the scalar function ufnGetProductListPrice. Enter a valid ProductID from the Production.Product table.
Input parameter for the scalar function ufnGetProductListPrice. Enter a valid order date.
Function:

Schema dbo
Name ufnGetProductStandardCost
Title

Input/Output
# Mode Name Data type
1 OUT Returns money
2 IN ProductID int
3 IN OrderDate datetime
Description

Input parameter for the scalar function ufnGetProductStandardCost. Enter a valid ProductID from the Production.Product table
Input parameter for the scalar function ufnGetProductStandardCost. Enter a valid order date.
Function:

Schema dbo
Name ufnGetPurchaseOrderStatusText
Title

Input/Output
# Mode Name Data type
1 OUT Returns nvarchar(15)
2 IN Status tinyint
Description

Input parameter for the scalar function ufnGetPurchaseOrdertStatusText. Enter a valid integer.
Function:

Schema dbo
Name ufnGetStock
Title

Input/Output
# Mode Name Data type
1 OUT Returns int
2 IN ProductID int
Description

Input parameter for the scalar function ufnGetStock. Enter a valid ProductID from the Production.ProductInventory table.
Function:

Schema dbo
Name ufnGetSalesOrderStatusText
Title

Input/Output
# Mode Name Data type
1 OUT Returns nvarchar(15)
2 IN Status tinyint
Description

Input parameter for the scalar function ufnGetSalesOrderStatusText. Enter a valid integer.

You might also like