AdventureWorks OLTP schema

Tables and views

Explore the native recordsets with their real names, schema, relationships, row counts, and direct downloads.

Htable HumanResources.Department Lookup table containing the departments within the Adventure Works Cycles company. 4 columns · 0 links · 16 rows · 1 matches in other samples Htable HumanResources.Employee Employee information such as salary, department, and title. 16 columns · 1 links · 290 rows · 7 matches in other samples Htable HumanResources.EmployeeDepartmentHistory Employee department transfers. 6 columns · 3 links · 296 rows · 3 matches in other samples Htable HumanResources.EmployeePayHistory Employee pay history. 5 columns · 1 links · 316 rows · 1 matches in other samples Htable HumanResources.JobCandidate Résumés submitted to Human Resources by job applicants. 4 columns · 1 links · 13 rows · 1 matches in other samples Htable HumanResources.Shift Work shift lookup table. 5 columns · 0 links · 3 rows · 1 matches in other samples Ptable Person.Address Street address information for customers, employees, and vendors. 9 columns · 1 links · 19,614 rows · 3 matches in other samples Ptable Person.AddressType Types of addresses stored in the Address table. 4 columns · 0 links · 6 rows · 1 matches in other samples Ptable Person.BusinessEntity Source of the ID that connects vendors, customers, and employees with address and contact information. 3 columns · 0 links · 20,777 rows · 5 matches in other samples Ptable Person.BusinessEntityAddress Cross-reference table mapping customers, vendors, and employees to their addresses. 5 columns · 3 links · 19,614 rows · 3 matches in other samples Ptable Person.BusinessEntityContact Cross-reference table mapping stores, vendors, and employees to people 5 columns · 3 links · 909 rows · 3 matches in other samples Ptable Person.ContactType Lookup table containing the types of business entity contacts. 3 columns · 0 links · 20 rows · 1 matches in other samples Ptable Person.CountryRegion Lookup table containing the ISO standard codes for countries and regions. 3 columns · 0 links · 238 rows · 3 matches in other samples Ptable Person.EmailAddress Where to send a person email. 5 columns · 1 links · 19,972 rows · 1 matches in other samples Ptable Person.Password One way hashed authentication information 5 columns · 1 links · 19,972 rows · 1 matches in other samples Ptable Person.Person Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts. 13 columns · 1 links · 19,972 rows · 8 matches in other samples Ptable Person.PersonPhone Telephone number and type of a person. 4 columns · 2 links · 19,972 rows · 2 matches in other samples Ptable Person.PhoneNumberType Type of phone number of a person. 3 columns · 0 links · 3 rows · 1 matches in other samples Ptable Person.StateProvince State and province lookup table. 8 columns · 2 links · 181 rows · 4 matches in other samples Ptable Production.BillOfMaterials Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components. 9 columns · 3 links · 2,679 rows · 2 matches in other samples Ptable Production.Culture Lookup table containing the languages in which some AdventureWorks data is stored. 3 columns · 0 links · 8 rows · 1 matches in other samples Ptable Production.Document Product maintenance documents. 14 columns · 1 links · 12 rows · 2 matches in other samples Ptable Production.Illustration Bicycle assembly diagrams. 3 columns · 0 links · 5 rows · 1 matches in other samples Ptable Production.Location Product inventory and manufacturing locations. 5 columns · 0 links · 14 rows · 2 matches in other samples Ptable Production.Product Products sold or used in the manfacturing of sold products. 25 columns · 4 links · 504 rows · 16 matches in other samples Ptable Production.ProductCategory High-level product categorization. 4 columns · 0 links · 4 rows · 1 matches in other samples Ptable Production.ProductCostHistory Changes in the cost of a product over time. 5 columns · 1 links · 395 rows · 1 matches in other samples Ptable Production.ProductDescription Product descriptions in several languages. 4 columns · 0 links · 762 rows · 1 matches in other samples Ptable Production.ProductDocument Cross-reference table mapping products to related product documents. 3 columns · 2 links · 32 rows · 2 matches in other samples Ptable Production.ProductInventory Product inventory information. 7 columns · 2 links · 1,069 rows · 2 matches in other samples Ptable Production.ProductListPriceHistory Changes in the list price of a product over time. 5 columns · 1 links · 395 rows · 1 matches in other samples Ptable Production.ProductModel Product model classification. 6 columns · 0 links · 128 rows · 3 matches in other samples Ptable Production.ProductModelIllustration Cross-reference table mapping product models and illustrations. 3 columns · 2 links · 7 rows · 2 matches in other samples Ptable Production.ProductModelProductDescriptionCulture Cross-reference table mapping product descriptions and the language the description is written in. 4 columns · 3 links · 762 rows · 3 matches in other samples Ptable Production.ProductPhoto Product images. 6 columns · 0 links · 101 rows · 1 matches in other samples Ptable Production.ProductProductPhoto Cross-reference table mapping products and product photos. 4 columns · 2 links · 504 rows · 2 matches in other samples Ptable Production.ProductReview Customer reviews of products they have purchased. 8 columns · 1 links · 4 rows · 1 matches in other samples Ptable Production.ProductSubcategory Product subcategories. See ProductCategory table. 5 columns · 1 links · 37 rows · 2 matches in other samples Ptable Production.ScrapReason Manufacturing failure reasons lookup table. 3 columns · 0 links · 16 rows · 1 matches in other samples Ptable Production.TransactionHistory Record of each purchase order, sales order, or work order transaction year to date. 9 columns · 1 links · 113,443 rows · 1 matches in other samples Ptable Production.TransactionHistoryArchive Transactions for previous years. 9 columns · 0 links · 89,253 rows Ptable Production.UnitMeasure Unit of measure lookup table. 3 columns · 0 links · 38 rows · 3 matches in other samples Ptable Production.WorkOrder Manufacturing orders to produce specified products. 10 columns · 2 links · 72,591 rows · 3 matches in other samples Ptable Production.WorkOrderRouting Manufacturing routing operations and scheduling information for each work order. 12 columns · 2 links · 67,131 rows · 2 matches in other samples Ptable Purchasing.ProductVendor Cross-reference table mapping vendors with the products they supply. 11 columns · 3 links · 460 rows · 3 matches in other samples Ptable Purchasing.PurchaseOrderDetail Individual products associated with a specific purchase order. See PurchaseOrderHeader. 11 columns · 2 links · 8,845 rows · 2 matches in other samples Ptable Purchasing.PurchaseOrderHeader General purchase order information. See PurchaseOrderDetail. 13 columns · 3 links · 4,012 rows · 4 matches in other samples Ptable Purchasing.ShipMethod Shipping company lookup table. 6 columns · 0 links · 5 rows · 2 matches in other samples Ptable Purchasing.Vendor Companies from whom Adventure Works Cycles purchases parts or other goods. 8 columns · 1 links · 104 rows · 3 matches in other samples Stable Sales.CountryRegionCurrency Cross-reference table mapping ISO currency codes to a country or region. 3 columns · 2 links · 109 rows · 2 matches in other samples Stable Sales.CreditCard Customer credit card information. 6 columns · 0 links · 19,118 rows · 2 matches in other samples Stable Sales.Currency Lookup table containing standard ISO currencies. 3 columns · 0 links · 105 rows · 2 matches in other samples Stable Sales.CurrencyRate Currency exchange rates. 7 columns · 2 links · 13,532 rows · 2 matches in other samples Stable Sales.Customer Current customer information. Also see the Person and Store tables. 7 columns · 3 links · 19,820 rows · 4 matches in other samples Stable Sales.PersonCreditCard Cross-reference table mapping people to their credit card information in the CreditCard table. 3 columns · 2 links · 19,118 rows · 2 matches in other samples Stable Sales.SalesOrderDetail Individual products associated with a specific sales order. See SalesOrderHeader. 11 columns · 3 links · 121,317 rows · 2 matches in other samples Stable Sales.SalesOrderHeader General sales order information. 26 columns · 8 links · 31,465 rows · 9 matches in other samples Stable Sales.SalesOrderHeaderSalesReason Cross-reference table mapping sales orders to sales reason codes. 3 columns · 2 links · 27,647 rows · 2 matches in other samples Stable Sales.SalesPerson Sales representative current information. 9 columns · 2 links · 17 rows · 6 matches in other samples Stable Sales.SalesPersonQuotaHistory Sales performance tracking. 5 columns · 1 links · 163 rows · 1 matches in other samples Stable Sales.SalesReason Lookup table of customer purchase reasons. 4 columns · 0 links · 10 rows · 1 matches in other samples Stable Sales.SalesTaxRate Tax rate lookup table. 7 columns · 1 links · 29 rows · 1 matches in other samples Stable Sales.SalesTerritory Sales territory lookup table. 10 columns · 1 links · 10 rows · 6 matches in other samples Stable Sales.SalesTerritoryHistory Sales representative transfers to other sales territories. 6 columns · 2 links · 17 rows · 2 matches in other samples Stable Sales.ShoppingCartItem Contains online customer orders until the order is submitted or cancelled. 6 columns · 1 links · 3 rows · 1 matches in other samples Stable Sales.SpecialOffer Sale discounts lookup table. 11 columns · 0 links · 16 rows · 1 matches in other samples Stable Sales.SpecialOfferProduct Cross-reference table mapping products to special offer discounts. 4 columns · 2 links · 538 rows · 3 matches in other samples Stable Sales.Store Customers (resellers) of Adventure Works products. 6 columns · 2 links · 701 rows · 3 matches in other samples dtable dbo.AWBuildVersion Current version number of the AdventureWorks 2025 sample database. 4 columns · 0 links · 1 rows dtable dbo.DatabaseLog Audit table tracking all DDL changes made to the AdventureWorks database. Data is captured by the database trigger ddlDatabaseTriggerLog. 8 columns · 0 links · 0 rows dtable dbo.ErrorLog Audit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct. 9 columns · 0 links · 0 rows Hview HumanResources.vEmployee 18 columns · 0 links · 290 rows Hview HumanResources.vEmployeeDepartment 10 columns · 0 links · 290 rows Hview HumanResources.vEmployeeDepartmentHistory 11 columns · 0 links · 296 rows Pview Person.vStateProvinceCountryRegion 7 columns · 0 links · 181 rows Pview Production.vProductAndDescription 5 columns · 0 links · 1,764 rows Pview Purchasing.vVendorWithAddresses 9 columns · 0 links · 104 rows Pview Purchasing.vVendorWithContacts 12 columns · 0 links · 156 rows Sview Sales.vIndividualCustomer 18 columns · 0 links · 18,508 rows Sview Sales.vSalesPerson 22 columns · 0 links · 17 rows Sview Sales.vStoreWithAddresses 9 columns · 0 links · 712 rows Sview Sales.vStoreWithContacts 12 columns · 0 links · 753 rows

Relationship map

How recordsets connect.

91 foreign keys
HumanResources.EmployeeBusinessEntityIDPerson.PersonBusinessEntityID
HumanResources.JobCandidateBusinessEntityIDHumanResources.EmployeeBusinessEntityID
Person.AddressStateProvinceIDPerson.StateProvinceStateProvinceID
Person.BusinessEntityAddressBusinessEntityIDPerson.BusinessEntityBusinessEntityID
Person.BusinessEntityContactBusinessEntityIDPerson.BusinessEntityBusinessEntityID
Person.EmailAddressBusinessEntityIDPerson.PersonBusinessEntityID
Person.PasswordBusinessEntityIDPerson.PersonBusinessEntityID
Person.PersonBusinessEntityIDPerson.BusinessEntityBusinessEntityID
Person.PersonPhonePhoneNumberTypeIDPerson.PhoneNumberTypePhoneNumberTypeID
Person.PersonPhoneBusinessEntityIDPerson.PersonBusinessEntityID
Person.StateProvinceCountryRegionCodePerson.CountryRegionCountryRegionCode
Production.BillOfMaterialsUnitMeasureCodeProduction.UnitMeasureUnitMeasureCode
Production.ProductProductSubcategoryIDProduction.ProductSubcategoryProductSubcategoryID
Production.ProductProductModelIDProduction.ProductModelProductModelID
Production.ProductWeightUnitMeasureCodeProduction.UnitMeasureUnitMeasureCode
Production.ProductSizeUnitMeasureCodeProduction.UnitMeasureUnitMeasureCode
Production.ProductSubcategoryProductCategoryIDProduction.ProductCategoryProductCategoryID
Production.WorkOrderScrapReasonIDProduction.ScrapReasonScrapReasonID
Purchasing.ProductVendorBusinessEntityIDPurchasing.VendorBusinessEntityID
Purchasing.ProductVendorUnitMeasureCodeProduction.UnitMeasureUnitMeasureCode
Purchasing.VendorBusinessEntityIDPerson.BusinessEntityBusinessEntityID
Sales.CountryRegionCurrencyCountryRegionCodePerson.CountryRegionCountryRegionCode
Sales.CurrencyRateToCurrencyCodeSales.CurrencyCurrencyCode
Sales.CurrencyRateFromCurrencyCodeSales.CurrencyCurrencyCode
Sales.CustomerTerritoryIDSales.SalesTerritoryTerritoryID
Sales.CustomerStoreIDSales.StoreBusinessEntityID
Sales.CustomerPersonIDPerson.PersonBusinessEntityID
Sales.PersonCreditCardCreditCardIDSales.CreditCardCreditCardID
Sales.PersonCreditCardBusinessEntityIDPerson.PersonBusinessEntityID
Sales.SalesOrderHeaderSalesPersonIDSales.SalesPersonBusinessEntityID
Sales.SalesOrderHeaderCurrencyRateIDSales.CurrencyRateCurrencyRateID
Sales.SalesOrderHeaderCreditCardIDSales.CreditCardCreditCardID
Sales.SalesOrderHeaderShipToAddressIDPerson.AddressAddressID
Sales.SalesOrderHeaderBillToAddressIDPerson.AddressAddressID
Sales.SalesPersonTerritoryIDSales.SalesTerritoryTerritoryID
Sales.SalesPersonBusinessEntityIDHumanResources.EmployeeBusinessEntityID
Sales.SalesPersonQuotaHistoryBusinessEntityIDSales.SalesPersonBusinessEntityID
Sales.SalesTaxRateStateProvinceIDPerson.StateProvinceStateProvinceID
Sales.SalesTerritoryCountryRegionCodePerson.CountryRegionCountryRegionCode
Sales.SalesTerritoryHistoryBusinessEntityIDSales.SalesPersonBusinessEntityID
Sales.SpecialOfferProductSpecialOfferIDSales.SpecialOfferSpecialOfferID
Sales.StoreSalesPersonIDSales.SalesPersonBusinessEntityID
Sales.StoreBusinessEntityIDPerson.BusinessEntityBusinessEntityID