OpenVaultDB database

AdventureWorks OLTP

Microsoft AdventureWorks OLTP sample database with people, products, sales, purchasing, manufacturing, and inventory.

Published collections

71 read-only collections

91 declared foreign-key relationships. Names and keys preserve the source database schema. The database site includes the complete native schema, including views.

Explore complete schema and exports ↗

Machine-readable database descriptor ↗

Published recordsets

Read-only collections

71 collections

table

dbo.DatabaseLog

8 columns · 0 rows

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

DatabaseLogIDINTEGER · PKPostTimeTEXTDatabaseUserTEXTEventTEXTSchemaTEXT · nullableObjectTEXT · nullableTSQLTEXTXmlEventTEXT

table

dbo.ErrorLog

9 columns · 0 rows

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.

ErrorLogIDINTEGER · PKErrorTimeTEXTUserNameTEXTErrorNumberINTEGERErrorSeverityINTEGER · nullableErrorStateINTEGER · nullableErrorProcedureTEXT · nullableErrorLineINTEGER · nullableErrorMessageTEXT

table

Person.Address

9 columns · 19,614 rows

Street address information for customers, employees, and vendors.

AddressIDINTEGER · PKAddressLine1TEXTAddressLine2TEXT · nullableCityTEXTStateProvinceIDINTEGERPostalCodeTEXTSpatialLocationBLOB · nullablerowguidTEXTModifiedDateTEXT

References Person.StateProvince.StateProvinceID

table

Person.AddressType

4 columns · 6 rows

Types of addresses stored in the Address table.

AddressTypeIDINTEGER · PKNameTEXTrowguidTEXTModifiedDateTEXT

table

dbo.AWBuildVersion

4 columns · 1 rows

Current version number of the AdventureWorks 2025 sample database.

SystemInformationIDINTEGER · PKDatabase VersionTEXTVersionDateTEXTModifiedDateTEXT

table

Production.BillOfMaterials

9 columns · 2,679 rows

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

BillOfMaterialsIDINTEGER · PKProductAssemblyIDINTEGER · nullableComponentIDINTEGERStartDateTEXTEndDateTEXT · nullableUnitMeasureCodeTEXTBOMLevelINTEGERPerAssemblyQtyNUMERICModifiedDateTEXT

References Production.UnitMeasure.UnitMeasureCode, Production.Product.ProductID, Production.Product.ProductID

table

Person.BusinessEntity

3 columns · 20,777 rows

Source of the ID that connects vendors, customers, and employees with address and contact information.

BusinessEntityIDINTEGER · PKrowguidTEXTModifiedDateTEXT

table

Person.BusinessEntityAddress

5 columns · 19,614 rows

Cross-reference table mapping customers, vendors, and employees to their addresses.

BusinessEntityIDINTEGER · PKAddressIDINTEGER · PKAddressTypeIDINTEGER · PKrowguidTEXTModifiedDateTEXT

References Person.BusinessEntity.BusinessEntityID, Person.AddressType.AddressTypeID, Person.Address.AddressID

table

Person.BusinessEntityContact

5 columns · 909 rows

Cross-reference table mapping stores, vendors, and employees to people

BusinessEntityIDINTEGER · PKPersonIDINTEGER · PKContactTypeIDINTEGER · PKrowguidTEXTModifiedDateTEXT

References Person.BusinessEntity.BusinessEntityID, Person.ContactType.ContactTypeID, Person.Person.BusinessEntityID

table

Person.ContactType

3 columns · 20 rows

Lookup table containing the types of business entity contacts.

ContactTypeIDINTEGER · PKNameTEXTModifiedDateTEXT

table

Sales.CountryRegionCurrency

3 columns · 109 rows

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

CountryRegionCodeTEXT · PKCurrencyCodeTEXT · PKModifiedDateTEXT

References Sales.Currency.CurrencyCode, Person.CountryRegion.CountryRegionCode

table

Person.CountryRegion

3 columns · 238 rows

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

CountryRegionCodeTEXT · PKNameTEXTModifiedDateTEXT

table

Sales.CreditCard

6 columns · 19,118 rows

Customer credit card information.

CreditCardIDINTEGER · PKCardTypeTEXTCardNumberTEXTExpMonthINTEGERExpYearINTEGERModifiedDateTEXT

table

Production.Culture

3 columns · 8 rows

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

CultureIDTEXT · PKNameTEXTModifiedDateTEXT

table

Sales.Currency

3 columns · 105 rows

Lookup table containing standard ISO currencies.

CurrencyCodeTEXT · PKNameTEXTModifiedDateTEXT

table

Sales.CurrencyRate

7 columns · 13,532 rows

Currency exchange rates.

CurrencyRateIDINTEGER · PKCurrencyRateDateTEXTFromCurrencyCodeTEXTToCurrencyCodeTEXTAverageRateNUMERICEndOfDayRateNUMERICModifiedDateTEXT

References Sales.Currency.CurrencyCode, Sales.Currency.CurrencyCode

table

Sales.Customer

7 columns · 19,820 rows

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

CustomerIDINTEGER · PKPersonIDINTEGER · nullableStoreIDINTEGER · nullableTerritoryIDINTEGER · nullableAccountNumberTEXT · nullablerowguidTEXTModifiedDateTEXT

References Sales.SalesTerritory.TerritoryID, Sales.Store.BusinessEntityID, Person.Person.BusinessEntityID

table

HumanResources.Department

4 columns · 16 rows

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

DepartmentIDINTEGER · PKNameTEXTGroupNameTEXTModifiedDateTEXT

table

Production.Document

14 columns · 12 rows

Product maintenance documents.

DocumentNodeBLOB · PKDocumentLevelINTEGER · nullableTitleTEXTOwnerINTEGERFolderFlagINTEGERFileNameTEXTFileExtensionTEXTRevisionTEXTChangeNumberINTEGERStatusINTEGERDocumentSummaryTEXT · nullableDocumentBLOB · nullablerowguidTEXTModifiedDateTEXT

References HumanResources.Employee.BusinessEntityID

table

Person.EmailAddress

5 columns · 19,972 rows

Where to send a person email.

BusinessEntityIDINTEGER · PKEmailAddressIDINTEGER · PKEmailAddressTEXT · nullablerowguidTEXTModifiedDateTEXT

References Person.Person.BusinessEntityID

table

HumanResources.Employee

16 columns · 290 rows

Employee information such as salary, department, and title.

BusinessEntityIDINTEGER · PKNationalIDNumberTEXTLoginIDTEXTOrganizationNodeBLOB · nullableOrganizationLevelINTEGER · nullableJobTitleTEXTBirthDateTEXTMaritalStatusTEXTGenderTEXTHireDateTEXTSalariedFlagINTEGERVacationHoursINTEGERSickLeaveHoursINTEGERCurrentFlagINTEGERrowguidTEXTModifiedDateTEXT

References Person.Person.BusinessEntityID

table

HumanResources.EmployeeDepartmentHistory

6 columns · 296 rows

Employee department transfers.

BusinessEntityIDINTEGER · PKDepartmentIDINTEGER · PKShiftIDINTEGER · PKStartDateTEXT · PKEndDateTEXT · nullableModifiedDateTEXT

References HumanResources.Shift.ShiftID, HumanResources.Employee.BusinessEntityID, HumanResources.Department.DepartmentID

table

HumanResources.EmployeePayHistory

5 columns · 316 rows

Employee pay history.

BusinessEntityIDINTEGER · PKRateChangeDateTEXT · PKRateNUMERICPayFrequencyINTEGERModifiedDateTEXT

References HumanResources.Employee.BusinessEntityID

table

Production.Illustration

3 columns · 5 rows

Bicycle assembly diagrams.

IllustrationIDINTEGER · PKDiagramTEXT · nullableModifiedDateTEXT

table

HumanResources.JobCandidate

4 columns · 13 rows

Résumés submitted to Human Resources by job applicants.

JobCandidateIDINTEGER · PKBusinessEntityIDINTEGER · nullableResumeTEXT · nullableModifiedDateTEXT

References HumanResources.Employee.BusinessEntityID

table

Production.Location

5 columns · 14 rows

Product inventory and manufacturing locations.

LocationIDINTEGER · PKNameTEXTCostRateNUMERICAvailabilityNUMERICModifiedDateTEXT

table

Person.Password

5 columns · 19,972 rows

One way hashed authentication information

BusinessEntityIDINTEGER · PKPasswordHashTEXTPasswordSaltTEXTrowguidTEXTModifiedDateTEXT

References Person.Person.BusinessEntityID

table

Person.Person

13 columns · 19,972 rows

Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.

BusinessEntityIDINTEGER · PKPersonTypeTEXTNameStyleINTEGERTitleTEXT · nullableFirstNameTEXTMiddleNameTEXT · nullableLastNameTEXTSuffixTEXT · nullableEmailPromotionINTEGERAdditionalContactInfoTEXT · nullableDemographicsTEXT · nullablerowguidTEXTModifiedDateTEXT

References Person.BusinessEntity.BusinessEntityID

table

Sales.PersonCreditCard

3 columns · 19,118 rows

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

BusinessEntityIDINTEGER · PKCreditCardIDINTEGER · PKModifiedDateTEXT

References Sales.CreditCard.CreditCardID, Person.Person.BusinessEntityID

table

Person.PersonPhone

4 columns · 19,972 rows

Telephone number and type of a person.

BusinessEntityIDINTEGER · PKPhoneNumberTEXT · PKPhoneNumberTypeIDINTEGER · PKModifiedDateTEXT

References Person.PhoneNumberType.PhoneNumberTypeID, Person.Person.BusinessEntityID

table

Person.PhoneNumberType

3 columns · 3 rows

Type of phone number of a person.

PhoneNumberTypeIDINTEGER · PKNameTEXTModifiedDateTEXT

table

Production.Product

25 columns · 504 rows

Products sold or used in the manfacturing of sold products.

ProductIDINTEGER · PKNameTEXTProductNumberTEXTMakeFlagINTEGERFinishedGoodsFlagINTEGERColorTEXT · nullableSafetyStockLevelINTEGERReorderPointINTEGERStandardCostNUMERICListPriceNUMERICSizeTEXT · nullableSizeUnitMeasureCodeTEXT · nullableWeightUnitMeasureCodeTEXT · nullableWeightNUMERIC · nullableDaysToManufactureINTEGERProductLineTEXT · nullableClassTEXT · nullableStyleTEXT · nullableProductSubcategoryIDINTEGER · nullableProductModelIDINTEGER · nullableSellStartDateTEXTSellEndDateTEXT · nullableDiscontinuedDateTEXT · nullablerowguidTEXTModifiedDateTEXT

References Production.ProductSubcategory.ProductSubcategoryID, Production.ProductModel.ProductModelID, Production.UnitMeasure.UnitMeasureCode, Production.UnitMeasure.UnitMeasureCode

table

Production.ProductCategory

4 columns · 4 rows

High-level product categorization.

ProductCategoryIDINTEGER · PKNameTEXTrowguidTEXTModifiedDateTEXT

table

Production.ProductCostHistory

5 columns · 395 rows

Changes in the cost of a product over time.

ProductIDINTEGER · PKStartDateTEXT · PKEndDateTEXT · nullableStandardCostNUMERICModifiedDateTEXT

References Production.Product.ProductID

table

Production.ProductDescription

4 columns · 762 rows

Product descriptions in several languages.

ProductDescriptionIDINTEGER · PKDescriptionTEXTrowguidTEXTModifiedDateTEXT

table

Production.ProductDocument

3 columns · 32 rows

Cross-reference table mapping products to related product documents.

ProductIDINTEGER · PKDocumentNodeBLOB · PKModifiedDateTEXT

References Production.Document.DocumentNode, Production.Product.ProductID

table

Production.ProductInventory

7 columns · 1,069 rows

Product inventory information.

ProductIDINTEGER · PKLocationIDINTEGER · PKShelfTEXTBinINTEGERQuantityINTEGERrowguidTEXTModifiedDateTEXT

References Production.Product.ProductID, Production.Location.LocationID

table

Production.ProductListPriceHistory

5 columns · 395 rows

Changes in the list price of a product over time.

ProductIDINTEGER · PKStartDateTEXT · PKEndDateTEXT · nullableListPriceNUMERICModifiedDateTEXT

References Production.Product.ProductID

table

Production.ProductModel

6 columns · 128 rows

Product model classification.

ProductModelIDINTEGER · PKNameTEXTCatalogDescriptionTEXT · nullableInstructionsTEXT · nullablerowguidTEXTModifiedDateTEXT

table

Production.ProductModelIllustration

3 columns · 7 rows

Cross-reference table mapping product models and illustrations.

ProductModelIDINTEGER · PKIllustrationIDINTEGER · PKModifiedDateTEXT

References Production.Illustration.IllustrationID, Production.ProductModel.ProductModelID

table

Production.ProductModelProductDescriptionCulture

4 columns · 762 rows

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

ProductModelIDINTEGER · PKProductDescriptionIDINTEGER · PKCultureIDTEXT · PKModifiedDateTEXT

References Production.ProductModel.ProductModelID, Production.Culture.CultureID, Production.ProductDescription.ProductDescriptionID

table

Production.ProductPhoto

6 columns · 101 rows

Product images.

ProductPhotoIDINTEGER · PKThumbNailPhotoBLOB · nullableThumbnailPhotoFileNameTEXT · nullableLargePhotoBLOB · nullableLargePhotoFileNameTEXT · nullableModifiedDateTEXT

table

Production.ProductProductPhoto

4 columns · 504 rows

Cross-reference table mapping products and product photos.

ProductIDINTEGER · PKProductPhotoIDINTEGER · PKPrimaryINTEGERModifiedDateTEXT

References Production.ProductPhoto.ProductPhotoID, Production.Product.ProductID

table

Production.ProductReview

8 columns · 4 rows

Customer reviews of products they have purchased.

ProductReviewIDINTEGER · PKProductIDINTEGERReviewerNameTEXTReviewDateTEXTEmailAddressTEXTRatingINTEGERCommentsTEXT · nullableModifiedDateTEXT

References Production.Product.ProductID

table

Production.ProductSubcategory

5 columns · 37 rows

Product subcategories. See ProductCategory table.

ProductSubcategoryIDINTEGER · PKProductCategoryIDINTEGERNameTEXTrowguidTEXTModifiedDateTEXT

References Production.ProductCategory.ProductCategoryID

table

Purchasing.ProductVendor

11 columns · 460 rows

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

ProductIDINTEGER · PKBusinessEntityIDINTEGER · PKAverageLeadTimeINTEGERStandardPriceNUMERICLastReceiptCostNUMERIC · nullableLastReceiptDateTEXT · nullableMinOrderQtyINTEGERMaxOrderQtyINTEGEROnOrderQtyINTEGER · nullableUnitMeasureCodeTEXTModifiedDateTEXT

References Purchasing.Vendor.BusinessEntityID, Production.UnitMeasure.UnitMeasureCode, Production.Product.ProductID

table

Purchasing.PurchaseOrderDetail

11 columns · 8,845 rows

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

PurchaseOrderIDINTEGER · PKPurchaseOrderDetailIDINTEGER · PKDueDateTEXTOrderQtyINTEGERProductIDINTEGERUnitPriceNUMERICLineTotalNUMERIC · nullableReceivedQtyNUMERICRejectedQtyNUMERICStockedQtyNUMERIC · nullableModifiedDateTEXT

References Purchasing.PurchaseOrderHeader.PurchaseOrderID, Production.Product.ProductID

table

Purchasing.PurchaseOrderHeader

13 columns · 4,012 rows

General purchase order information. See PurchaseOrderDetail.

PurchaseOrderIDINTEGER · PKRevisionNumberINTEGERStatusINTEGEREmployeeIDINTEGERVendorIDINTEGERShipMethodIDINTEGEROrderDateTEXTShipDateTEXT · nullableSubTotalNUMERICTaxAmtNUMERICFreightNUMERICTotalDueNUMERICModifiedDateTEXT

References Purchasing.ShipMethod.ShipMethodID, Purchasing.Vendor.BusinessEntityID, HumanResources.Employee.BusinessEntityID

table

Sales.SalesOrderDetail

11 columns · 121,317 rows

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

SalesOrderIDINTEGER · PKSalesOrderDetailIDINTEGER · PKCarrierTrackingNumberTEXT · nullableOrderQtyINTEGERProductIDINTEGERSpecialOfferIDINTEGERUnitPriceNUMERICUnitPriceDiscountNUMERICLineTotalNUMERIC · nullablerowguidTEXTModifiedDateTEXT

References Sales.SpecialOfferProduct.SpecialOfferID, Sales.SpecialOfferProduct.ProductID, Sales.SalesOrderHeader.SalesOrderID

table

Sales.SalesOrderHeader

26 columns · 31,465 rows

General sales order information.

SalesOrderIDINTEGER · PKRevisionNumberINTEGEROrderDateTEXTDueDateTEXTShipDateTEXT · nullableStatusINTEGEROnlineOrderFlagINTEGERSalesOrderNumberTEXT · nullablePurchaseOrderNumberTEXT · nullableAccountNumberTEXT · nullableCustomerIDINTEGERSalesPersonIDINTEGER · nullableTerritoryIDINTEGER · nullableBillToAddressIDINTEGERShipToAddressIDINTEGERShipMethodIDINTEGERCreditCardIDINTEGER · nullableCreditCardApprovalCodeTEXT · nullableCurrencyRateIDINTEGER · nullableSubTotalNUMERICTaxAmtNUMERICFreightNUMERICTotalDueNUMERIC · nullableCommentTEXT · nullablerowguidTEXTModifiedDateTEXT

References Sales.SalesTerritory.TerritoryID, Purchasing.ShipMethod.ShipMethodID, Sales.SalesPerson.BusinessEntityID, Sales.Customer.CustomerID, Sales.CurrencyRate.CurrencyRateID, Sales.CreditCard.CreditCardID, Person.Address.AddressID, Person.Address.AddressID

table

Sales.SalesOrderHeaderSalesReason

3 columns · 27,647 rows

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

SalesOrderIDINTEGER · PKSalesReasonIDINTEGER · PKModifiedDateTEXT

References Sales.SalesOrderHeader.SalesOrderID, Sales.SalesReason.SalesReasonID

table

Sales.SalesPerson

9 columns · 17 rows

Sales representative current information.

BusinessEntityIDINTEGER · PKTerritoryIDINTEGER · nullableSalesQuotaNUMERIC · nullableBonusNUMERICCommissionPctNUMERICSalesYTDNUMERICSalesLastYearNUMERICrowguidTEXTModifiedDateTEXT

References Sales.SalesTerritory.TerritoryID, HumanResources.Employee.BusinessEntityID

table

Sales.SalesPersonQuotaHistory

5 columns · 163 rows

Sales performance tracking.

BusinessEntityIDINTEGER · PKQuotaDateTEXT · PKSalesQuotaNUMERICrowguidTEXTModifiedDateTEXT

References Sales.SalesPerson.BusinessEntityID

table

Sales.SalesReason

4 columns · 10 rows

Lookup table of customer purchase reasons.

SalesReasonIDINTEGER · PKNameTEXTReasonTypeTEXTModifiedDateTEXT

table

Sales.SalesTaxRate

7 columns · 29 rows

Tax rate lookup table.

SalesTaxRateIDINTEGER · PKStateProvinceIDINTEGERTaxTypeINTEGERTaxRateNUMERICNameTEXTrowguidTEXTModifiedDateTEXT

References Person.StateProvince.StateProvinceID

table

Sales.SalesTerritory

10 columns · 10 rows

Sales territory lookup table.

TerritoryIDINTEGER · PKNameTEXTCountryRegionCodeTEXTGroupTEXTSalesYTDNUMERICSalesLastYearNUMERICCostYTDNUMERICCostLastYearNUMERICrowguidTEXTModifiedDateTEXT

References Person.CountryRegion.CountryRegionCode

table

Sales.SalesTerritoryHistory

6 columns · 17 rows

Sales representative transfers to other sales territories.

BusinessEntityIDINTEGER · PKTerritoryIDINTEGER · PKStartDateTEXT · PKEndDateTEXT · nullablerowguidTEXTModifiedDateTEXT

References Sales.SalesTerritory.TerritoryID, Sales.SalesPerson.BusinessEntityID

table

Production.ScrapReason

3 columns · 16 rows

Manufacturing failure reasons lookup table.

ScrapReasonIDINTEGER · PKNameTEXTModifiedDateTEXT

table

HumanResources.Shift

5 columns · 3 rows

Work shift lookup table.

ShiftIDINTEGER · PKNameTEXTStartTimeTEXTEndTimeTEXTModifiedDateTEXT

table

Purchasing.ShipMethod

6 columns · 5 rows

Shipping company lookup table.

ShipMethodIDINTEGER · PKNameTEXTShipBaseNUMERICShipRateNUMERICrowguidTEXTModifiedDateTEXT

table

Sales.ShoppingCartItem

6 columns · 3 rows

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

ShoppingCartItemIDINTEGER · PKShoppingCartIDTEXTQuantityINTEGERProductIDINTEGERDateCreatedTEXTModifiedDateTEXT

References Production.Product.ProductID

table

Sales.SpecialOffer

11 columns · 16 rows

Sale discounts lookup table.

SpecialOfferIDINTEGER · PKDescriptionTEXTDiscountPctNUMERICTypeTEXTCategoryTEXTStartDateTEXTEndDateTEXTMinQtyINTEGERMaxQtyINTEGER · nullablerowguidTEXTModifiedDateTEXT

table

Sales.SpecialOfferProduct

4 columns · 538 rows

Cross-reference table mapping products to special offer discounts.

SpecialOfferIDINTEGER · PKProductIDINTEGER · PKrowguidTEXTModifiedDateTEXT

References Sales.SpecialOffer.SpecialOfferID, Production.Product.ProductID

table

Person.StateProvince

8 columns · 181 rows

State and province lookup table.

StateProvinceIDINTEGER · PKStateProvinceCodeTEXTCountryRegionCodeTEXTIsOnlyStateProvinceFlagINTEGERNameTEXTTerritoryIDINTEGERrowguidTEXTModifiedDateTEXT

References Sales.SalesTerritory.TerritoryID, Person.CountryRegion.CountryRegionCode

table

Sales.Store

6 columns · 701 rows

Customers (resellers) of Adventure Works products.

BusinessEntityIDINTEGER · PKNameTEXTSalesPersonIDINTEGER · nullableDemographicsTEXT · nullablerowguidTEXTModifiedDateTEXT

References Sales.SalesPerson.BusinessEntityID, Person.BusinessEntity.BusinessEntityID

table

Production.TransactionHistory

9 columns · 113,443 rows

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

TransactionIDINTEGER · PKProductIDINTEGERReferenceOrderIDINTEGERReferenceOrderLineIDINTEGERTransactionDateTEXTTransactionTypeTEXTQuantityINTEGERActualCostNUMERICModifiedDateTEXT

References Production.Product.ProductID

table

Production.TransactionHistoryArchive

9 columns · 89,253 rows

Transactions for previous years.

TransactionIDINTEGER · PKProductIDINTEGERReferenceOrderIDINTEGERReferenceOrderLineIDINTEGERTransactionDateTEXTTransactionTypeTEXTQuantityINTEGERActualCostNUMERICModifiedDateTEXT

table

Production.UnitMeasure

3 columns · 38 rows

Unit of measure lookup table.

UnitMeasureCodeTEXT · PKNameTEXTModifiedDateTEXT

table

Purchasing.Vendor

8 columns · 104 rows

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

BusinessEntityIDINTEGER · PKAccountNumberTEXTNameTEXTCreditRatingINTEGERPreferredVendorStatusINTEGERActiveFlagINTEGERPurchasingWebServiceURLTEXT · nullableModifiedDateTEXT

References Person.BusinessEntity.BusinessEntityID

table

Production.WorkOrder

10 columns · 72,591 rows

Manufacturing orders to produce specified products.

WorkOrderIDINTEGER · PKProductIDINTEGEROrderQtyINTEGERStockedQtyNUMERIC · nullableScrappedQtyINTEGERStartDateTEXTEndDateTEXT · nullableDueDateTEXTScrapReasonIDINTEGER · nullableModifiedDateTEXT

References Production.ScrapReason.ScrapReasonID, Production.Product.ProductID

table

Production.WorkOrderRouting

12 columns · 67,131 rows

Manufacturing routing operations and scheduling information for each work order.

WorkOrderIDINTEGER · PKProductIDINTEGER · PKOperationSequenceINTEGER · PKLocationIDINTEGERScheduledStartDateTEXTScheduledEndDateTEXTActualStartDateTEXT · nullableActualEndDateTEXT · nullableActualResourceHrsNUMERIC · nullablePlannedCostNUMERICActualCostNUMERIC · nullableModifiedDateTEXT

References Production.WorkOrder.WorkOrderID, Production.Location.LocationID

Provenance

Published data

Source: https://github.com/microsoft/sql-server-samples at beaab06ef72831089ca80e5355d65e661fd19b26.

Source licence: MIT. Model licence: MIT. Meaning licence: CC0-1.0.

Published by DemoDB; provider repository ↗.

Pinned Microsoft SQL Server Samples AdventureWorks OLTP installer and companion source files from commit beaab06ef72831089ca80e5355d65e661fd19b26. The source AWBuildVersion.csv identifies the installer fixture as SQL Server 2025 build 17.0.1000.3; the README says the script adapts to the installed SQL Server version, so this is the pinned source fixture rather than a claim about every generated server build. The converter imports all 68 BULK INSERT inputs plus the one-row AWBuildVersion.csv, preserving 759,240 seeded rows across 71 physical tables, source primary and foreign keys, 93 explicit indexes, and the inline unique constraint on Production.Document.rowguid. DatabaseLog and ErrorLog remain empty because the installer creates them for runtime audit/error events and supplies no static CSV. All 20 original SQL Server view definitions are retained in metadata/native-objects.json. Eleven straightforward relational views are translated into SQLite and their query results are rebuilt and checked; nine views using SQL Server-only XML, APPLY, or PIVOT constructs remain source-only, with no fabricated rows. SQL Server XML is stored as text; geography and hierarchyid serializations are stored as opaque BLOBs. Computed-column source expressions are retained in native metadata while the pinned CSV snapshot values are stored as ordinary SQLite columns. GETDATE defaults are frozen to the pinned build timestamp; SQL Server NEWID defaults remain in native metadata but are omitted from the static SQLite schema because SQLite only permits constant defaults, and seeded GUID values are preserved. SQL Server-only setup, triggers, stored procedures, query store, and optimized-locking behavior are not implemented. Fixed-width character data is preserved including padding; checks translate SQL Server trailing-space comparison and the source one-character LIKE range to equivalent SQLite expressions. Decimal, numeric, and money source strings are parsed as Python binary floats and stored with SQLite NUMERIC affinity; exact decimal scale and precision are not guaranteed, and this fixture makes no fixed-point MONEY claim. SQL Server collation and numeric behavior can differ. The converter checks the pinned source-file hashes, compares complete logical SQLite schema and row contents across rebuilds, and compares regenerated native SQL Server table/view metadata to the checked-in metadata file. SQLite file bytes may vary across SQLite library versions. JSON and SQLite preserve NULL; CSV represents NULL as an empty field, indistinguishable from empty text. BLOB values in JSON and CSV are base64 encoded. The full SQLite fixture is 125276160 bytes; static export delivery must preserve the full source without truncation and may use deterministic compressed chunks. The sha256 identifies the decoded SQLite fixture; source.inputSha256 identifies the compressed dataFile bytes.

Semantic references

Published models