Share via


Vollständiges Speicherschema für AdventureWorks (EDM)

Dieses Schema in der Datenspeicherschema-Definitionssprache (SSDL) entspricht den Tabellen in der AdventureWorks-Datenbank. Das folgende Schema wurde zusammen mit dem konzeptionellen Schema und dem Mappingschema mithilfe des Tools EdmGen.exe generiert. Dies ist in AdventureWorks Complete Model (EDM) dargestellt.

Das folgende Schema enthält Speichermetadaten, in denen alle Tabellen- und Schlüsselbeziehungen in den AdventureWorks-Daten beschrieben werden.

<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="AdventureWorks.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005" xmlns:store="https://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="https://schemas.microsoft.com/ado/2006/04/edm/ssdl">
  <EntityContainer Name="Production">
    <EntitySet Name="AWBuildVersion" EntityType="AdventureWorks.Store.AWBuildVersion" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="DatabaseLog" EntityType="AdventureWorks.Store.DatabaseLog" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="ErrorLog" EntityType="AdventureWorks.Store.ErrorLog" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Department" EntityType="AdventureWorks.Store.Department" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="Employee" EntityType="AdventureWorks.Store.Employee" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="EmployeeAddress" EntityType="AdventureWorks.Store.EmployeeAddress" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="EmployeeDepartmentHistory" EntityType="AdventureWorks.Store.EmployeeDepartmentHistory" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="EmployeePayHistory" EntityType="AdventureWorks.Store.EmployeePayHistory" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="JobCandidate" EntityType="AdventureWorks.Store.JobCandidate" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="SalesEmployee" EntityType="AdventureWorks.Store.SalesEmployee" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="Shift" EntityType="AdventureWorks.Store.Shift" store:Type="Tables" Schema="HumanResources" />
    <EntitySet Name="Address" EntityType="AdventureWorks.Store.Address" store:Type="Tables" Schema="Person" />
    <EntitySet Name="AddressType" EntityType="AdventureWorks.Store.AddressType" store:Type="Tables" Schema="Person" />
    <EntitySet Name="Contact" EntityType="AdventureWorks.Store.Contact" store:Type="Tables" Schema="Person" />
    <EntitySet Name="ContactType" EntityType="AdventureWorks.Store.ContactType" store:Type="Tables" Schema="Person" />
    <EntitySet Name="CountryRegion" EntityType="AdventureWorks.Store.CountryRegion" store:Type="Tables" Schema="Person" />
    <EntitySet Name="StateProvince" EntityType="AdventureWorks.Store.StateProvince" store:Type="Tables" Schema="Person" />
    <EntitySet Name="BillOfMaterials" EntityType="AdventureWorks.Store.BillOfMaterials" store:Type="Tables" />
    <EntitySet Name="Culture" EntityType="AdventureWorks.Store.Culture" store:Type="Tables" />
    <EntitySet Name="Document" EntityType="AdventureWorks.Store.Document" store:Type="Tables" />
    <EntitySet Name="Illustration" EntityType="AdventureWorks.Store.Illustration" store:Type="Tables" />
    <EntitySet Name="Location" EntityType="AdventureWorks.Store.Location" store:Type="Tables" />
    <EntitySet Name="Product" EntityType="AdventureWorks.Store.Product" store:Type="Tables" />
    <EntitySet Name="ProductCategory" EntityType="AdventureWorks.Store.ProductCategory" store:Type="Tables" />
    <EntitySet Name="ProductCostHistory" EntityType="AdventureWorks.Store.ProductCostHistory" store:Type="Tables" />
    <EntitySet Name="ProductDescription" EntityType="AdventureWorks.Store.ProductDescription" store:Type="Tables" />
    <EntitySet Name="ProductDocument" EntityType="AdventureWorks.Store.ProductDocument" store:Type="Tables" />
    <EntitySet Name="ProductInventory" EntityType="AdventureWorks.Store.ProductInventory" store:Type="Tables" />
    <EntitySet Name="ProductListPriceHistory" EntityType="AdventureWorks.Store.ProductListPriceHistory" store:Type="Tables" />
    <EntitySet Name="ProductModel" EntityType="AdventureWorks.Store.ProductModel" store:Type="Tables" />
    <EntitySet Name="ProductModelIllustration" EntityType="AdventureWorks.Store.ProductModelIllustration" store:Type="Tables" />
    <EntitySet Name="ProductModelProductDescriptionCulture" EntityType="AdventureWorks.Store.ProductModelProductDescriptionCulture" store:Type="Tables" />
    <EntitySet Name="ProductPhoto" EntityType="AdventureWorks.Store.ProductPhoto" store:Type="Tables" />
    <EntitySet Name="ProductProductPhoto" EntityType="AdventureWorks.Store.ProductProductPhoto" store:Type="Tables" />
    <EntitySet Name="ProductReview" EntityType="AdventureWorks.Store.ProductReview" store:Type="Tables" />
    <EntitySet Name="ProductSubcategory" EntityType="AdventureWorks.Store.ProductSubcategory" store:Type="Tables" />
    <EntitySet Name="ScrapReason" EntityType="AdventureWorks.Store.ScrapReason" store:Type="Tables" />
    <EntitySet Name="TransactionHistory" EntityType="AdventureWorks.Store.TransactionHistory" store:Type="Tables" />
    <EntitySet Name="TransactionHistoryArchive" EntityType="AdventureWorks.Store.TransactionHistoryArchive" store:Type="Tables" />
    <EntitySet Name="UnitMeasure" EntityType="AdventureWorks.Store.UnitMeasure" store:Type="Tables" />
    <EntitySet Name="WorkOrder" EntityType="AdventureWorks.Store.WorkOrder" store:Type="Tables" />
    <EntitySet Name="WorkOrderRouting" EntityType="AdventureWorks.Store.WorkOrderRouting" store:Type="Tables" />
    <EntitySet Name="ProductVendor" EntityType="AdventureWorks.Store.ProductVendor" store:Type="Tables" Schema="Purchasing" />
    <EntitySet Name="PurchaseOrderDetail" EntityType="AdventureWorks.Store.PurchaseOrderDetail" store:Type="Tables" Schema="Purchasing" />
    <EntitySet Name="PurchaseOrderHeader" EntityType="AdventureWorks.Store.PurchaseOrderHeader" store:Type="Tables" Schema="Purchasing" />
    <EntitySet Name="ShipMethod" EntityType="AdventureWorks.Store.ShipMethod" store:Type="Tables" Schema="Purchasing" />
    <EntitySet Name="Vendor" EntityType="AdventureWorks.Store.Vendor" store:Type="Tables" Schema="Purchasing" />
    <EntitySet Name="VendorAddress" EntityType="AdventureWorks.Store.VendorAddress" store:Type="Tables" Schema="Purchasing" />
    <EntitySet Name="VendorContact" EntityType="AdventureWorks.Store.VendorContact" store:Type="Tables" Schema="Purchasing" />
    <EntitySet Name="ContactCreditCard" EntityType="AdventureWorks.Store.ContactCreditCard" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="CountryRegionCurrency" EntityType="AdventureWorks.Store.CountryRegionCurrency" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="CreditCard" EntityType="AdventureWorks.Store.CreditCard" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="Currency" EntityType="AdventureWorks.Store.Currency" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="CurrencyRate" EntityType="AdventureWorks.Store.CurrencyRate" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="Customer" EntityType="AdventureWorks.Store.Customer" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="CustomerAddress" EntityType="AdventureWorks.Store.CustomerAddress" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="Individual" EntityType="AdventureWorks.Store.Individual" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesOrderDetail" EntityType="AdventureWorks.Store.SalesOrderDetail" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesOrderHeader" EntityType="AdventureWorks.Store.SalesOrderHeader" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesOrderHeaderSalesReason" EntityType="AdventureWorks.Store.SalesOrderHeaderSalesReason" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesPerson" EntityType="AdventureWorks.Store.SalesPerson" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesPersonQuotaHistory" EntityType="AdventureWorks.Store.SalesPersonQuotaHistory" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesReason" EntityType="AdventureWorks.Store.SalesReason" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesTaxRate" EntityType="AdventureWorks.Store.SalesTaxRate" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesTerritory" EntityType="AdventureWorks.Store.SalesTerritory" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SalesTerritoryHistory" EntityType="AdventureWorks.Store.SalesTerritoryHistory" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="ShoppingCartItem" EntityType="AdventureWorks.Store.ShoppingCartItem" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SpecialOffer" EntityType="AdventureWorks.Store.SpecialOffer" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="SpecialOfferProduct" EntityType="AdventureWorks.Store.SpecialOfferProduct" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="Store" EntityType="AdventureWorks.Store.Store" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="StoreContact" EntityType="AdventureWorks.Store.StoreContact" store:Type="Tables" Schema="Sales" />
    <EntitySet Name="vEmployee" EntityType="AdventureWorks.Store.vEmployee" store:Type="Views" store:Schema="HumanResources" store:Name="vEmployee">
      <DefiningQuery>SELECT 
[vEmployee].[EmployeeID] AS [EmployeeID], 
[vEmployee].[Title] AS [Title], 
[vEmployee].[FirstName] AS [FirstName], 
[vEmployee].[MiddleName] AS [MiddleName], 
[vEmployee].[LastName] AS [LastName], 
[vEmployee].[Suffix] AS [Suffix], 
[vEmployee].[JobTitle] AS [JobTitle], 
[vEmployee].[Phone] AS [Phone], 
[vEmployee].[EmailAddress] AS [EmailAddress], 
[vEmployee].[EmailPromotion] AS [EmailPromotion], 
[vEmployee].[AddressLine1] AS [AddressLine1], 
[vEmployee].[AddressLine2] AS [AddressLine2], 
[vEmployee].[City] AS [City], 
[vEmployee].[StateProvinceName] AS [StateProvinceName], 
[vEmployee].[PostalCode] AS [PostalCode], 
[vEmployee].[CountryRegionName] AS [CountryRegionName], 
[vEmployee].[AdditionalContactInfo] AS [AdditionalContactInfo]
FROM [HumanResources].[vEmployee] AS [vEmployee]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vEmployeeDepartment" EntityType="AdventureWorks.Store.vEmployeeDepartment" store:Type="Views" store:Schema="HumanResources" store:Name="vEmployeeDepartment">
      <DefiningQuery>SELECT 
[vEmployeeDepartment].[EmployeeID] AS [EmployeeID], 
[vEmployeeDepartment].[Title] AS [Title], 
[vEmployeeDepartment].[FirstName] AS [FirstName], 
[vEmployeeDepartment].[MiddleName] AS [MiddleName], 
[vEmployeeDepartment].[LastName] AS [LastName], 
[vEmployeeDepartment].[Suffix] AS [Suffix], 
[vEmployeeDepartment].[JobTitle] AS [JobTitle], 
[vEmployeeDepartment].[Department] AS [Department], 
[vEmployeeDepartment].[GroupName] AS [GroupName], 
[vEmployeeDepartment].[StartDate] AS [StartDate]
FROM [HumanResources].[vEmployeeDepartment] AS [vEmployeeDepartment]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vEmployeeDepartmentHistory" EntityType="AdventureWorks.Store.vEmployeeDepartmentHistory" store:Type="Views" store:Schema="HumanResources" store:Name="vEmployeeDepartmentHistory">
      <DefiningQuery>SELECT 
[vEmployeeDepartmentHistory].[EmployeeID] AS [EmployeeID], 
[vEmployeeDepartmentHistory].[Title] AS [Title], 
[vEmployeeDepartmentHistory].[FirstName] AS [FirstName], 
[vEmployeeDepartmentHistory].[MiddleName] AS [MiddleName], 
[vEmployeeDepartmentHistory].[LastName] AS [LastName], 
[vEmployeeDepartmentHistory].[Suffix] AS [Suffix], 
[vEmployeeDepartmentHistory].[Shift] AS [Shift], 
[vEmployeeDepartmentHistory].[Department] AS [Department], 
[vEmployeeDepartmentHistory].[GroupName] AS [GroupName], 
[vEmployeeDepartmentHistory].[StartDate] AS [StartDate], 
[vEmployeeDepartmentHistory].[EndDate] AS [EndDate]
FROM [HumanResources].[vEmployeeDepartmentHistory] AS [vEmployeeDepartmentHistory]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vJobCandidate" EntityType="AdventureWorks.Store.vJobCandidate" store:Type="Views" store:Schema="HumanResources" store:Name="vJobCandidate">
      <DefiningQuery>SELECT 
[vJobCandidate].[JobCandidateID] AS [JobCandidateID], 
[vJobCandidate].[EmployeeID] AS [EmployeeID], 
[vJobCandidate].[Name.Prefix] AS [Name.Prefix], 
[vJobCandidate].[Name.First] AS [Name.First], 
[vJobCandidate].[Name.Middle] AS [Name.Middle], 
[vJobCandidate].[Name.Last] AS [Name.Last], 
[vJobCandidate].[Name.Suffix] AS [Name.Suffix], 
[vJobCandidate].[Skills] AS [Skills], 
[vJobCandidate].[Addr.Type] AS [Addr.Type], 
[vJobCandidate].[Addr.Loc.CountryRegion] AS [Addr.Loc.CountryRegion], 
[vJobCandidate].[Addr.Loc.State] AS [Addr.Loc.State], 
[vJobCandidate].[Addr.Loc.City] AS [Addr.Loc.City], 
[vJobCandidate].[Addr.PostalCode] AS [Addr.PostalCode], 
[vJobCandidate].[EMail] AS [EMail], 
[vJobCandidate].[WebSite] AS [WebSite], 
[vJobCandidate].[ModifiedDate] AS [ModifiedDate]
FROM [HumanResources].[vJobCandidate] AS [vJobCandidate]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vJobCandidateEducation" EntityType="AdventureWorks.Store.vJobCandidateEducation" store:Type="Views" store:Schema="HumanResources" store:Name="vJobCandidateEducation">
      <DefiningQuery>SELECT 
[vJobCandidateEducation].[JobCandidateID] AS [JobCandidateID], 
[vJobCandidateEducation].[Edu.Level] AS [Edu.Level], 
[vJobCandidateEducation].[Edu.StartDate] AS [Edu.StartDate], 
[vJobCandidateEducation].[Edu.EndDate] AS [Edu.EndDate], 
[vJobCandidateEducation].[Edu.Degree] AS [Edu.Degree], 
[vJobCandidateEducation].[Edu.Major] AS [Edu.Major], 
[vJobCandidateEducation].[Edu.Minor] AS [Edu.Minor], 
[vJobCandidateEducation].[Edu.GPA] AS [Edu.GPA], 
[vJobCandidateEducation].[Edu.GPAScale] AS [Edu.GPAScale], 
[vJobCandidateEducation].[Edu.School] AS [Edu.School], 
[vJobCandidateEducation].[Edu.Loc.CountryRegion] AS [Edu.Loc.CountryRegion], 
[vJobCandidateEducation].[Edu.Loc.State] AS [Edu.Loc.State], 
[vJobCandidateEducation].[Edu.Loc.City] AS [Edu.Loc.City]
FROM [HumanResources].[vJobCandidateEducation] AS [vJobCandidateEducation]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vJobCandidateEmployment" EntityType="AdventureWorks.Store.vJobCandidateEmployment" store:Type="Views" store:Schema="HumanResources" store:Name="vJobCandidateEmployment">
      <DefiningQuery>SELECT 
[vJobCandidateEmployment].[JobCandidateID] AS [JobCandidateID], 
[vJobCandidateEmployment].[Emp.StartDate] AS [Emp.StartDate], 
[vJobCandidateEmployment].[Emp.EndDate] AS [Emp.EndDate], 
[vJobCandidateEmployment].[Emp.OrgName] AS [Emp.OrgName], 
[vJobCandidateEmployment].[Emp.JobTitle] AS [Emp.JobTitle], 
[vJobCandidateEmployment].[Emp.Responsibility] AS [Emp.Responsibility], 
[vJobCandidateEmployment].[Emp.FunctionCategory] AS [Emp.FunctionCategory], 
[vJobCandidateEmployment].[Emp.IndustryCategory] AS [Emp.IndustryCategory], 
[vJobCandidateEmployment].[Emp.Loc.CountryRegion] AS [Emp.Loc.CountryRegion], 
[vJobCandidateEmployment].[Emp.Loc.State] AS [Emp.Loc.State], 
[vJobCandidateEmployment].[Emp.Loc.City] AS [Emp.Loc.City]
FROM [HumanResources].[vJobCandidateEmployment] AS [vJobCandidateEmployment]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vAdditionalContactInfo" EntityType="AdventureWorks.Store.vAdditionalContactInfo" store:Type="Views" store:Schema="Person" store:Name="vAdditionalContactInfo">
      <DefiningQuery>SELECT 
[vAdditionalContactInfo].[ContactID] AS [ContactID], 
[vAdditionalContactInfo].[FirstName] AS [FirstName], 
[vAdditionalContactInfo].[MiddleName] AS [MiddleName], 
[vAdditionalContactInfo].[LastName] AS [LastName], 
[vAdditionalContactInfo].[TelephoneNumber] AS [TelephoneNumber], 
[vAdditionalContactInfo].[TelephoneSpecialInstructions] AS [TelephoneSpecialInstructions], 
[vAdditionalContactInfo].[Street] AS [Street], 
[vAdditionalContactInfo].[City] AS [City], 
[vAdditionalContactInfo].[StateProvince] AS [StateProvince], 
[vAdditionalContactInfo].[PostalCode] AS [PostalCode], 
[vAdditionalContactInfo].[CountryRegion] AS [CountryRegion], 
[vAdditionalContactInfo].[HomeAddressSpecialInstructions] AS [HomeAddressSpecialInstructions], 
[vAdditionalContactInfo].[EMailAddress] AS [EMailAddress], 
[vAdditionalContactInfo].[EMailSpecialInstructions] AS [EMailSpecialInstructions], 
[vAdditionalContactInfo].[EMailTelephoneNumber] AS [EMailTelephoneNumber], 
[vAdditionalContactInfo].[rowguid] AS [rowguid], 
[vAdditionalContactInfo].[ModifiedDate] AS [ModifiedDate]
FROM [Person].[vAdditionalContactInfo] AS [vAdditionalContactInfo]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vStateProvinceCountryRegion" EntityType="AdventureWorks.Store.vStateProvinceCountryRegion" store:Type="Views" store:Schema="Person" store:Name="vStateProvinceCountryRegion">
      <DefiningQuery>SELECT 
[vStateProvinceCountryRegion].[StateProvinceID] AS [StateProvinceID], 
[vStateProvinceCountryRegion].[StateProvinceCode] AS [StateProvinceCode], 
[vStateProvinceCountryRegion].[IsOnlyStateProvinceFlag] AS [IsOnlyStateProvinceFlag], 
[vStateProvinceCountryRegion].[StateProvinceName] AS [StateProvinceName], 
[vStateProvinceCountryRegion].[TerritoryID] AS [TerritoryID], 
[vStateProvinceCountryRegion].[CountryRegionCode] AS [CountryRegionCode], 
[vStateProvinceCountryRegion].[CountryRegionName] AS [CountryRegionName]
FROM [Person].[vStateProvinceCountryRegion] AS [vStateProvinceCountryRegion]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vProductAndDescription" EntityType="AdventureWorks.Store.vProductAndDescription" store:Type="Views" store:Schema="Production" store:Name="vProductAndDescription">
      <DefiningQuery>SELECT 
[vProductAndDescription].[ProductID] AS [ProductID], 
[vProductAndDescription].[Name] AS [Name], 
[vProductAndDescription].[ProductModel] AS [ProductModel], 
[vProductAndDescription].[CultureID] AS [CultureID], 
[vProductAndDescription].[Description] AS [Description]
FROM [Production].[vProductAndDescription] AS [vProductAndDescription]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vProductModelCatalogDescription" EntityType="AdventureWorks.Store.vProductModelCatalogDescription" store:Type="Views" store:Schema="Production" store:Name="vProductModelCatalogDescription">
      <DefiningQuery>SELECT 
[vProductModelCatalogDescription].[ProductModelID] AS [ProductModelID], 
[vProductModelCatalogDescription].[Name] AS [Name], 
[vProductModelCatalogDescription].[Summary] AS [Summary], 
[vProductModelCatalogDescription].[Manufacturer] AS [Manufacturer], 
[vProductModelCatalogDescription].[Copyright] AS [Copyright], 
[vProductModelCatalogDescription].[ProductURL] AS [ProductURL], 
[vProductModelCatalogDescription].[WarrantyPeriod] AS [WarrantyPeriod], 
[vProductModelCatalogDescription].[WarrantyDescription] AS [WarrantyDescription], 
[vProductModelCatalogDescription].[NoOfYears] AS [NoOfYears], 
[vProductModelCatalogDescription].[MaintenanceDescription] AS [MaintenanceDescription], 
[vProductModelCatalogDescription].[Wheel] AS [Wheel], 
[vProductModelCatalogDescription].[Saddle] AS [Saddle], 
[vProductModelCatalogDescription].[Pedal] AS [Pedal], 
[vProductModelCatalogDescription].[BikeFrame] AS [BikeFrame], 
[vProductModelCatalogDescription].[Crankset] AS [Crankset], 
[vProductModelCatalogDescription].[PictureAngle] AS [PictureAngle], 
[vProductModelCatalogDescription].[PictureSize] AS [PictureSize], 
[vProductModelCatalogDescription].[ProductPhotoID] AS [ProductPhotoID], 
[vProductModelCatalogDescription].[Material] AS [Material], 
[vProductModelCatalogDescription].[Color] AS [Color], 
[vProductModelCatalogDescription].[ProductLine] AS [ProductLine], 
[vProductModelCatalogDescription].[Style] AS [Style], 
[vProductModelCatalogDescription].[RiderExperience] AS [RiderExperience], 
[vProductModelCatalogDescription].[rowguid] AS [rowguid], 
[vProductModelCatalogDescription].[ModifiedDate] AS [ModifiedDate]
FROM [Production].[vProductModelCatalogDescription] AS [vProductModelCatalogDescription]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vProductModelInstructions" EntityType="AdventureWorks.Store.vProductModelInstructions" store:Type="Views" store:Schema="Production" store:Name="vProductModelInstructions">
      <DefiningQuery>SELECT 
[vProductModelInstructions].[ProductModelID] AS [ProductModelID], 
[vProductModelInstructions].[Name] AS [Name], 
[vProductModelInstructions].[Instructions] AS [Instructions], 
[vProductModelInstructions].[LocationID] AS [LocationID], 
[vProductModelInstructions].[SetupHours] AS [SetupHours], 
[vProductModelInstructions].[MachineHours] AS [MachineHours], 
[vProductModelInstructions].[LaborHours] AS [LaborHours], 
[vProductModelInstructions].[LotSize] AS [LotSize], 
[vProductModelInstructions].[Step] AS [Step], 
[vProductModelInstructions].[rowguid] AS [rowguid], 
[vProductModelInstructions].[ModifiedDate] AS [ModifiedDate]
FROM [Production].[vProductModelInstructions] AS [vProductModelInstructions]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vVendor" EntityType="AdventureWorks.Store.vVendor" store:Type="Views" store:Schema="Purchasing" store:Name="vVendor">
      <DefiningQuery>SELECT 
[vVendor].[VendorID] AS [VendorID], 
[vVendor].[Name] AS [Name], 
[vVendor].[ContactType] AS [ContactType], 
[vVendor].[Title] AS [Title], 
[vVendor].[FirstName] AS [FirstName], 
[vVendor].[MiddleName] AS [MiddleName], 
[vVendor].[LastName] AS [LastName], 
[vVendor].[Suffix] AS [Suffix], 
[vVendor].[Phone] AS [Phone], 
[vVendor].[EmailAddress] AS [EmailAddress], 
[vVendor].[EmailPromotion] AS [EmailPromotion], 
[vVendor].[AddressLine1] AS [AddressLine1], 
[vVendor].[AddressLine2] AS [AddressLine2], 
[vVendor].[City] AS [City], 
[vVendor].[StateProvinceName] AS [StateProvinceName], 
[vVendor].[PostalCode] AS [PostalCode], 
[vVendor].[CountryRegionName] AS [CountryRegionName]
FROM [Purchasing].[vVendor] AS [vVendor]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vIndividualCustomer" EntityType="AdventureWorks.Store.vIndividualCustomer" store:Type="Views" store:Schema="Sales" store:Name="vIndividualCustomer">
      <DefiningQuery>SELECT 
[vIndividualCustomer].[CustomerID] AS [CustomerID], 
[vIndividualCustomer].[Title] AS [Title], 
[vIndividualCustomer].[FirstName] AS [FirstName], 
[vIndividualCustomer].[MiddleName] AS [MiddleName], 
[vIndividualCustomer].[LastName] AS [LastName], 
[vIndividualCustomer].[Suffix] AS [Suffix], 
[vIndividualCustomer].[Phone] AS [Phone], 
[vIndividualCustomer].[EmailAddress] AS [EmailAddress], 
[vIndividualCustomer].[EmailPromotion] AS [EmailPromotion], 
[vIndividualCustomer].[AddressType] AS [AddressType], 
[vIndividualCustomer].[AddressLine1] AS [AddressLine1], 
[vIndividualCustomer].[AddressLine2] AS [AddressLine2], 
[vIndividualCustomer].[City] AS [City], 
[vIndividualCustomer].[StateProvinceName] AS [StateProvinceName], 
[vIndividualCustomer].[PostalCode] AS [PostalCode], 
[vIndividualCustomer].[CountryRegionName] AS [CountryRegionName], 
[vIndividualCustomer].[Demographics] AS [Demographics]
FROM [Sales].[vIndividualCustomer] AS [vIndividualCustomer]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vIndividualDemographics" EntityType="AdventureWorks.Store.vIndividualDemographics" store:Type="Views" store:Schema="Sales" store:Name="vIndividualDemographics">
      <DefiningQuery>SELECT 
[vIndividualDemographics].[CustomerID] AS [CustomerID], 
[vIndividualDemographics].[TotalPurchaseYTD] AS [TotalPurchaseYTD], 
[vIndividualDemographics].[DateFirstPurchase] AS [DateFirstPurchase], 
[vIndividualDemographics].[BirthDate] AS [BirthDate], 
[vIndividualDemographics].[MaritalStatus] AS [MaritalStatus], 
[vIndividualDemographics].[YearlyIncome] AS [YearlyIncome], 
[vIndividualDemographics].[Gender] AS [Gender], 
[vIndividualDemographics].[TotalChildren] AS [TotalChildren], 
[vIndividualDemographics].[NumberChildrenAtHome] AS [NumberChildrenAtHome], 
[vIndividualDemographics].[Education] AS [Education], 
[vIndividualDemographics].[Occupation] AS [Occupation], 
[vIndividualDemographics].[HomeOwnerFlag] AS [HomeOwnerFlag], 
[vIndividualDemographics].[NumberCarsOwned] AS [NumberCarsOwned]
FROM [Sales].[vIndividualDemographics] AS [vIndividualDemographics]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vSalesPerson" EntityType="AdventureWorks.Store.vSalesPerson" store:Type="Views" store:Schema="Sales" store:Name="vSalesPerson">
      <DefiningQuery>SELECT 
[vSalesPerson].[SalesPersonID] AS [SalesPersonID], 
[vSalesPerson].[Title] AS [Title], 
[vSalesPerson].[FirstName] AS [FirstName], 
[vSalesPerson].[MiddleName] AS [MiddleName], 
[vSalesPerson].[LastName] AS [LastName], 
[vSalesPerson].[Suffix] AS [Suffix], 
[vSalesPerson].[JobTitle] AS [JobTitle], 
[vSalesPerson].[Phone] AS [Phone], 
[vSalesPerson].[EmailAddress] AS [EmailAddress], 
[vSalesPerson].[EmailPromotion] AS [EmailPromotion], 
[vSalesPerson].[AddressLine1] AS [AddressLine1], 
[vSalesPerson].[AddressLine2] AS [AddressLine2], 
[vSalesPerson].[City] AS [City], 
[vSalesPerson].[StateProvinceName] AS [StateProvinceName], 
[vSalesPerson].[PostalCode] AS [PostalCode], 
[vSalesPerson].[CountryRegionName] AS [CountryRegionName], 
[vSalesPerson].[TerritoryName] AS [TerritoryName], 
[vSalesPerson].[TerritoryGroup] AS [TerritoryGroup], 
[vSalesPerson].[SalesQuota] AS [SalesQuota], 
[vSalesPerson].[SalesYTD] AS [SalesYTD], 
[vSalesPerson].[SalesLastYear] AS [SalesLastYear]
FROM [Sales].[vSalesPerson] AS [vSalesPerson]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vSalesPersonSalesByFiscalYears" EntityType="AdventureWorks.Store.vSalesPersonSalesByFiscalYears" store:Type="Views" store:Schema="Sales" store:Name="vSalesPersonSalesByFiscalYears">
      <DefiningQuery>SELECT 
[vSalesPersonSalesByFiscalYears].[SalesPersonID] AS [SalesPersonID], 
[vSalesPersonSalesByFiscalYears].[FullName] AS [FullName], 
[vSalesPersonSalesByFiscalYears].[Title] AS [Title], 
[vSalesPersonSalesByFiscalYears].[SalesTerritory] AS [SalesTerritory], 
[vSalesPersonSalesByFiscalYears].[2002] AS [2002], 
[vSalesPersonSalesByFiscalYears].[2003] AS [2003], 
[vSalesPersonSalesByFiscalYears].[2004] AS [2004]
FROM [Sales].[vSalesPersonSalesByFiscalYears] AS [vSalesPersonSalesByFiscalYears]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vStoreWithDemographics" EntityType="AdventureWorks.Store.vStoreWithDemographics" store:Type="Views" store:Schema="Sales" store:Name="vStoreWithDemographics">
      <DefiningQuery>SELECT 
[vStoreWithDemographics].[CustomerID] AS [CustomerID], 
[vStoreWithDemographics].[Name] AS [Name], 
[vStoreWithDemographics].[ContactType] AS [ContactType], 
[vStoreWithDemographics].[Title] AS [Title], 
[vStoreWithDemographics].[FirstName] AS [FirstName], 
[vStoreWithDemographics].[MiddleName] AS [MiddleName], 
[vStoreWithDemographics].[LastName] AS [LastName], 
[vStoreWithDemographics].[Suffix] AS [Suffix], 
[vStoreWithDemographics].[Phone] AS [Phone], 
[vStoreWithDemographics].[EmailAddress] AS [EmailAddress], 
[vStoreWithDemographics].[EmailPromotion] AS [EmailPromotion], 
[vStoreWithDemographics].[AddressType] AS [AddressType], 
[vStoreWithDemographics].[AddressLine1] AS [AddressLine1], 
[vStoreWithDemographics].[AddressLine2] AS [AddressLine2], 
[vStoreWithDemographics].[City] AS [City], 
[vStoreWithDemographics].[StateProvinceName] AS [StateProvinceName], 
[vStoreWithDemographics].[PostalCode] AS [PostalCode], 
[vStoreWithDemographics].[CountryRegionName] AS [CountryRegionName], 
[vStoreWithDemographics].[AnnualSales] AS [AnnualSales], 
[vStoreWithDemographics].[AnnualRevenue] AS [AnnualRevenue], 
[vStoreWithDemographics].[BankName] AS [BankName], 
[vStoreWithDemographics].[BusinessType] AS [BusinessType], 
[vStoreWithDemographics].[YearOpened] AS [YearOpened], 
[vStoreWithDemographics].[Specialty] AS [Specialty], 
[vStoreWithDemographics].[SquareFeet] AS [SquareFeet], 
[vStoreWithDemographics].[Brands] AS [Brands], 
[vStoreWithDemographics].[Internet] AS [Internet], 
[vStoreWithDemographics].[NumberEmployees] AS [NumberEmployees]
FROM [Sales].[vStoreWithDemographics] AS [vStoreWithDemographics]</DefiningQuery>
    </EntitySet>
    <AssociationSet Name="FK_Address_StateProvince_StateProvinceID" Association="AdventureWorks.Store.FK_Address_StateProvince_StateProvinceID">
      <End Role="StateProvince" EntitySet="StateProvince" />
      <End Role="Address" EntitySet="Address" />
    </AssociationSet>
    <AssociationSet Name="FK_BillOfMaterials_Product_ComponentID" Association="AdventureWorks.Store.FK_BillOfMaterials_Product_ComponentID">
      <End Role="Product" EntitySet="Product" />
      <End Role="BillOfMaterials" EntitySet="BillOfMaterials" />
    </AssociationSet>
    <AssociationSet Name="FK_BillOfMaterials_Product_ProductAssemblyID" Association="AdventureWorks.Store.FK_BillOfMaterials_Product_ProductAssemblyID">
      <End Role="Product" EntitySet="Product" />
      <End Role="BillOfMaterials" EntitySet="BillOfMaterials" />
    </AssociationSet>
    <AssociationSet Name="FK_BillOfMaterials_UnitMeasure_UnitMeasureCode" Association="AdventureWorks.Store.FK_BillOfMaterials_UnitMeasure_UnitMeasureCode">
      <End Role="UnitMeasure" EntitySet="UnitMeasure" />
      <End Role="BillOfMaterials" EntitySet="BillOfMaterials" />
    </AssociationSet>
    <AssociationSet Name="FK_ContactCreditCard_Contact_ContactID" Association="AdventureWorks.Store.FK_ContactCreditCard_Contact_ContactID">
      <End Role="Contact" EntitySet="Contact" />
      <End Role="ContactCreditCard" EntitySet="ContactCreditCard" />
    </AssociationSet>
    <AssociationSet Name="FK_ContactCreditCard_CreditCard_CreditCardID" Association="AdventureWorks.Store.FK_ContactCreditCard_CreditCard_CreditCardID">
      <End Role="CreditCard" EntitySet="CreditCard" />
      <End Role="ContactCreditCard" EntitySet="ContactCreditCard" />
    </AssociationSet>
    <AssociationSet Name="FK_CountryRegionCurrency_CountryRegion_CountryRegionCode" Association="AdventureWorks.Store.FK_CountryRegionCurrency_CountryRegion_CountryRegionCode">
      <End Role="CountryRegion" EntitySet="CountryRegion" />
      <End Role="CountryRegionCurrency" EntitySet="CountryRegionCurrency" />
    </AssociationSet>
    <AssociationSet Name="FK_CountryRegionCurrency_Currency_CurrencyCode" Association="AdventureWorks.Store.FK_CountryRegionCurrency_Currency_CurrencyCode">
      <End Role="Currency" EntitySet="Currency" />
      <End Role="CountryRegionCurrency" EntitySet="CountryRegionCurrency" />
    </AssociationSet>
    <AssociationSet Name="FK_CurrencyRate_Currency_FromCurrencyCode" Association="AdventureWorks.Store.FK_CurrencyRate_Currency_FromCurrencyCode">
      <End Role="Currency" EntitySet="Currency" />
      <End Role="CurrencyRate" EntitySet="CurrencyRate" />
    </AssociationSet>
    <AssociationSet Name="FK_CurrencyRate_Currency_ToCurrencyCode" Association="AdventureWorks.Store.FK_CurrencyRate_Currency_ToCurrencyCode">
      <End Role="Currency" EntitySet="Currency" />
      <End Role="CurrencyRate" EntitySet="CurrencyRate" />
    </AssociationSet>
    <AssociationSet Name="FK_Customer_SalesTerritory_TerritoryID" Association="AdventureWorks.Store.FK_Customer_SalesTerritory_TerritoryID">
      <End Role="SalesTerritory" EntitySet="SalesTerritory" />
      <End Role="Customer" EntitySet="Customer" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerAddress_Address_AddressID" Association="AdventureWorks.Store.FK_CustomerAddress_Address_AddressID">
      <End Role="Address" EntitySet="Address" />
      <End Role="CustomerAddress" EntitySet="CustomerAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerAddress_AddressType_AddressTypeID" Association="AdventureWorks.Store.FK_CustomerAddress_AddressType_AddressTypeID">
      <End Role="AddressType" EntitySet="AddressType" />
      <End Role="CustomerAddress" EntitySet="CustomerAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerAddress_Customer_CustomerID" Association="AdventureWorks.Store.FK_CustomerAddress_Customer_CustomerID">
      <End Role="Customer" EntitySet="Customer" />
      <End Role="CustomerAddress" EntitySet="CustomerAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_Employee_Contact_ContactID" Association="AdventureWorks.Store.FK_Employee_Contact_ContactID">
      <End Role="Contact" EntitySet="Contact" />
      <End Role="Employee" EntitySet="Employee" />
    </AssociationSet>
    <AssociationSet Name="FK_Employee_Employee_ManagerID" Association="AdventureWorks.Store.FK_Employee_Employee_ManagerID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="Employee1" EntitySet="Employee" />
    </AssociationSet>
    <AssociationSet Name="FK_EmployeeAddress_Address_AddressID" Association="AdventureWorks.Store.FK_EmployeeAddress_Address_AddressID">
      <End Role="Address" EntitySet="Address" />
      <End Role="EmployeeAddress" EntitySet="EmployeeAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_EmployeeAddress_Employee_EmployeeID" Association="AdventureWorks.Store.FK_EmployeeAddress_Employee_EmployeeID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="EmployeeAddress" EntitySet="EmployeeAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_EmployeeDepartmentHistory_Department_DepartmentID" Association="AdventureWorks.Store.FK_EmployeeDepartmentHistory_Department_DepartmentID">
      <End Role="Department" EntitySet="Department" />
      <End Role="EmployeeDepartmentHistory" EntitySet="EmployeeDepartmentHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_EmployeeDepartmentHistory_Employee_EmployeeID" Association="AdventureWorks.Store.FK_EmployeeDepartmentHistory_Employee_EmployeeID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="EmployeeDepartmentHistory" EntitySet="EmployeeDepartmentHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_EmployeeDepartmentHistory_Shift_ShiftID" Association="AdventureWorks.Store.FK_EmployeeDepartmentHistory_Shift_ShiftID">
      <End Role="Shift" EntitySet="Shift" />
      <End Role="EmployeeDepartmentHistory" EntitySet="EmployeeDepartmentHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_EmployeePayHistory_Employee_EmployeeID" Association="AdventureWorks.Store.FK_EmployeePayHistory_Employee_EmployeeID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="EmployeePayHistory" EntitySet="EmployeePayHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_Individual_Contact_ContactID" Association="AdventureWorks.Store.FK_Individual_Contact_ContactID">
      <End Role="Contact" EntitySet="Contact" />
      <End Role="Individual" EntitySet="Individual" />
    </AssociationSet>
    <AssociationSet Name="FK_Individual_Customer_CustomerID" Association="AdventureWorks.Store.FK_Individual_Customer_CustomerID">
      <End Role="Customer" EntitySet="Customer" />
      <End Role="Individual" EntitySet="Individual" />
    </AssociationSet>
    <AssociationSet Name="FK_JobCandidate_Employee_EmployeeID" Association="AdventureWorks.Store.FK_JobCandidate_Employee_EmployeeID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="JobCandidate" EntitySet="JobCandidate" />
    </AssociationSet>
    <AssociationSet Name="FK_Product_ProductModel_ProductModelID" Association="AdventureWorks.Store.FK_Product_ProductModel_ProductModelID">
      <End Role="ProductModel" EntitySet="ProductModel" />
      <End Role="Product" EntitySet="Product" />
    </AssociationSet>
    <AssociationSet Name="FK_Product_ProductSubcategory_ProductSubcategoryID" Association="AdventureWorks.Store.FK_Product_ProductSubcategory_ProductSubcategoryID">
      <End Role="ProductSubcategory" EntitySet="ProductSubcategory" />
      <End Role="Product" EntitySet="Product" />
    </AssociationSet>
    <AssociationSet Name="FK_Product_UnitMeasure_SizeUnitMeasureCode" Association="AdventureWorks.Store.FK_Product_UnitMeasure_SizeUnitMeasureCode">
      <End Role="UnitMeasure" EntitySet="UnitMeasure" />
      <End Role="Product" EntitySet="Product" />
    </AssociationSet>
    <AssociationSet Name="FK_Product_UnitMeasure_WeightUnitMeasureCode" Association="AdventureWorks.Store.FK_Product_UnitMeasure_WeightUnitMeasureCode">
      <End Role="UnitMeasure" EntitySet="UnitMeasure" />
      <End Role="Product" EntitySet="Product" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductCostHistory_Product_ProductID" Association="AdventureWorks.Store.FK_ProductCostHistory_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductDocument_Document_DocumentID" Association="AdventureWorks.Store.FK_ProductDocument_Document_DocumentID">
      <End Role="Document" EntitySet="Document" />
      <End Role="ProductDocument" EntitySet="ProductDocument" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductDocument_Product_ProductID" Association="AdventureWorks.Store.FK_ProductDocument_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ProductDocument" EntitySet="ProductDocument" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductInventory_Location_LocationID" Association="AdventureWorks.Store.FK_ProductInventory_Location_LocationID">
      <End Role="Location" EntitySet="Location" />
      <End Role="ProductInventory" EntitySet="ProductInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductInventory_Product_ProductID" Association="AdventureWorks.Store.FK_ProductInventory_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ProductInventory" EntitySet="ProductInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductListPriceHistory_Product_ProductID" Association="AdventureWorks.Store.FK_ProductListPriceHistory_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ProductListPriceHistory" EntitySet="ProductListPriceHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductModelIllustration_Illustration_IllustrationID" Association="AdventureWorks.Store.FK_ProductModelIllustration_Illustration_IllustrationID">
      <End Role="Illustration" EntitySet="Illustration" />
      <End Role="ProductModelIllustration" EntitySet="ProductModelIllustration" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductModelIllustration_ProductModel_ProductModelID" Association="AdventureWorks.Store.FK_ProductModelIllustration_ProductModel_ProductModelID">
      <End Role="ProductModel" EntitySet="ProductModel" />
      <End Role="ProductModelIllustration" EntitySet="ProductModelIllustration" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductModelProductDescriptionCulture_Culture_CultureID" Association="AdventureWorks.Store.FK_ProductModelProductDescriptionCulture_Culture_CultureID">
      <End Role="Culture" EntitySet="Culture" />
      <End Role="ProductModelProductDescriptionCulture" EntitySet="ProductModelProductDescriptionCulture" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID" Association="AdventureWorks.Store.FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID">
      <End Role="ProductDescription" EntitySet="ProductDescription" />
      <End Role="ProductModelProductDescriptionCulture" EntitySet="ProductModelProductDescriptionCulture" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID" Association="AdventureWorks.Store.FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID">
      <End Role="ProductModel" EntitySet="ProductModel" />
      <End Role="ProductModelProductDescriptionCulture" EntitySet="ProductModelProductDescriptionCulture" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductProductPhoto_Product_ProductID" Association="AdventureWorks.Store.FK_ProductProductPhoto_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ProductProductPhoto" EntitySet="ProductProductPhoto" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductProductPhoto_ProductPhoto_ProductPhotoID" Association="AdventureWorks.Store.FK_ProductProductPhoto_ProductPhoto_ProductPhotoID">
      <End Role="ProductPhoto" EntitySet="ProductPhoto" />
      <End Role="ProductProductPhoto" EntitySet="ProductProductPhoto" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductReview_Product_ProductID" Association="AdventureWorks.Store.FK_ProductReview_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ProductReview" EntitySet="ProductReview" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductSubcategory_ProductCategory_ProductCategoryID" Association="AdventureWorks.Store.FK_ProductSubcategory_ProductCategory_ProductCategoryID">
      <End Role="ProductCategory" EntitySet="ProductCategory" />
      <End Role="ProductSubcategory" EntitySet="ProductSubcategory" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductVendor_Product_ProductID" Association="AdventureWorks.Store.FK_ProductVendor_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ProductVendor" EntitySet="ProductVendor" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductVendor_UnitMeasure_UnitMeasureCode" Association="AdventureWorks.Store.FK_ProductVendor_UnitMeasure_UnitMeasureCode">
      <End Role="UnitMeasure" EntitySet="UnitMeasure" />
      <End Role="ProductVendor" EntitySet="ProductVendor" />
    </AssociationSet>
    <AssociationSet Name="FK_ProductVendor_Vendor_VendorID" Association="AdventureWorks.Store.FK_ProductVendor_Vendor_VendorID">
      <End Role="Vendor" EntitySet="Vendor" />
      <End Role="ProductVendor" EntitySet="ProductVendor" />
    </AssociationSet>
    <AssociationSet Name="FK_PurchaseOrderDetail_Product_ProductID" Association="AdventureWorks.Store.FK_PurchaseOrderDetail_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="PurchaseOrderDetail" EntitySet="PurchaseOrderDetail" />
    </AssociationSet>
    <AssociationSet Name="FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID" Association="AdventureWorks.Store.FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID">
      <End Role="PurchaseOrderHeader" EntitySet="PurchaseOrderHeader" />
      <End Role="PurchaseOrderDetail" EntitySet="PurchaseOrderDetail" />
    </AssociationSet>
    <AssociationSet Name="FK_PurchaseOrderHeader_Employee_EmployeeID" Association="AdventureWorks.Store.FK_PurchaseOrderHeader_Employee_EmployeeID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="PurchaseOrderHeader" EntitySet="PurchaseOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_PurchaseOrderHeader_ShipMethod_ShipMethodID" Association="AdventureWorks.Store.FK_PurchaseOrderHeader_ShipMethod_ShipMethodID">
      <End Role="ShipMethod" EntitySet="ShipMethod" />
      <End Role="PurchaseOrderHeader" EntitySet="PurchaseOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_PurchaseOrderHeader_Vendor_VendorID" Association="AdventureWorks.Store.FK_PurchaseOrderHeader_Vendor_VendorID">
      <End Role="Vendor" EntitySet="Vendor" />
      <End Role="PurchaseOrderHeader" EntitySet="PurchaseOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID" Association="AdventureWorks.Store.FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID">
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
      <End Role="SalesOrderDetail" EntitySet="SalesOrderDetail" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID" Association="AdventureWorks.Store.FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID">
      <End Role="SpecialOfferProduct" EntitySet="SpecialOfferProduct" />
      <End Role="SalesOrderDetail" EntitySet="SalesOrderDetail" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_Address_BillToAddressID" Association="AdventureWorks.Store.FK_SalesOrderHeader_Address_BillToAddressID">
      <End Role="Address" EntitySet="Address" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_Address_ShipToAddressID" Association="AdventureWorks.Store.FK_SalesOrderHeader_Address_ShipToAddressID">
      <End Role="Address" EntitySet="Address" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_Contact_ContactID" Association="AdventureWorks.Store.FK_SalesOrderHeader_Contact_ContactID">
      <End Role="Contact" EntitySet="Contact" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_CreditCard_CreditCardID" Association="AdventureWorks.Store.FK_SalesOrderHeader_CreditCard_CreditCardID">
      <End Role="CreditCard" EntitySet="CreditCard" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_CurrencyRate_CurrencyRateID" Association="AdventureWorks.Store.FK_SalesOrderHeader_CurrencyRate_CurrencyRateID">
      <End Role="CurrencyRate" EntitySet="CurrencyRate" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_Customer_CustomerID" Association="AdventureWorks.Store.FK_SalesOrderHeader_Customer_CustomerID">
      <End Role="Customer" EntitySet="Customer" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_SalesPerson_SalesPersonID" Association="AdventureWorks.Store.FK_SalesOrderHeader_SalesPerson_SalesPersonID">
      <End Role="SalesPerson" EntitySet="SalesPerson" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_SalesTerritory_TerritoryID" Association="AdventureWorks.Store.FK_SalesOrderHeader_SalesTerritory_TerritoryID">
      <End Role="SalesTerritory" EntitySet="SalesTerritory" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeader_ShipMethod_ShipMethodID" Association="AdventureWorks.Store.FK_SalesOrderHeader_ShipMethod_ShipMethodID">
      <End Role="ShipMethod" EntitySet="ShipMethod" />
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID" Association="AdventureWorks.Store.FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID">
      <End Role="SalesOrderHeader" EntitySet="SalesOrderHeader" />
      <End Role="SalesOrderHeaderSalesReason" EntitySet="SalesOrderHeaderSalesReason" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID" Association="AdventureWorks.Store.FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID">
      <End Role="SalesReason" EntitySet="SalesReason" />
      <End Role="SalesOrderHeaderSalesReason" EntitySet="SalesOrderHeaderSalesReason" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesPerson_Employee_SalesPersonID" Association="AdventureWorks.Store.FK_SalesPerson_Employee_SalesPersonID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="SalesPerson" EntitySet="SalesPerson" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesPerson_SalesTerritory_TerritoryID" Association="AdventureWorks.Store.FK_SalesPerson_SalesTerritory_TerritoryID">
      <End Role="SalesTerritory" EntitySet="SalesTerritory" />
      <End Role="SalesPerson" EntitySet="SalesPerson" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID" Association="AdventureWorks.Store.FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID">
      <End Role="SalesPerson" EntitySet="SalesPerson" />
      <End Role="SalesPersonQuotaHistory" EntitySet="SalesPersonQuotaHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesTaxRate_StateProvince_StateProvinceID" Association="AdventureWorks.Store.FK_SalesTaxRate_StateProvince_StateProvinceID">
      <End Role="StateProvince" EntitySet="StateProvince" />
      <End Role="SalesTaxRate" EntitySet="SalesTaxRate" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesTerritoryHistory_SalesPerson_SalesPersonID" Association="AdventureWorks.Store.FK_SalesTerritoryHistory_SalesPerson_SalesPersonID">
      <End Role="SalesPerson" EntitySet="SalesPerson" />
      <End Role="SalesTerritoryHistory" EntitySet="SalesTerritoryHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_SalesTerritoryHistory_SalesTerritory_TerritoryID" Association="AdventureWorks.Store.FK_SalesTerritoryHistory_SalesTerritory_TerritoryID">
      <End Role="SalesTerritory" EntitySet="SalesTerritory" />
      <End Role="SalesTerritoryHistory" EntitySet="SalesTerritoryHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_ShoppingCartItem_Product_ProductID" Association="AdventureWorks.Store.FK_ShoppingCartItem_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="ShoppingCartItem" EntitySet="ShoppingCartItem" />
    </AssociationSet>
    <AssociationSet Name="FK_SpecialOfferProduct_Product_ProductID" Association="AdventureWorks.Store.FK_SpecialOfferProduct_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="SpecialOfferProduct" EntitySet="SpecialOfferProduct" />
    </AssociationSet>
    <AssociationSet Name="FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID" Association="AdventureWorks.Store.FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID">
      <End Role="SpecialOffer" EntitySet="SpecialOffer" />
      <End Role="SpecialOfferProduct" EntitySet="SpecialOfferProduct" />
    </AssociationSet>
    <AssociationSet Name="FK_StateProvince_CountryRegion_CountryRegionCode" Association="AdventureWorks.Store.FK_StateProvince_CountryRegion_CountryRegionCode">
      <End Role="CountryRegion" EntitySet="CountryRegion" />
      <End Role="StateProvince" EntitySet="StateProvince" />
    </AssociationSet>
    <AssociationSet Name="FK_StateProvince_SalesTerritory_TerritoryID" Association="AdventureWorks.Store.FK_StateProvince_SalesTerritory_TerritoryID">
      <End Role="SalesTerritory" EntitySet="SalesTerritory" />
      <End Role="StateProvince" EntitySet="StateProvince" />
    </AssociationSet>
    <AssociationSet Name="FK_Store_Customer_CustomerID" Association="AdventureWorks.Store.FK_Store_Customer_CustomerID">
      <End Role="Customer" EntitySet="Customer" />
      <End Role="Store" EntitySet="Store" />
    </AssociationSet>
    <AssociationSet Name="FK_Store_SalesPerson_SalesPersonID" Association="AdventureWorks.Store.FK_Store_SalesPerson_SalesPersonID">
      <End Role="SalesPerson" EntitySet="SalesPerson" />
      <End Role="Store" EntitySet="Store" />
    </AssociationSet>
    <AssociationSet Name="FK_StoreContact_Contact_ContactID" Association="AdventureWorks.Store.FK_StoreContact_Contact_ContactID">
      <End Role="Contact" EntitySet="Contact" />
      <End Role="StoreContact" EntitySet="StoreContact" />
    </AssociationSet>
    <AssociationSet Name="FK_StoreContact_ContactType_ContactTypeID" Association="AdventureWorks.Store.FK_StoreContact_ContactType_ContactTypeID">
      <End Role="ContactType" EntitySet="ContactType" />
      <End Role="StoreContact" EntitySet="StoreContact" />
    </AssociationSet>
    <AssociationSet Name="FK_StoreContact_Store_CustomerID" Association="AdventureWorks.Store.FK_StoreContact_Store_CustomerID">
      <End Role="Store" EntitySet="Store" />
      <End Role="StoreContact" EntitySet="StoreContact" />
    </AssociationSet>
    <AssociationSet Name="FK_TransactionHistory_Product_ProductID" Association="AdventureWorks.Store.FK_TransactionHistory_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="TransactionHistory" EntitySet="TransactionHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_VendorAddress_Address_AddressID" Association="AdventureWorks.Store.FK_VendorAddress_Address_AddressID">
      <End Role="Address" EntitySet="Address" />
      <End Role="VendorAddress" EntitySet="VendorAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_VendorAddress_AddressType_AddressTypeID" Association="AdventureWorks.Store.FK_VendorAddress_AddressType_AddressTypeID">
      <End Role="AddressType" EntitySet="AddressType" />
      <End Role="VendorAddress" EntitySet="VendorAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_VendorAddress_Vendor_VendorID" Association="AdventureWorks.Store.FK_VendorAddress_Vendor_VendorID">
      <End Role="Vendor" EntitySet="Vendor" />
      <End Role="VendorAddress" EntitySet="VendorAddress" />
    </AssociationSet>
    <AssociationSet Name="FK_VendorContact_Contact_ContactID" Association="AdventureWorks.Store.FK_VendorContact_Contact_ContactID">
      <End Role="Contact" EntitySet="Contact" />
      <End Role="VendorContact" EntitySet="VendorContact" />
    </AssociationSet>
    <AssociationSet Name="FK_VendorContact_ContactType_ContactTypeID" Association="AdventureWorks.Store.FK_VendorContact_ContactType_ContactTypeID">
      <End Role="ContactType" EntitySet="ContactType" />
      <End Role="VendorContact" EntitySet="VendorContact" />
    </AssociationSet>
    <AssociationSet Name="FK_VendorContact_Vendor_VendorID" Association="AdventureWorks.Store.FK_VendorContact_Vendor_VendorID">
      <End Role="Vendor" EntitySet="Vendor" />
      <End Role="VendorContact" EntitySet="VendorContact" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkOrder_Product_ProductID" Association="AdventureWorks.Store.FK_WorkOrder_Product_ProductID">
      <End Role="Product" EntitySet="Product" />
      <End Role="WorkOrder" EntitySet="WorkOrder" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkOrder_ScrapReason_ScrapReasonID" Association="AdventureWorks.Store.FK_WorkOrder_ScrapReason_ScrapReasonID">
      <End Role="ScrapReason" EntitySet="ScrapReason" />
      <End Role="WorkOrder" EntitySet="WorkOrder" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkOrderRouting_Location_LocationID" Association="AdventureWorks.Store.FK_WorkOrderRouting_Location_LocationID">
      <End Role="Location" EntitySet="Location" />
      <End Role="WorkOrderRouting" EntitySet="WorkOrderRouting" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkOrderRouting_WorkOrder_WorkOrderID" Association="AdventureWorks.Store.FK_WorkOrderRouting_WorkOrder_WorkOrderID">
      <End Role="WorkOrder" EntitySet="WorkOrder" />
      <End Role="WorkOrderRouting" EntitySet="WorkOrderRouting" />
    </AssociationSet>
  </EntityContainer>
  <EntityType Name="AWBuildVersion">
    <Key>
      <PropertyRef Name="SystemInformationID" />
    </Key>
    <Property Name="SystemInformationID" Type="tinyint" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Database Version" Type="nvarchar" Nullable="false" MaxLength="25" />
    <Property Name="VersionDate" Type="datetime" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="DatabaseLog">
    <Key>
      <PropertyRef Name="DatabaseLogID" />
    </Key>
    <Property Name="DatabaseLogID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="PostTime" Type="datetime" Nullable="false" />
    <Property Name="DatabaseUser" Type="nvarchar" Nullable="false" MaxLength="128" />
    <Property Name="Event" Type="nvarchar" Nullable="false" MaxLength="128" />
    <Property Name="Schema" Type="nvarchar" MaxLength="128" />
    <Property Name="Object" Type="nvarchar" MaxLength="128" />
    <Property Name="TSQL" Type="nvarchar(max)" Nullable="false" />
    <Property Name="XmlEvent" Type="xml" Nullable="false" />
  </EntityType>
  <EntityType Name="ErrorLog">
    <Key>
      <PropertyRef Name="ErrorLogID" />
    </Key>
    <Property Name="ErrorLogID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ErrorTime" Type="datetime" Nullable="false" />
    <Property Name="UserName" Type="nvarchar" Nullable="false" MaxLength="128" />
    <Property Name="ErrorNumber" Type="int" Nullable="false" />
    <Property Name="ErrorSeverity" Type="int" />
    <Property Name="ErrorState" Type="int" />
    <Property Name="ErrorProcedure" Type="nvarchar" MaxLength="126" />
    <Property Name="ErrorLine" Type="int" />
    <Property Name="ErrorMessage" Type="nvarchar" Nullable="false" />
  </EntityType>
  <EntityType Name="Department">
    <Key>
      <PropertyRef Name="DepartmentID" />
    </Key>
    <Property Name="DepartmentID" Type="smallint" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="GroupName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Employee">
    <Key>
      <PropertyRef Name="EmployeeID" />
    </Key>
    <Property Name="EmployeeID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="NationalIDNumber" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="ContactID" Type="int" Nullable="false" />
    <Property Name="LoginID" Type="nvarchar" Nullable="false" MaxLength="256" />
    <Property Name="ManagerID" Type="int" />
    <Property Name="Title" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="BirthDate" Type="datetime" Nullable="false" />
    <Property Name="MaritalStatus" Type="nchar" Nullable="false" MaxLength="1" />
    <Property Name="Gender" Type="nchar" Nullable="false" MaxLength="1" />
    <Property Name="HireDate" Type="datetime" Nullable="false" />
    <Property Name="SalariedFlag" Type="bit" Nullable="false" />
    <Property Name="VacationHours" Type="smallint" Nullable="false" />
    <Property Name="SickLeaveHours" Type="smallint" Nullable="false" />
    <Property Name="CurrentFlag" Type="bit" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="EmployeeAddress">
    <Key>
      <PropertyRef Name="EmployeeID" />
      <PropertyRef Name="AddressID" />
    </Key>
    <Property Name="EmployeeID" Type="int" Nullable="false" />
    <Property Name="AddressID" Type="int" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="EmployeeDepartmentHistory">
    <Key>
      <PropertyRef Name="EmployeeID" />
      <PropertyRef Name="DepartmentID" />
      <PropertyRef Name="ShiftID" />
      <PropertyRef Name="StartDate" />
    </Key>
    <Property Name="EmployeeID" Type="int" Nullable="false" />
    <Property Name="DepartmentID" Type="smallint" Nullable="false" />
    <Property Name="ShiftID" Type="tinyint" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="EmployeePayHistory">
    <Key>
      <PropertyRef Name="EmployeeID" />
      <PropertyRef Name="RateChangeDate" />
    </Key>
    <Property Name="EmployeeID" Type="int" Nullable="false" />
    <Property Name="RateChangeDate" Type="datetime" Nullable="false" />
    <Property Name="Rate" Type="money" Nullable="false" />
    <Property Name="PayFrequency" Type="tinyint" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="JobCandidate">
    <Key>
      <PropertyRef Name="JobCandidateID" />
    </Key>
    <Property Name="JobCandidateID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="EmployeeID" Type="int" />
    <Property Name="Resume" Type="xml" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesEmployee">
    <Key>
      <PropertyRef Name="ID" />
    </Key>
    <Property Name="ID" Type="int" Nullable="false" />
    <Property Name="ExpenseAcctNumber" Type="uniqueidentifier" />
    <Property Name="CarLicenseNumber" Type="nvarchar" MaxLength="10" />
  </EntityType>
  <EntityType Name="Shift">
    <Key>
      <PropertyRef Name="ShiftID" />
    </Key>
    <Property Name="ShiftID" Type="tinyint" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="StartTime" Type="datetime" Nullable="false" />
    <Property Name="EndTime" Type="datetime" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Address">
    <Key>
      <PropertyRef Name="AddressID" />
    </Key>
    <Property Name="AddressID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="AddressLine1" Type="nvarchar" Nullable="false" MaxLength="60" />
    <Property Name="AddressLine2" Type="nvarchar" MaxLength="60" />
    <Property Name="City" Type="nvarchar" Nullable="false" MaxLength="30" />
    <Property Name="StateProvinceID" Type="int" Nullable="false" />
    <Property Name="PostalCode" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="AddressType">
    <Key>
      <PropertyRef Name="AddressTypeID" />
    </Key>
    <Property Name="AddressTypeID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Contact">
    <Key>
      <PropertyRef Name="ContactID" />
    </Key>
    <Property Name="ContactID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="NameStyle" Type="bit" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailPromotion" Type="int" Nullable="false" />
    <Property Name="Phone" Type="nvarchar" MaxLength="25" />
    <Property Name="PasswordHash" Type="varchar" Nullable="false" MaxLength="128" />
    <Property Name="PasswordSalt" Type="varchar" Nullable="false" MaxLength="10" />
    <Property Name="AdditionalContactInfo" Type="xml" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ContactType">
    <Key>
      <PropertyRef Name="ContactTypeID" />
    </Key>
    <Property Name="ContactTypeID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="CountryRegion">
    <Key>
      <PropertyRef Name="CountryRegionCode" />
    </Key>
    <Property Name="CountryRegionCode" Type="nvarchar" Nullable="false" MaxLength="3" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="StateProvince">
    <Key>
      <PropertyRef Name="StateProvinceID" />
    </Key>
    <Property Name="StateProvinceID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="StateProvinceCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="CountryRegionCode" Type="nvarchar" Nullable="false" MaxLength="3" />
    <Property Name="IsOnlyStateProvinceFlag" Type="bit" Nullable="false" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="TerritoryID" Type="int" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="BillOfMaterials">
    <Key>
      <PropertyRef Name="BillOfMaterialsID" />
    </Key>
    <Property Name="BillOfMaterialsID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ProductAssemblyID" Type="int" />
    <Property Name="ComponentID" Type="int" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="UnitMeasureCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="BOMLevel" Type="smallint" Nullable="false" />
    <Property Name="PerAssemblyQty" Type="decimal" Nullable="false" Precision="8" Scale="2" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Culture">
    <Key>
      <PropertyRef Name="CultureID" />
    </Key>
    <Property Name="CultureID" Type="nchar" Nullable="false" MaxLength="6" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Document">
    <Key>
      <PropertyRef Name="DocumentID" />
    </Key>
    <Property Name="DocumentID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Title" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="FileName" Type="nvarchar" Nullable="false" MaxLength="400" />
    <Property Name="FileExtension" Type="nvarchar" Nullable="false" MaxLength="8" />
    <Property Name="Revision" Type="nchar" Nullable="false" MaxLength="5" />
    <Property Name="ChangeNumber" Type="int" Nullable="false" />
    <Property Name="Status" Type="tinyint" Nullable="false" />
    <Property Name="DocumentSummary" Type="nvarchar(max)" />
    <Property Name="Document" Type="varbinary(max)" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Illustration">
    <Key>
      <PropertyRef Name="IllustrationID" />
    </Key>
    <Property Name="IllustrationID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Diagram" Type="xml" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Location">
    <Key>
      <PropertyRef Name="LocationID" />
    </Key>
    <Property Name="LocationID" Type="smallint" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CostRate" Type="smallmoney" Nullable="false" />
    <Property Name="Availability" Type="decimal" Nullable="false" Precision="8" Scale="2" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Product">
    <Key>
      <PropertyRef Name="ProductID" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ProductNumber" Type="nvarchar" Nullable="false" MaxLength="25" />
    <Property Name="MakeFlag" Type="bit" Nullable="false" />
    <Property Name="FinishedGoodsFlag" Type="bit" Nullable="false" />
    <Property Name="Color" Type="nvarchar" MaxLength="15" />
    <Property Name="SafetyStockLevel" Type="smallint" Nullable="false" />
    <Property Name="ReorderPoint" Type="smallint" Nullable="false" />
    <Property Name="StandardCost" Type="money" Nullable="false" />
    <Property Name="ListPrice" Type="money" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="5" />
    <Property Name="SizeUnitMeasureCode" Type="nchar" MaxLength="3" />
    <Property Name="WeightUnitMeasureCode" Type="nchar" MaxLength="3" />
    <Property Name="Weight" Type="decimal" Precision="8" Scale="2" />
    <Property Name="DaysToManufacture" Type="int" Nullable="false" />
    <Property Name="ProductLine" Type="nchar" MaxLength="2" />
    <Property Name="Class" Type="nchar" MaxLength="2" />
    <Property Name="Style" Type="nchar" MaxLength="2" />
    <Property Name="ProductSubcategoryID" Type="int" />
    <Property Name="ProductModelID" Type="int" />
    <Property Name="SellStartDate" Type="datetime" Nullable="false" />
    <Property Name="SellEndDate" Type="datetime" />
    <Property Name="DiscontinuedDate" Type="datetime" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductCategory">
    <Key>
      <PropertyRef Name="ProductCategoryID" />
    </Key>
    <Property Name="ProductCategoryID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductCostHistory">
    <Key>
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="StartDate" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="StandardCost" Type="money" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductDescription">
    <Key>
      <PropertyRef Name="ProductDescriptionID" />
    </Key>
    <Property Name="ProductDescriptionID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Description" Type="nvarchar" Nullable="false" MaxLength="400" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductDocument">
    <Key>
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="DocumentID" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="DocumentID" Type="int" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductInventory">
    <Key>
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="LocationID" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="LocationID" Type="smallint" Nullable="false" />
    <Property Name="Shelf" Type="nvarchar" Nullable="false" MaxLength="10" />
    <Property Name="Bin" Type="tinyint" Nullable="false" />
    <Property Name="Quantity" Type="smallint" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductListPriceHistory">
    <Key>
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="StartDate" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="ListPrice" Type="money" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductModel">
    <Key>
      <PropertyRef Name="ProductModelID" />
    </Key>
    <Property Name="ProductModelID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CatalogDescription" Type="xml" />
    <Property Name="Instructions" Type="xml" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductModelIllustration">
    <Key>
      <PropertyRef Name="ProductModelID" />
      <PropertyRef Name="IllustrationID" />
    </Key>
    <Property Name="ProductModelID" Type="int" Nullable="false" />
    <Property Name="IllustrationID" Type="int" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductModelProductDescriptionCulture">
    <Key>
      <PropertyRef Name="ProductModelID" />
      <PropertyRef Name="ProductDescriptionID" />
      <PropertyRef Name="CultureID" />
    </Key>
    <Property Name="ProductModelID" Type="int" Nullable="false" />
    <Property Name="ProductDescriptionID" Type="int" Nullable="false" />
    <Property Name="CultureID" Type="nchar" Nullable="false" MaxLength="6" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductPhoto">
    <Key>
      <PropertyRef Name="ProductPhotoID" />
    </Key>
    <Property Name="ProductPhotoID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ThumbNailPhoto" Type="varbinary(max)" />
    <Property Name="ThumbnailPhotoFileName" Type="nvarchar" MaxLength="50" />
    <Property Name="LargePhoto" Type="varbinary(max)" />
    <Property Name="LargePhotoFileName" Type="nvarchar" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductProductPhoto">
    <Key>
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="ProductPhotoID" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="ProductPhotoID" Type="int" Nullable="false" />
    <Property Name="Primary" Type="bit" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductReview">
    <Key>
      <PropertyRef Name="ProductReviewID" />
    </Key>
    <Property Name="ProductReviewID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="ReviewerName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ReviewDate" Type="datetime" Nullable="false" />
    <Property Name="EmailAddress" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Rating" Type="int" Nullable="false" />
    <Property Name="Comments" Type="nvarchar" MaxLength="3850" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductSubcategory">
    <Key>
      <PropertyRef Name="ProductSubcategoryID" />
    </Key>
    <Property Name="ProductSubcategoryID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ProductCategoryID" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ScrapReason">
    <Key>
      <PropertyRef Name="ScrapReasonID" />
    </Key>
    <Property Name="ScrapReasonID" Type="smallint" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="TransactionHistory">
    <Key>
      <PropertyRef Name="TransactionID" />
    </Key>
    <Property Name="TransactionID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="ReferenceOrderID" Type="int" Nullable="false" />
    <Property Name="ReferenceOrderLineID" Type="int" Nullable="false" />
    <Property Name="TransactionDate" Type="datetime" Nullable="false" />
    <Property Name="TransactionType" Type="nchar" Nullable="false" MaxLength="1" />
    <Property Name="Quantity" Type="int" Nullable="false" />
    <Property Name="ActualCost" Type="money" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="TransactionHistoryArchive">
    <Key>
      <PropertyRef Name="TransactionID" />
    </Key>
    <Property Name="TransactionID" Type="int" Nullable="false" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="ReferenceOrderID" Type="int" Nullable="false" />
    <Property Name="ReferenceOrderLineID" Type="int" Nullable="false" />
    <Property Name="TransactionDate" Type="datetime" Nullable="false" />
    <Property Name="TransactionType" Type="nchar" Nullable="false" MaxLength="1" />
    <Property Name="Quantity" Type="int" Nullable="false" />
    <Property Name="ActualCost" Type="money" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="UnitMeasure">
    <Key>
      <PropertyRef Name="UnitMeasureCode" />
    </Key>
    <Property Name="UnitMeasureCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="WorkOrder">
    <Key>
      <PropertyRef Name="WorkOrderID" />
    </Key>
    <Property Name="WorkOrderID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="OrderQty" Type="int" Nullable="false" />
    <Property Name="StockedQty" Type="int" Nullable="false" StoreGeneratedPattern="Computed" />
    <Property Name="ScrappedQty" Type="smallint" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="DueDate" Type="datetime" Nullable="false" />
    <Property Name="ScrapReasonID" Type="smallint" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="WorkOrderRouting">
    <Key>
      <PropertyRef Name="WorkOrderID" />
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="OperationSequence" />
    </Key>
    <Property Name="WorkOrderID" Type="int" Nullable="false" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="OperationSequence" Type="smallint" Nullable="false" />
    <Property Name="LocationID" Type="smallint" Nullable="false" />
    <Property Name="ScheduledStartDate" Type="datetime" Nullable="false" />
    <Property Name="ScheduledEndDate" Type="datetime" Nullable="false" />
    <Property Name="ActualStartDate" Type="datetime" />
    <Property Name="ActualEndDate" Type="datetime" />
    <Property Name="ActualResourceHrs" Type="decimal" Precision="9" Scale="4" />
    <Property Name="PlannedCost" Type="money" Nullable="false" />
    <Property Name="ActualCost" Type="money" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ProductVendor">
    <Key>
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="VendorID" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="VendorID" Type="int" Nullable="false" />
    <Property Name="AverageLeadTime" Type="int" Nullable="false" />
    <Property Name="StandardPrice" Type="money" Nullable="false" />
    <Property Name="LastReceiptCost" Type="money" />
    <Property Name="LastReceiptDate" Type="datetime" />
    <Property Name="MinOrderQty" Type="int" Nullable="false" />
    <Property Name="MaxOrderQty" Type="int" Nullable="false" />
    <Property Name="OnOrderQty" Type="int" />
    <Property Name="UnitMeasureCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="PurchaseOrderDetail">
    <Key>
      <PropertyRef Name="PurchaseOrderID" />
      <PropertyRef Name="PurchaseOrderDetailID" />
    </Key>
    <Property Name="PurchaseOrderID" Type="int" Nullable="false" />
    <Property Name="PurchaseOrderDetailID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="DueDate" Type="datetime" Nullable="false" />
    <Property Name="OrderQty" Type="smallint" Nullable="false" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="UnitPrice" Type="money" Nullable="false" />
    <Property Name="LineTotal" Type="money" Nullable="false" StoreGeneratedPattern="Computed" />
    <Property Name="ReceivedQty" Type="decimal" Nullable="false" Precision="8" Scale="2" />
    <Property Name="RejectedQty" Type="decimal" Nullable="false" Precision="8" Scale="2" />
    <Property Name="StockedQty" Type="decimal" Nullable="false" Precision="9" Scale="2" StoreGeneratedPattern="Computed" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="PurchaseOrderHeader">
    <Key>
      <PropertyRef Name="PurchaseOrderID" />
    </Key>
    <Property Name="PurchaseOrderID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="RevisionNumber" Type="tinyint" Nullable="false" />
    <Property Name="Status" Type="tinyint" Nullable="false" />
    <Property Name="EmployeeID" Type="int" Nullable="false" />
    <Property Name="VendorID" Type="int" Nullable="false" />
    <Property Name="ShipMethodID" Type="int" Nullable="false" />
    <Property Name="OrderDate" Type="datetime" Nullable="false" />
    <Property Name="ShipDate" Type="datetime" />
    <Property Name="SubTotal" Type="money" Nullable="false" />
    <Property Name="TaxAmt" Type="money" Nullable="false" />
    <Property Name="Freight" Type="money" Nullable="false" />
    <Property Name="TotalDue" Type="money" Nullable="false" StoreGeneratedPattern="Computed" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ShipMethod">
    <Key>
      <PropertyRef Name="ShipMethodID" />
    </Key>
    <Property Name="ShipMethodID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ShipBase" Type="money" Nullable="false" />
    <Property Name="ShipRate" Type="money" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Vendor">
    <Key>
      <PropertyRef Name="VendorID" />
    </Key>
    <Property Name="VendorID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="AccountNumber" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CreditRating" Type="tinyint" Nullable="false" />
    <Property Name="PreferredVendorStatus" Type="bit" Nullable="false" />
    <Property Name="ActiveFlag" Type="bit" Nullable="false" />
    <Property Name="PurchasingWebServiceURL" Type="nvarchar" MaxLength="1024" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="VendorAddress">
    <Key>
      <PropertyRef Name="VendorID" />
      <PropertyRef Name="AddressID" />
    </Key>
    <Property Name="VendorID" Type="int" Nullable="false" />
    <Property Name="AddressID" Type="int" Nullable="false" />
    <Property Name="AddressTypeID" Type="int" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="VendorContact">
    <Key>
      <PropertyRef Name="VendorID" />
      <PropertyRef Name="ContactID" />
    </Key>
    <Property Name="VendorID" Type="int" Nullable="false" />
    <Property Name="ContactID" Type="int" Nullable="false" />
    <Property Name="ContactTypeID" Type="int" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ContactCreditCard">
    <Key>
      <PropertyRef Name="ContactID" />
      <PropertyRef Name="CreditCardID" />
    </Key>
    <Property Name="ContactID" Type="int" Nullable="false" />
    <Property Name="CreditCardID" Type="int" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="CountryRegionCurrency">
    <Key>
      <PropertyRef Name="CountryRegionCode" />
      <PropertyRef Name="CurrencyCode" />
    </Key>
    <Property Name="CountryRegionCode" Type="nvarchar" Nullable="false" MaxLength="3" />
    <Property Name="CurrencyCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="CreditCard">
    <Key>
      <PropertyRef Name="CreditCardID" />
    </Key>
    <Property Name="CreditCardID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="CardType" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CardNumber" Type="nvarchar" Nullable="false" MaxLength="25" />
    <Property Name="ExpMonth" Type="tinyint" Nullable="false" />
    <Property Name="ExpYear" Type="smallint" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Currency">
    <Key>
      <PropertyRef Name="CurrencyCode" />
    </Key>
    <Property Name="CurrencyCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="CurrencyRate">
    <Key>
      <PropertyRef Name="CurrencyRateID" />
    </Key>
    <Property Name="CurrencyRateID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="CurrencyRateDate" Type="datetime" Nullable="false" />
    <Property Name="FromCurrencyCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="ToCurrencyCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="AverageRate" Type="money" Nullable="false" />
    <Property Name="EndOfDayRate" Type="money" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Customer">
    <Key>
      <PropertyRef Name="CustomerID" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="TerritoryID" Type="int" />
    <Property Name="AccountNumber" Type="varchar" Nullable="false" MaxLength="10" StoreGeneratedPattern="Computed" />
    <Property Name="CustomerType" Type="nchar" Nullable="false" MaxLength="1" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="CustomerAddress">
    <Key>
      <PropertyRef Name="CustomerID" />
      <PropertyRef Name="AddressID" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="AddressID" Type="int" Nullable="false" />
    <Property Name="AddressTypeID" Type="int" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Individual">
    <Key>
      <PropertyRef Name="CustomerID" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="ContactID" Type="int" Nullable="false" />
    <Property Name="Demographics" Type="xml" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesOrderDetail">
    <Key>
      <PropertyRef Name="SalesOrderID" />
      <PropertyRef Name="SalesOrderDetailID" />
    </Key>
    <Property Name="SalesOrderID" Type="int" Nullable="false" />
    <Property Name="SalesOrderDetailID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="CarrierTrackingNumber" Type="nvarchar" MaxLength="25" />
    <Property Name="OrderQty" Type="smallint" Nullable="false" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="SpecialOfferID" Type="int" Nullable="false" />
    <Property Name="UnitPrice" Type="money" Nullable="false" />
    <Property Name="UnitPriceDiscount" Type="money" Nullable="false" />
    <Property Name="LineTotal" Type="numeric" Nullable="false" Precision="38" Scale="6" StoreGeneratedPattern="Computed" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesOrderHeader">
    <Key>
      <PropertyRef Name="SalesOrderID" />
    </Key>
    <Property Name="SalesOrderID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="RevisionNumber" Type="tinyint" Nullable="false" />
    <Property Name="OrderDate" Type="datetime" Nullable="false" />
    <Property Name="DueDate" Type="datetime" Nullable="false" />
    <Property Name="ShipDate" Type="datetime" />
    <Property Name="Status" Type="tinyint" Nullable="false" />
    <Property Name="OnlineOrderFlag" Type="bit" Nullable="false" />
    <Property Name="SalesOrderNumber" Type="nvarchar" Nullable="false" MaxLength="25" StoreGeneratedPattern="Computed" />
    <Property Name="PurchaseOrderNumber" Type="nvarchar" MaxLength="25" />
    <Property Name="AccountNumber" Type="nvarchar" MaxLength="15" />
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="ContactID" Type="int" Nullable="false" />
    <Property Name="SalesPersonID" Type="int" />
    <Property Name="TerritoryID" Type="int" />
    <Property Name="BillToAddressID" Type="int" Nullable="false" />
    <Property Name="ShipToAddressID" Type="int" Nullable="false" />
    <Property Name="ShipMethodID" Type="int" Nullable="false" />
    <Property Name="CreditCardID" Type="int" />
    <Property Name="CreditCardApprovalCode" Type="varchar" MaxLength="15" />
    <Property Name="CurrencyRateID" Type="int" />
    <Property Name="SubTotal" Type="money" Nullable="false" />
    <Property Name="TaxAmt" Type="money" Nullable="false" />
    <Property Name="Freight" Type="money" Nullable="false" />
    <Property Name="TotalDue" Type="money" Nullable="false" StoreGeneratedPattern="Computed" />
    <Property Name="Comment" Type="nvarchar" MaxLength="128" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesOrderHeaderSalesReason">
    <Key>
      <PropertyRef Name="SalesOrderID" />
      <PropertyRef Name="SalesReasonID" />
    </Key>
    <Property Name="SalesOrderID" Type="int" Nullable="false" />
    <Property Name="SalesReasonID" Type="int" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesPerson">
    <Key>
      <PropertyRef Name="SalesPersonID" />
    </Key>
    <Property Name="SalesPersonID" Type="int" Nullable="false" />
    <Property Name="TerritoryID" Type="int" />
    <Property Name="SalesQuota" Type="money" />
    <Property Name="Bonus" Type="money" Nullable="false" />
    <Property Name="CommissionPct" Type="smallmoney" Nullable="false" />
    <Property Name="SalesYTD" Type="money" Nullable="false" />
    <Property Name="SalesLastYear" Type="money" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesPersonQuotaHistory">
    <Key>
      <PropertyRef Name="SalesPersonID" />
      <PropertyRef Name="QuotaDate" />
    </Key>
    <Property Name="SalesPersonID" Type="int" Nullable="false" />
    <Property Name="QuotaDate" Type="datetime" Nullable="false" />
    <Property Name="SalesQuota" Type="money" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesReason">
    <Key>
      <PropertyRef Name="SalesReasonID" />
    </Key>
    <Property Name="SalesReasonID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ReasonType" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesTaxRate">
    <Key>
      <PropertyRef Name="SalesTaxRateID" />
    </Key>
    <Property Name="SalesTaxRateID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="StateProvinceID" Type="int" Nullable="false" />
    <Property Name="TaxType" Type="tinyint" Nullable="false" />
    <Property Name="TaxRate" Type="smallmoney" Nullable="false" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesTerritory">
    <Key>
      <PropertyRef Name="TerritoryID" />
    </Key>
    <Property Name="TerritoryID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CountryRegionCode" Type="nvarchar" Nullable="false" MaxLength="3" />
    <Property Name="Group" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="SalesYTD" Type="money" Nullable="false" />
    <Property Name="SalesLastYear" Type="money" Nullable="false" />
    <Property Name="CostYTD" Type="money" Nullable="false" />
    <Property Name="CostLastYear" Type="money" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SalesTerritoryHistory">
    <Key>
      <PropertyRef Name="SalesPersonID" />
      <PropertyRef Name="TerritoryID" />
      <PropertyRef Name="StartDate" />
    </Key>
    <Property Name="SalesPersonID" Type="int" Nullable="false" />
    <Property Name="TerritoryID" Type="int" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="ShoppingCartItem">
    <Key>
      <PropertyRef Name="ShoppingCartItemID" />
    </Key>
    <Property Name="ShoppingCartItemID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ShoppingCartID" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Quantity" Type="int" Nullable="false" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SpecialOffer">
    <Key>
      <PropertyRef Name="SpecialOfferID" />
    </Key>
    <Property Name="SpecialOfferID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Description" Type="nvarchar" Nullable="false" MaxLength="255" />
    <Property Name="DiscountPct" Type="smallmoney" Nullable="false" />
    <Property Name="Type" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Category" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" Nullable="false" />
    <Property Name="MinQty" Type="int" Nullable="false" />
    <Property Name="MaxQty" Type="int" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="SpecialOfferProduct">
    <Key>
      <PropertyRef Name="SpecialOfferID" />
      <PropertyRef Name="ProductID" />
    </Key>
    <Property Name="SpecialOfferID" Type="int" Nullable="false" />
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Store">
    <Key>
      <PropertyRef Name="CustomerID" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="SalesPersonID" Type="int" />
    <Property Name="Demographics" Type="xml" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="StoreContact">
    <Key>
      <PropertyRef Name="CustomerID" />
      <PropertyRef Name="ContactID" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="ContactID" Type="int" Nullable="false" />
    <Property Name="ContactTypeID" Type="int" Nullable="false" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.HumanResources.vEmployee' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vEmployee">
    <Key>
      <PropertyRef Name="EmployeeID" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="JobTitle" />
      <PropertyRef Name="EmailPromotion" />
      <PropertyRef Name="AddressLine1" />
      <PropertyRef Name="City" />
      <PropertyRef Name="StateProvinceName" />
      <PropertyRef Name="PostalCode" />
      <PropertyRef Name="CountryRegionName" />
    </Key>
    <Property Name="EmployeeID" Type="int" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="JobTitle" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Phone" Type="nvarchar" MaxLength="25" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailPromotion" Type="int" Nullable="false" />
    <Property Name="AddressLine1" Type="nvarchar" Nullable="false" MaxLength="60" />
    <Property Name="AddressLine2" Type="nvarchar" MaxLength="60" />
    <Property Name="City" Type="nvarchar" Nullable="false" MaxLength="30" />
    <Property Name="StateProvinceName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="PostalCode" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="CountryRegionName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="AdditionalContactInfo" Type="xml" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.HumanResources.vEmployeeDepartment' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vEmployeeDepartment">
    <Key>
      <PropertyRef Name="EmployeeID" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="JobTitle" />
      <PropertyRef Name="Department" />
      <PropertyRef Name="GroupName" />
      <PropertyRef Name="StartDate" />
    </Key>
    <Property Name="EmployeeID" Type="int" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="JobTitle" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Department" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="GroupName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.HumanResources.vEmployeeDepartmentHistory' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vEmployeeDepartmentHistory">
    <Key>
      <PropertyRef Name="EmployeeID" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="Shift" />
      <PropertyRef Name="Department" />
      <PropertyRef Name="GroupName" />
      <PropertyRef Name="StartDate" />
    </Key>
    <Property Name="EmployeeID" Type="int" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="Shift" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Department" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="GroupName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.HumanResources.vJobCandidate' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vJobCandidate">
    <Key>
      <PropertyRef Name="JobCandidateID" />
      <PropertyRef Name="ModifiedDate" />
    </Key>
    <Property Name="JobCandidateID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="EmployeeID" Type="int" />
    <Property Name="Name.Prefix" Type="nvarchar" MaxLength="30" />
    <Property Name="Name.First" Type="nvarchar" MaxLength="30" />
    <Property Name="Name.Middle" Type="nvarchar" MaxLength="30" />
    <Property Name="Name.Last" Type="nvarchar" MaxLength="30" />
    <Property Name="Name.Suffix" Type="nvarchar" MaxLength="30" />
    <Property Name="Skills" Type="nvarchar(max)" />
    <Property Name="Addr.Type" Type="nvarchar" MaxLength="30" />
    <Property Name="Addr.Loc.CountryRegion" Type="nvarchar" MaxLength="100" />
    <Property Name="Addr.Loc.State" Type="nvarchar" MaxLength="100" />
    <Property Name="Addr.Loc.City" Type="nvarchar" MaxLength="100" />
    <Property Name="Addr.PostalCode" Type="nvarchar" MaxLength="20" />
    <Property Name="EMail" Type="nvarchar(max)" />
    <Property Name="WebSite" Type="nvarchar(max)" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.HumanResources.vJobCandidateEducation' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vJobCandidateEducation">
    <Key>
      <PropertyRef Name="JobCandidateID" />
    </Key>
    <Property Name="JobCandidateID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Edu.Level" Type="nvarchar(max)" />
    <Property Name="Edu.StartDate" Type="datetime" />
    <Property Name="Edu.EndDate" Type="datetime" />
    <Property Name="Edu.Degree" Type="nvarchar" MaxLength="50" />
    <Property Name="Edu.Major" Type="nvarchar" MaxLength="50" />
    <Property Name="Edu.Minor" Type="nvarchar" MaxLength="50" />
    <Property Name="Edu.GPA" Type="nvarchar" MaxLength="5" />
    <Property Name="Edu.GPAScale" Type="nvarchar" MaxLength="5" />
    <Property Name="Edu.School" Type="nvarchar" MaxLength="100" />
    <Property Name="Edu.Loc.CountryRegion" Type="nvarchar" MaxLength="100" />
    <Property Name="Edu.Loc.State" Type="nvarchar" MaxLength="100" />
    <Property Name="Edu.Loc.City" Type="nvarchar" MaxLength="100" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.HumanResources.vJobCandidateEmployment' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vJobCandidateEmployment">
    <Key>
      <PropertyRef Name="JobCandidateID" />
    </Key>
    <Property Name="JobCandidateID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Emp.StartDate" Type="datetime" />
    <Property Name="Emp.EndDate" Type="datetime" />
    <Property Name="Emp.OrgName" Type="nvarchar" MaxLength="100" />
    <Property Name="Emp.JobTitle" Type="nvarchar" MaxLength="100" />
    <Property Name="Emp.Responsibility" Type="nvarchar(max)" />
    <Property Name="Emp.FunctionCategory" Type="nvarchar(max)" />
    <Property Name="Emp.IndustryCategory" Type="nvarchar(max)" />
    <Property Name="Emp.Loc.CountryRegion" Type="nvarchar(max)" />
    <Property Name="Emp.Loc.State" Type="nvarchar(max)" />
    <Property Name="Emp.Loc.City" Type="nvarchar(max)" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Person.vAdditionalContactInfo' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vAdditionalContactInfo">
    <Key>
      <PropertyRef Name="ContactID" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="rowguid" />
      <PropertyRef Name="ModifiedDate" />
    </Key>
    <Property Name="ContactID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="TelephoneNumber" Type="nvarchar" MaxLength="50" />
    <Property Name="TelephoneSpecialInstructions" Type="nvarchar(max)" />
    <Property Name="Street" Type="nvarchar" MaxLength="50" />
    <Property Name="City" Type="nvarchar" MaxLength="50" />
    <Property Name="StateProvince" Type="nvarchar" MaxLength="50" />
    <Property Name="PostalCode" Type="nvarchar" MaxLength="50" />
    <Property Name="CountryRegion" Type="nvarchar" MaxLength="50" />
    <Property Name="HomeAddressSpecialInstructions" Type="nvarchar(max)" />
    <Property Name="EMailAddress" Type="nvarchar" MaxLength="128" />
    <Property Name="EMailSpecialInstructions" Type="nvarchar(max)" />
    <Property Name="EMailTelephoneNumber" Type="nvarchar" MaxLength="50" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Person.vStateProvinceCountryRegion' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vStateProvinceCountryRegion">
    <Key>
      <PropertyRef Name="StateProvinceID" />
      <PropertyRef Name="StateProvinceCode" />
      <PropertyRef Name="IsOnlyStateProvinceFlag" />
      <PropertyRef Name="StateProvinceName" />
      <PropertyRef Name="TerritoryID" />
      <PropertyRef Name="CountryRegionCode" />
      <PropertyRef Name="CountryRegionName" />
    </Key>
    <Property Name="StateProvinceID" Type="int" Nullable="false" />
    <Property Name="StateProvinceCode" Type="nchar" Nullable="false" MaxLength="3" />
    <Property Name="IsOnlyStateProvinceFlag" Type="bit" Nullable="false" />
    <Property Name="StateProvinceName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="TerritoryID" Type="int" Nullable="false" />
    <Property Name="CountryRegionCode" Type="nvarchar" Nullable="false" MaxLength="3" />
    <Property Name="CountryRegionName" Type="nvarchar" Nullable="false" MaxLength="50" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Production.vProductAndDescription' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vProductAndDescription">
    <Key>
      <PropertyRef Name="ProductID" />
      <PropertyRef Name="Name" />
      <PropertyRef Name="ProductModel" />
      <PropertyRef Name="CultureID" />
      <PropertyRef Name="Description" />
    </Key>
    <Property Name="ProductID" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ProductModel" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CultureID" Type="nchar" Nullable="false" MaxLength="6" />
    <Property Name="Description" Type="nvarchar" Nullable="false" MaxLength="400" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Production.vProductModelCatalogDescription' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vProductModelCatalogDescription">
    <Key>
      <PropertyRef Name="ProductModelID" />
      <PropertyRef Name="Name" />
      <PropertyRef Name="rowguid" />
      <PropertyRef Name="ModifiedDate" />
    </Key>
    <Property Name="ProductModelID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Summary" Type="nvarchar(max)" />
    <Property Name="Manufacturer" Type="nvarchar(max)" />
    <Property Name="Copyright" Type="nvarchar" MaxLength="30" />
    <Property Name="ProductURL" Type="nvarchar" MaxLength="256" />
    <Property Name="WarrantyPeriod" Type="nvarchar" MaxLength="256" />
    <Property Name="WarrantyDescription" Type="nvarchar" MaxLength="256" />
    <Property Name="NoOfYears" Type="nvarchar" MaxLength="256" />
    <Property Name="MaintenanceDescription" Type="nvarchar" MaxLength="256" />
    <Property Name="Wheel" Type="nvarchar" MaxLength="256" />
    <Property Name="Saddle" Type="nvarchar" MaxLength="256" />
    <Property Name="Pedal" Type="nvarchar" MaxLength="256" />
    <Property Name="BikeFrame" Type="nvarchar(max)" />
    <Property Name="Crankset" Type="nvarchar" MaxLength="256" />
    <Property Name="PictureAngle" Type="nvarchar" MaxLength="256" />
    <Property Name="PictureSize" Type="nvarchar" MaxLength="256" />
    <Property Name="ProductPhotoID" Type="nvarchar" MaxLength="256" />
    <Property Name="Material" Type="nvarchar" MaxLength="256" />
    <Property Name="Color" Type="nvarchar" MaxLength="256" />
    <Property Name="ProductLine" Type="nvarchar" MaxLength="256" />
    <Property Name="Style" Type="nvarchar" MaxLength="256" />
    <Property Name="RiderExperience" Type="nvarchar" MaxLength="1024" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Production.vProductModelInstructions' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vProductModelInstructions">
    <Key>
      <PropertyRef Name="ProductModelID" />
      <PropertyRef Name="Name" />
      <PropertyRef Name="rowguid" />
      <PropertyRef Name="ModifiedDate" />
    </Key>
    <Property Name="ProductModelID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Instructions" Type="nvarchar(max)" />
    <Property Name="LocationID" Type="int" />
    <Property Name="SetupHours" Type="decimal" Precision="9" Scale="4" />
    <Property Name="MachineHours" Type="decimal" Precision="9" Scale="4" />
    <Property Name="LaborHours" Type="decimal" Precision="9" Scale="4" />
    <Property Name="LotSize" Type="int" />
    <Property Name="Step" Type="nvarchar" MaxLength="1024" />
    <Property Name="rowguid" Type="uniqueidentifier" Nullable="false" />
    <Property Name="ModifiedDate" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Purchasing.vVendor' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vVendor">
    <Key>
      <PropertyRef Name="VendorID" />
      <PropertyRef Name="Name" />
      <PropertyRef Name="ContactType" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="EmailPromotion" />
      <PropertyRef Name="AddressLine1" />
      <PropertyRef Name="City" />
      <PropertyRef Name="StateProvinceName" />
      <PropertyRef Name="PostalCode" />
      <PropertyRef Name="CountryRegionName" />
    </Key>
    <Property Name="VendorID" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ContactType" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="Phone" Type="nvarchar" MaxLength="25" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailPromotion" Type="int" Nullable="false" />
    <Property Name="AddressLine1" Type="nvarchar" Nullable="false" MaxLength="60" />
    <Property Name="AddressLine2" Type="nvarchar" MaxLength="60" />
    <Property Name="City" Type="nvarchar" Nullable="false" MaxLength="30" />
    <Property Name="StateProvinceName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="PostalCode" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="CountryRegionName" Type="nvarchar" Nullable="false" MaxLength="50" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Sales.vIndividualCustomer' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vIndividualCustomer">
    <Key>
      <PropertyRef Name="CustomerID" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="EmailPromotion" />
      <PropertyRef Name="AddressType" />
      <PropertyRef Name="AddressLine1" />
      <PropertyRef Name="City" />
      <PropertyRef Name="StateProvinceName" />
      <PropertyRef Name="PostalCode" />
      <PropertyRef Name="CountryRegionName" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="Phone" Type="nvarchar" MaxLength="25" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailPromotion" Type="int" Nullable="false" />
    <Property Name="AddressType" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="AddressLine1" Type="nvarchar" Nullable="false" MaxLength="60" />
    <Property Name="AddressLine2" Type="nvarchar" MaxLength="60" />
    <Property Name="City" Type="nvarchar" Nullable="false" MaxLength="30" />
    <Property Name="StateProvinceName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="PostalCode" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="CountryRegionName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Demographics" Type="xml" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Sales.vIndividualDemographics' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vIndividualDemographics">
    <Key>
      <PropertyRef Name="CustomerID" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="TotalPurchaseYTD" Type="money" />
    <Property Name="DateFirstPurchase" Type="datetime" />
    <Property Name="BirthDate" Type="datetime" />
    <Property Name="MaritalStatus" Type="nvarchar" MaxLength="1" />
    <Property Name="YearlyIncome" Type="nvarchar" MaxLength="30" />
    <Property Name="Gender" Type="nvarchar" MaxLength="1" />
    <Property Name="TotalChildren" Type="int" />
    <Property Name="NumberChildrenAtHome" Type="int" />
    <Property Name="Education" Type="nvarchar" MaxLength="30" />
    <Property Name="Occupation" Type="nvarchar" MaxLength="30" />
    <Property Name="HomeOwnerFlag" Type="bit" />
    <Property Name="NumberCarsOwned" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Sales.vSalesPerson' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vSalesPerson">
    <Key>
      <PropertyRef Name="SalesPersonID" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="JobTitle" />
      <PropertyRef Name="EmailPromotion" />
      <PropertyRef Name="AddressLine1" />
      <PropertyRef Name="City" />
      <PropertyRef Name="StateProvinceName" />
      <PropertyRef Name="PostalCode" />
      <PropertyRef Name="CountryRegionName" />
      <PropertyRef Name="SalesYTD" />
      <PropertyRef Name="SalesLastYear" />
    </Key>
    <Property Name="SalesPersonID" Type="int" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="JobTitle" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Phone" Type="nvarchar" MaxLength="25" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailPromotion" Type="int" Nullable="false" />
    <Property Name="AddressLine1" Type="nvarchar" Nullable="false" MaxLength="60" />
    <Property Name="AddressLine2" Type="nvarchar" MaxLength="60" />
    <Property Name="City" Type="nvarchar" Nullable="false" MaxLength="30" />
    <Property Name="StateProvinceName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="PostalCode" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="CountryRegionName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="TerritoryName" Type="nvarchar" MaxLength="50" />
    <Property Name="TerritoryGroup" Type="nvarchar" MaxLength="50" />
    <Property Name="SalesQuota" Type="money" />
    <Property Name="SalesYTD" Type="money" Nullable="false" />
    <Property Name="SalesLastYear" Type="money" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Sales.vSalesPersonSalesByFiscalYears' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vSalesPersonSalesByFiscalYears">
    <Key>
      <PropertyRef Name="Title" />
      <PropertyRef Name="SalesTerritory" />
    </Key>
    <Property Name="SalesPersonID" Type="int" />
    <Property Name="FullName" Type="nvarchar" MaxLength="152" />
    <Property Name="Title" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="SalesTerritory" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="2002" Type="money" />
    <Property Name="2003" Type="money" />
    <Property Name="2004" Type="money" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'AdventureWorks.Sales.vStoreWithDemographics' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
-->
  <EntityType Name="vStoreWithDemographics">
    <Key>
      <PropertyRef Name="CustomerID" />
      <PropertyRef Name="Name" />
      <PropertyRef Name="ContactType" />
      <PropertyRef Name="FirstName" />
      <PropertyRef Name="LastName" />
      <PropertyRef Name="EmailPromotion" />
      <PropertyRef Name="AddressType" />
      <PropertyRef Name="AddressLine1" />
      <PropertyRef Name="City" />
      <PropertyRef Name="StateProvinceName" />
      <PropertyRef Name="PostalCode" />
      <PropertyRef Name="CountryRegionName" />
    </Key>
    <Property Name="CustomerID" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ContactType" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Title" Type="nvarchar" MaxLength="8" />
    <Property Name="FirstName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
    <Property Name="LastName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Suffix" Type="nvarchar" MaxLength="10" />
    <Property Name="Phone" Type="nvarchar" MaxLength="25" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailPromotion" Type="int" Nullable="false" />
    <Property Name="AddressType" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="AddressLine1" Type="nvarchar" Nullable="false" MaxLength="60" />
    <Property Name="AddressLine2" Type="nvarchar" MaxLength="60" />
    <Property Name="City" Type="nvarchar" Nullable="false" MaxLength="30" />
    <Property Name="StateProvinceName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="PostalCode" Type="nvarchar" Nullable="false" MaxLength="15" />
    <Property Name="CountryRegionName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="AnnualSales" Type="money" />
    <Property Name="AnnualRevenue" Type="money" />
    <Property Name="BankName" Type="nvarchar" MaxLength="50" />
    <Property Name="BusinessType" Type="nvarchar" MaxLength="5" />
    <Property Name="YearOpened" Type="int" />
    <Property Name="Specialty" Type="nvarchar" MaxLength="50" />
    <Property Name="SquareFeet" Type="int" />
    <Property Name="Brands" Type="nvarchar" MaxLength="30" />
    <Property Name="Internet" Type="nvarchar" MaxLength="30" />
    <Property Name="NumberEmployees" Type="int" />
  </EntityType>
  <Association Name="FK_Address_StateProvince_StateProvinceID">
    <End Role="StateProvince" Type="AdventureWorks.Store.StateProvince" Multiplicity="1" />
    <End Role="Address" Type="AdventureWorks.Store.Address" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="StateProvince">
        <PropertyRef Name="StateProvinceID" />
      </Principal>
      <Dependent Role="Address">
        <PropertyRef Name="StateProvinceID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BillOfMaterials_Product_ComponentID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="BillOfMaterials" Type="AdventureWorks.Store.BillOfMaterials" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="BillOfMaterials">
        <PropertyRef Name="ComponentID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BillOfMaterials_Product_ProductAssemblyID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="0..1" />
    <End Role="BillOfMaterials" Type="AdventureWorks.Store.BillOfMaterials" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="BillOfMaterials">
        <PropertyRef Name="ProductAssemblyID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BillOfMaterials_UnitMeasure_UnitMeasureCode">
    <End Role="UnitMeasure" Type="AdventureWorks.Store.UnitMeasure" Multiplicity="1" />
    <End Role="BillOfMaterials" Type="AdventureWorks.Store.BillOfMaterials" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="UnitMeasure">
        <PropertyRef Name="UnitMeasureCode" />
      </Principal>
      <Dependent Role="BillOfMaterials">
        <PropertyRef Name="UnitMeasureCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ContactCreditCard_Contact_ContactID">
    <End Role="Contact" Type="AdventureWorks.Store.Contact" Multiplicity="1" />
    <End Role="ContactCreditCard" Type="AdventureWorks.Store.ContactCreditCard" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Contact">
        <PropertyRef Name="ContactID" />
      </Principal>
      <Dependent Role="ContactCreditCard">
        <PropertyRef Name="ContactID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ContactCreditCard_CreditCard_CreditCardID">
    <End Role="CreditCard" Type="AdventureWorks.Store.CreditCard" Multiplicity="1" />
    <End Role="ContactCreditCard" Type="AdventureWorks.Store.ContactCreditCard" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CreditCard">
        <PropertyRef Name="CreditCardID" />
      </Principal>
      <Dependent Role="ContactCreditCard">
        <PropertyRef Name="CreditCardID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CountryRegionCurrency_CountryRegion_CountryRegionCode">
    <End Role="CountryRegion" Type="AdventureWorks.Store.CountryRegion" Multiplicity="1" />
    <End Role="CountryRegionCurrency" Type="AdventureWorks.Store.CountryRegionCurrency" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CountryRegion">
        <PropertyRef Name="CountryRegionCode" />
      </Principal>
      <Dependent Role="CountryRegionCurrency">
        <PropertyRef Name="CountryRegionCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CountryRegionCurrency_Currency_CurrencyCode">
    <End Role="Currency" Type="AdventureWorks.Store.Currency" Multiplicity="1" />
    <End Role="CountryRegionCurrency" Type="AdventureWorks.Store.CountryRegionCurrency" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Currency">
        <PropertyRef Name="CurrencyCode" />
      </Principal>
      <Dependent Role="CountryRegionCurrency">
        <PropertyRef Name="CurrencyCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CurrencyRate_Currency_FromCurrencyCode">
    <End Role="Currency" Type="AdventureWorks.Store.Currency" Multiplicity="1" />
    <End Role="CurrencyRate" Type="AdventureWorks.Store.CurrencyRate" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Currency">
        <PropertyRef Name="CurrencyCode" />
      </Principal>
      <Dependent Role="CurrencyRate">
        <PropertyRef Name="FromCurrencyCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CurrencyRate_Currency_ToCurrencyCode">
    <End Role="Currency" Type="AdventureWorks.Store.Currency" Multiplicity="1" />
    <End Role="CurrencyRate" Type="AdventureWorks.Store.CurrencyRate" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Currency">
        <PropertyRef Name="CurrencyCode" />
      </Principal>
      <Dependent Role="CurrencyRate">
        <PropertyRef Name="ToCurrencyCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Customer_SalesTerritory_TerritoryID">
    <End Role="SalesTerritory" Type="AdventureWorks.Store.SalesTerritory" Multiplicity="0..1" />
    <End Role="Customer" Type="AdventureWorks.Store.Customer" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesTerritory">
        <PropertyRef Name="TerritoryID" />
      </Principal>
      <Dependent Role="Customer">
        <PropertyRef Name="TerritoryID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerAddress_Address_AddressID">
    <End Role="Address" Type="AdventureWorks.Store.Address" Multiplicity="1" />
    <End Role="CustomerAddress" Type="AdventureWorks.Store.CustomerAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Address">
        <PropertyRef Name="AddressID" />
      </Principal>
      <Dependent Role="CustomerAddress">
        <PropertyRef Name="AddressID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerAddress_AddressType_AddressTypeID">
    <End Role="AddressType" Type="AdventureWorks.Store.AddressType" Multiplicity="1" />
    <End Role="CustomerAddress" Type="AdventureWorks.Store.CustomerAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="AddressType">
        <PropertyRef Name="AddressTypeID" />
      </Principal>
      <Dependent Role="CustomerAddress">
        <PropertyRef Name="AddressTypeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerAddress_Customer_CustomerID">
    <End Role="Customer" Type="AdventureWorks.Store.Customer" Multiplicity="1" />
    <End Role="CustomerAddress" Type="AdventureWorks.Store.CustomerAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customer">
        <PropertyRef Name="CustomerID" />
      </Principal>
      <Dependent Role="CustomerAddress">
        <PropertyRef Name="CustomerID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Employee_Contact_ContactID">
    <End Role="Contact" Type="AdventureWorks.Store.Contact" Multiplicity="1" />
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Contact">
        <PropertyRef Name="ContactID" />
      </Principal>
      <Dependent Role="Employee">
        <PropertyRef Name="ContactID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Employee_Employee_ManagerID">
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="0..1" />
    <End Role="Employee1" Type="AdventureWorks.Store.Employee" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="Employee1">
        <PropertyRef Name="ManagerID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_EmployeeAddress_Address_AddressID">
    <End Role="Address" Type="AdventureWorks.Store.Address" Multiplicity="1" />
    <End Role="EmployeeAddress" Type="AdventureWorks.Store.EmployeeAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Address">
        <PropertyRef Name="AddressID" />
      </Principal>
      <Dependent Role="EmployeeAddress">
        <PropertyRef Name="AddressID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_EmployeeAddress_Employee_EmployeeID">
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="1" />
    <End Role="EmployeeAddress" Type="AdventureWorks.Store.EmployeeAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="EmployeeAddress">
        <PropertyRef Name="EmployeeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_EmployeeDepartmentHistory_Department_DepartmentID">
    <End Role="Department" Type="AdventureWorks.Store.Department" Multiplicity="1" />
    <End Role="EmployeeDepartmentHistory" Type="AdventureWorks.Store.EmployeeDepartmentHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Department">
        <PropertyRef Name="DepartmentID" />
      </Principal>
      <Dependent Role="EmployeeDepartmentHistory">
        <PropertyRef Name="DepartmentID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_EmployeeDepartmentHistory_Employee_EmployeeID">
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="1" />
    <End Role="EmployeeDepartmentHistory" Type="AdventureWorks.Store.EmployeeDepartmentHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="EmployeeDepartmentHistory">
        <PropertyRef Name="EmployeeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_EmployeeDepartmentHistory_Shift_ShiftID">
    <End Role="Shift" Type="AdventureWorks.Store.Shift" Multiplicity="1" />
    <End Role="EmployeeDepartmentHistory" Type="AdventureWorks.Store.EmployeeDepartmentHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Shift">
        <PropertyRef Name="ShiftID" />
      </Principal>
      <Dependent Role="EmployeeDepartmentHistory">
        <PropertyRef Name="ShiftID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_EmployeePayHistory_Employee_EmployeeID">
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="1" />
    <End Role="EmployeePayHistory" Type="AdventureWorks.Store.EmployeePayHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="EmployeePayHistory">
        <PropertyRef Name="EmployeeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Individual_Contact_ContactID">
    <End Role="Contact" Type="AdventureWorks.Store.Contact" Multiplicity="1" />
    <End Role="Individual" Type="AdventureWorks.Store.Individual" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Contact">
        <PropertyRef Name="ContactID" />
      </Principal>
      <Dependent Role="Individual">
        <PropertyRef Name="ContactID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Individual_Customer_CustomerID">
    <End Role="Customer" Type="AdventureWorks.Store.Customer" Multiplicity="1" />
    <End Role="Individual" Type="AdventureWorks.Store.Individual" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="Customer">
        <PropertyRef Name="CustomerID" />
      </Principal>
      <Dependent Role="Individual">
        <PropertyRef Name="CustomerID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_JobCandidate_Employee_EmployeeID">
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="0..1" />
    <End Role="JobCandidate" Type="AdventureWorks.Store.JobCandidate" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="JobCandidate">
        <PropertyRef Name="EmployeeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Product_ProductModel_ProductModelID">
    <End Role="ProductModel" Type="AdventureWorks.Store.ProductModel" Multiplicity="0..1" />
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ProductModel">
        <PropertyRef Name="ProductModelID" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="ProductModelID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Product_ProductSubcategory_ProductSubcategoryID">
    <End Role="ProductSubcategory" Type="AdventureWorks.Store.ProductSubcategory" Multiplicity="0..1" />
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ProductSubcategory">
        <PropertyRef Name="ProductSubcategoryID" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="ProductSubcategoryID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Product_UnitMeasure_SizeUnitMeasureCode">
    <End Role="UnitMeasure" Type="AdventureWorks.Store.UnitMeasure" Multiplicity="0..1" />
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="UnitMeasure">
        <PropertyRef Name="UnitMeasureCode" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="SizeUnitMeasureCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Product_UnitMeasure_WeightUnitMeasureCode">
    <End Role="UnitMeasure" Type="AdventureWorks.Store.UnitMeasure" Multiplicity="0..1" />
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="UnitMeasure">
        <PropertyRef Name="UnitMeasureCode" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="WeightUnitMeasureCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductCostHistory_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ProductCostHistory" Type="AdventureWorks.Store.ProductCostHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ProductCostHistory">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductDocument_Document_DocumentID">
    <End Role="Document" Type="AdventureWorks.Store.Document" Multiplicity="1" />
    <End Role="ProductDocument" Type="AdventureWorks.Store.ProductDocument" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Document">
        <PropertyRef Name="DocumentID" />
      </Principal>
      <Dependent Role="ProductDocument">
        <PropertyRef Name="DocumentID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductDocument_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ProductDocument" Type="AdventureWorks.Store.ProductDocument" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ProductDocument">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductInventory_Location_LocationID">
    <End Role="Location" Type="AdventureWorks.Store.Location" Multiplicity="1" />
    <End Role="ProductInventory" Type="AdventureWorks.Store.ProductInventory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Location">
        <PropertyRef Name="LocationID" />
      </Principal>
      <Dependent Role="ProductInventory">
        <PropertyRef Name="LocationID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductInventory_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ProductInventory" Type="AdventureWorks.Store.ProductInventory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ProductInventory">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductListPriceHistory_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ProductListPriceHistory" Type="AdventureWorks.Store.ProductListPriceHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ProductListPriceHistory">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductModelIllustration_Illustration_IllustrationID">
    <End Role="Illustration" Type="AdventureWorks.Store.Illustration" Multiplicity="1" />
    <End Role="ProductModelIllustration" Type="AdventureWorks.Store.ProductModelIllustration" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Illustration">
        <PropertyRef Name="IllustrationID" />
      </Principal>
      <Dependent Role="ProductModelIllustration">
        <PropertyRef Name="IllustrationID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductModelIllustration_ProductModel_ProductModelID">
    <End Role="ProductModel" Type="AdventureWorks.Store.ProductModel" Multiplicity="1" />
    <End Role="ProductModelIllustration" Type="AdventureWorks.Store.ProductModelIllustration" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ProductModel">
        <PropertyRef Name="ProductModelID" />
      </Principal>
      <Dependent Role="ProductModelIllustration">
        <PropertyRef Name="ProductModelID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductModelProductDescriptionCulture_Culture_CultureID">
    <End Role="Culture" Type="AdventureWorks.Store.Culture" Multiplicity="1" />
    <End Role="ProductModelProductDescriptionCulture" Type="AdventureWorks.Store.ProductModelProductDescriptionCulture" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Culture">
        <PropertyRef Name="CultureID" />
      </Principal>
      <Dependent Role="ProductModelProductDescriptionCulture">
        <PropertyRef Name="CultureID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductModelProductDescriptionCulture_ProductDescription_ProductDescriptionID">
    <End Role="ProductDescription" Type="AdventureWorks.Store.ProductDescription" Multiplicity="1" />
    <End Role="ProductModelProductDescriptionCulture" Type="AdventureWorks.Store.ProductModelProductDescriptionCulture" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ProductDescription">
        <PropertyRef Name="ProductDescriptionID" />
      </Principal>
      <Dependent Role="ProductModelProductDescriptionCulture">
        <PropertyRef Name="ProductDescriptionID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductModelProductDescriptionCulture_ProductModel_ProductModelID">
    <End Role="ProductModel" Type="AdventureWorks.Store.ProductModel" Multiplicity="1" />
    <End Role="ProductModelProductDescriptionCulture" Type="AdventureWorks.Store.ProductModelProductDescriptionCulture" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ProductModel">
        <PropertyRef Name="ProductModelID" />
      </Principal>
      <Dependent Role="ProductModelProductDescriptionCulture">
        <PropertyRef Name="ProductModelID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductProductPhoto_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ProductProductPhoto" Type="AdventureWorks.Store.ProductProductPhoto" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ProductProductPhoto">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductProductPhoto_ProductPhoto_ProductPhotoID">
    <End Role="ProductPhoto" Type="AdventureWorks.Store.ProductPhoto" Multiplicity="1" />
    <End Role="ProductProductPhoto" Type="AdventureWorks.Store.ProductProductPhoto" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ProductPhoto">
        <PropertyRef Name="ProductPhotoID" />
      </Principal>
      <Dependent Role="ProductProductPhoto">
        <PropertyRef Name="ProductPhotoID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductReview_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ProductReview" Type="AdventureWorks.Store.ProductReview" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ProductReview">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductSubcategory_ProductCategory_ProductCategoryID">
    <End Role="ProductCategory" Type="AdventureWorks.Store.ProductCategory" Multiplicity="1" />
    <End Role="ProductSubcategory" Type="AdventureWorks.Store.ProductSubcategory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ProductCategory">
        <PropertyRef Name="ProductCategoryID" />
      </Principal>
      <Dependent Role="ProductSubcategory">
        <PropertyRef Name="ProductCategoryID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductVendor_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ProductVendor" Type="AdventureWorks.Store.ProductVendor" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ProductVendor">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductVendor_UnitMeasure_UnitMeasureCode">
    <End Role="UnitMeasure" Type="AdventureWorks.Store.UnitMeasure" Multiplicity="1" />
    <End Role="ProductVendor" Type="AdventureWorks.Store.ProductVendor" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="UnitMeasure">
        <PropertyRef Name="UnitMeasureCode" />
      </Principal>
      <Dependent Role="ProductVendor">
        <PropertyRef Name="UnitMeasureCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ProductVendor_Vendor_VendorID">
    <End Role="Vendor" Type="AdventureWorks.Store.Vendor" Multiplicity="1" />
    <End Role="ProductVendor" Type="AdventureWorks.Store.ProductVendor" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Vendor">
        <PropertyRef Name="VendorID" />
      </Principal>
      <Dependent Role="ProductVendor">
        <PropertyRef Name="VendorID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_PurchaseOrderDetail_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="PurchaseOrderDetail" Type="AdventureWorks.Store.PurchaseOrderDetail" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="PurchaseOrderDetail">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_PurchaseOrderDetail_PurchaseOrderHeader_PurchaseOrderID">
    <End Role="PurchaseOrderHeader" Type="AdventureWorks.Store.PurchaseOrderHeader" Multiplicity="1" />
    <End Role="PurchaseOrderDetail" Type="AdventureWorks.Store.PurchaseOrderDetail" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="PurchaseOrderHeader">
        <PropertyRef Name="PurchaseOrderID" />
      </Principal>
      <Dependent Role="PurchaseOrderDetail">
        <PropertyRef Name="PurchaseOrderID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_PurchaseOrderHeader_Employee_EmployeeID">
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="1" />
    <End Role="PurchaseOrderHeader" Type="AdventureWorks.Store.PurchaseOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="PurchaseOrderHeader">
        <PropertyRef Name="EmployeeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_PurchaseOrderHeader_ShipMethod_ShipMethodID">
    <End Role="ShipMethod" Type="AdventureWorks.Store.ShipMethod" Multiplicity="1" />
    <End Role="PurchaseOrderHeader" Type="AdventureWorks.Store.PurchaseOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ShipMethod">
        <PropertyRef Name="ShipMethodID" />
      </Principal>
      <Dependent Role="PurchaseOrderHeader">
        <PropertyRef Name="ShipMethodID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_PurchaseOrderHeader_Vendor_VendorID">
    <End Role="Vendor" Type="AdventureWorks.Store.Vendor" Multiplicity="1" />
    <End Role="PurchaseOrderHeader" Type="AdventureWorks.Store.PurchaseOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Vendor">
        <PropertyRef Name="VendorID" />
      </Principal>
      <Dependent Role="PurchaseOrderHeader">
        <PropertyRef Name="VendorID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderDetail_SalesOrderHeader_SalesOrderID">
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="SalesOrderDetail" Type="AdventureWorks.Store.SalesOrderDetail" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesOrderHeader">
        <PropertyRef Name="SalesOrderID" />
      </Principal>
      <Dependent Role="SalesOrderDetail">
        <PropertyRef Name="SalesOrderID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID">
    <End Role="SpecialOfferProduct" Type="AdventureWorks.Store.SpecialOfferProduct" Multiplicity="1" />
    <End Role="SalesOrderDetail" Type="AdventureWorks.Store.SalesOrderDetail" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SpecialOfferProduct">
        <PropertyRef Name="SpecialOfferID" />
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="SalesOrderDetail">
        <PropertyRef Name="SpecialOfferID" />
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_Address_BillToAddressID">
    <End Role="Address" Type="AdventureWorks.Store.Address" Multiplicity="1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Address">
        <PropertyRef Name="AddressID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="BillToAddressID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_Address_ShipToAddressID">
    <End Role="Address" Type="AdventureWorks.Store.Address" Multiplicity="1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Address">
        <PropertyRef Name="AddressID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="ShipToAddressID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_Contact_ContactID">
    <End Role="Contact" Type="AdventureWorks.Store.Contact" Multiplicity="1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Contact">
        <PropertyRef Name="ContactID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="ContactID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_CreditCard_CreditCardID">
    <End Role="CreditCard" Type="AdventureWorks.Store.CreditCard" Multiplicity="0..1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CreditCard">
        <PropertyRef Name="CreditCardID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="CreditCardID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_CurrencyRate_CurrencyRateID">
    <End Role="CurrencyRate" Type="AdventureWorks.Store.CurrencyRate" Multiplicity="0..1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CurrencyRate">
        <PropertyRef Name="CurrencyRateID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="CurrencyRateID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_Customer_CustomerID">
    <End Role="Customer" Type="AdventureWorks.Store.Customer" Multiplicity="1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customer">
        <PropertyRef Name="CustomerID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="CustomerID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_SalesPerson_SalesPersonID">
    <End Role="SalesPerson" Type="AdventureWorks.Store.SalesPerson" Multiplicity="0..1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesPerson">
        <PropertyRef Name="SalesPersonID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="SalesPersonID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_SalesTerritory_TerritoryID">
    <End Role="SalesTerritory" Type="AdventureWorks.Store.SalesTerritory" Multiplicity="0..1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesTerritory">
        <PropertyRef Name="TerritoryID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="TerritoryID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeader_ShipMethod_ShipMethodID">
    <End Role="ShipMethod" Type="AdventureWorks.Store.ShipMethod" Multiplicity="1" />
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ShipMethod">
        <PropertyRef Name="ShipMethodID" />
      </Principal>
      <Dependent Role="SalesOrderHeader">
        <PropertyRef Name="ShipMethodID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeaderSalesReason_SalesOrderHeader_SalesOrderID">
    <End Role="SalesOrderHeader" Type="AdventureWorks.Store.SalesOrderHeader" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="SalesOrderHeaderSalesReason" Type="AdventureWorks.Store.SalesOrderHeaderSalesReason" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesOrderHeader">
        <PropertyRef Name="SalesOrderID" />
      </Principal>
      <Dependent Role="SalesOrderHeaderSalesReason">
        <PropertyRef Name="SalesOrderID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesOrderHeaderSalesReason_SalesReason_SalesReasonID">
    <End Role="SalesReason" Type="AdventureWorks.Store.SalesReason" Multiplicity="1" />
    <End Role="SalesOrderHeaderSalesReason" Type="AdventureWorks.Store.SalesOrderHeaderSalesReason" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesReason">
        <PropertyRef Name="SalesReasonID" />
      </Principal>
      <Dependent Role="SalesOrderHeaderSalesReason">
        <PropertyRef Name="SalesReasonID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesPerson_Employee_SalesPersonID">
    <End Role="Employee" Type="AdventureWorks.Store.Employee" Multiplicity="1" />
    <End Role="SalesPerson" Type="AdventureWorks.Store.SalesPerson" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="Employee">
        <PropertyRef Name="EmployeeID" />
      </Principal>
      <Dependent Role="SalesPerson">
        <PropertyRef Name="SalesPersonID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesPerson_SalesTerritory_TerritoryID">
    <End Role="SalesTerritory" Type="AdventureWorks.Store.SalesTerritory" Multiplicity="0..1" />
    <End Role="SalesPerson" Type="AdventureWorks.Store.SalesPerson" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesTerritory">
        <PropertyRef Name="TerritoryID" />
      </Principal>
      <Dependent Role="SalesPerson">
        <PropertyRef Name="TerritoryID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID">
    <End Role="SalesPerson" Type="AdventureWorks.Store.SalesPerson" Multiplicity="1" />
    <End Role="SalesPersonQuotaHistory" Type="AdventureWorks.Store.SalesPersonQuotaHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesPerson">
        <PropertyRef Name="SalesPersonID" />
      </Principal>
      <Dependent Role="SalesPersonQuotaHistory">
        <PropertyRef Name="SalesPersonID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesTaxRate_StateProvince_StateProvinceID">
    <End Role="StateProvince" Type="AdventureWorks.Store.StateProvince" Multiplicity="1" />
    <End Role="SalesTaxRate" Type="AdventureWorks.Store.SalesTaxRate" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="StateProvince">
        <PropertyRef Name="StateProvinceID" />
      </Principal>
      <Dependent Role="SalesTaxRate">
        <PropertyRef Name="StateProvinceID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesTerritoryHistory_SalesPerson_SalesPersonID">
    <End Role="SalesPerson" Type="AdventureWorks.Store.SalesPerson" Multiplicity="1" />
    <End Role="SalesTerritoryHistory" Type="AdventureWorks.Store.SalesTerritoryHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesPerson">
        <PropertyRef Name="SalesPersonID" />
      </Principal>
      <Dependent Role="SalesTerritoryHistory">
        <PropertyRef Name="SalesPersonID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SalesTerritoryHistory_SalesTerritory_TerritoryID">
    <End Role="SalesTerritory" Type="AdventureWorks.Store.SalesTerritory" Multiplicity="1" />
    <End Role="SalesTerritoryHistory" Type="AdventureWorks.Store.SalesTerritoryHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesTerritory">
        <PropertyRef Name="TerritoryID" />
      </Principal>
      <Dependent Role="SalesTerritoryHistory">
        <PropertyRef Name="TerritoryID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_ShoppingCartItem_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="ShoppingCartItem" Type="AdventureWorks.Store.ShoppingCartItem" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="ShoppingCartItem">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SpecialOfferProduct_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="SpecialOfferProduct" Type="AdventureWorks.Store.SpecialOfferProduct" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="SpecialOfferProduct">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID">
    <End Role="SpecialOffer" Type="AdventureWorks.Store.SpecialOffer" Multiplicity="1" />
    <End Role="SpecialOfferProduct" Type="AdventureWorks.Store.SpecialOfferProduct" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SpecialOffer">
        <PropertyRef Name="SpecialOfferID" />
      </Principal>
      <Dependent Role="SpecialOfferProduct">
        <PropertyRef Name="SpecialOfferID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_StateProvince_CountryRegion_CountryRegionCode">
    <End Role="CountryRegion" Type="AdventureWorks.Store.CountryRegion" Multiplicity="1" />
    <End Role="StateProvince" Type="AdventureWorks.Store.StateProvince" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CountryRegion">
        <PropertyRef Name="CountryRegionCode" />
      </Principal>
      <Dependent Role="StateProvince">
        <PropertyRef Name="CountryRegionCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_StateProvince_SalesTerritory_TerritoryID">
    <End Role="SalesTerritory" Type="AdventureWorks.Store.SalesTerritory" Multiplicity="1" />
    <End Role="StateProvince" Type="AdventureWorks.Store.StateProvince" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesTerritory">
        <PropertyRef Name="TerritoryID" />
      </Principal>
      <Dependent Role="StateProvince">
        <PropertyRef Name="TerritoryID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Store_Customer_CustomerID">
    <End Role="Customer" Type="AdventureWorks.Store.Customer" Multiplicity="1" />
    <End Role="Store" Type="AdventureWorks.Store.Store" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="Customer">
        <PropertyRef Name="CustomerID" />
      </Principal>
      <Dependent Role="Store">
        <PropertyRef Name="CustomerID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Store_SalesPerson_SalesPersonID">
    <End Role="SalesPerson" Type="AdventureWorks.Store.SalesPerson" Multiplicity="0..1" />
    <End Role="Store" Type="AdventureWorks.Store.Store" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="SalesPerson">
        <PropertyRef Name="SalesPersonID" />
      </Principal>
      <Dependent Role="Store">
        <PropertyRef Name="SalesPersonID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_StoreContact_Contact_ContactID">
    <End Role="Contact" Type="AdventureWorks.Store.Contact" Multiplicity="1" />
    <End Role="StoreContact" Type="AdventureWorks.Store.StoreContact" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Contact">
        <PropertyRef Name="ContactID" />
      </Principal>
      <Dependent Role="StoreContact">
        <PropertyRef Name="ContactID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_StoreContact_ContactType_ContactTypeID">
    <End Role="ContactType" Type="AdventureWorks.Store.ContactType" Multiplicity="1" />
    <End Role="StoreContact" Type="AdventureWorks.Store.StoreContact" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ContactType">
        <PropertyRef Name="ContactTypeID" />
      </Principal>
      <Dependent Role="StoreContact">
        <PropertyRef Name="ContactTypeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_StoreContact_Store_CustomerID">
    <End Role="Store" Type="AdventureWorks.Store.Store" Multiplicity="1" />
    <End Role="StoreContact" Type="AdventureWorks.Store.StoreContact" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Store">
        <PropertyRef Name="CustomerID" />
      </Principal>
      <Dependent Role="StoreContact">
        <PropertyRef Name="CustomerID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_TransactionHistory_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="TransactionHistory" Type="AdventureWorks.Store.TransactionHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="TransactionHistory">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_VendorAddress_Address_AddressID">
    <End Role="Address" Type="AdventureWorks.Store.Address" Multiplicity="1" />
    <End Role="VendorAddress" Type="AdventureWorks.Store.VendorAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Address">
        <PropertyRef Name="AddressID" />
      </Principal>
      <Dependent Role="VendorAddress">
        <PropertyRef Name="AddressID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_VendorAddress_AddressType_AddressTypeID">
    <End Role="AddressType" Type="AdventureWorks.Store.AddressType" Multiplicity="1" />
    <End Role="VendorAddress" Type="AdventureWorks.Store.VendorAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="AddressType">
        <PropertyRef Name="AddressTypeID" />
      </Principal>
      <Dependent Role="VendorAddress">
        <PropertyRef Name="AddressTypeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_VendorAddress_Vendor_VendorID">
    <End Role="Vendor" Type="AdventureWorks.Store.Vendor" Multiplicity="1" />
    <End Role="VendorAddress" Type="AdventureWorks.Store.VendorAddress" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Vendor">
        <PropertyRef Name="VendorID" />
      </Principal>
      <Dependent Role="VendorAddress">
        <PropertyRef Name="VendorID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_VendorContact_Contact_ContactID">
    <End Role="Contact" Type="AdventureWorks.Store.Contact" Multiplicity="1" />
    <End Role="VendorContact" Type="AdventureWorks.Store.VendorContact" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Contact">
        <PropertyRef Name="ContactID" />
      </Principal>
      <Dependent Role="VendorContact">
        <PropertyRef Name="ContactID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_VendorContact_ContactType_ContactTypeID">
    <End Role="ContactType" Type="AdventureWorks.Store.ContactType" Multiplicity="1" />
    <End Role="VendorContact" Type="AdventureWorks.Store.VendorContact" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ContactType">
        <PropertyRef Name="ContactTypeID" />
      </Principal>
      <Dependent Role="VendorContact">
        <PropertyRef Name="ContactTypeID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_VendorContact_Vendor_VendorID">
    <End Role="Vendor" Type="AdventureWorks.Store.Vendor" Multiplicity="1" />
    <End Role="VendorContact" Type="AdventureWorks.Store.VendorContact" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Vendor">
        <PropertyRef Name="VendorID" />
      </Principal>
      <Dependent Role="VendorContact">
        <PropertyRef Name="VendorID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkOrder_Product_ProductID">
    <End Role="Product" Type="AdventureWorks.Store.Product" Multiplicity="1" />
    <End Role="WorkOrder" Type="AdventureWorks.Store.WorkOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductID" />
      </Principal>
      <Dependent Role="WorkOrder">
        <PropertyRef Name="ProductID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkOrder_ScrapReason_ScrapReasonID">
    <End Role="ScrapReason" Type="AdventureWorks.Store.ScrapReason" Multiplicity="0..1" />
    <End Role="WorkOrder" Type="AdventureWorks.Store.WorkOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="ScrapReason">
        <PropertyRef Name="ScrapReasonID" />
      </Principal>
      <Dependent Role="WorkOrder">
        <PropertyRef Name="ScrapReasonID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkOrderRouting_Location_LocationID">
    <End Role="Location" Type="AdventureWorks.Store.Location" Multiplicity="1" />
    <End Role="WorkOrderRouting" Type="AdventureWorks.Store.WorkOrderRouting" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Location">
        <PropertyRef Name="LocationID" />
      </Principal>
      <Dependent Role="WorkOrderRouting">
        <PropertyRef Name="LocationID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkOrderRouting_WorkOrder_WorkOrderID">
    <End Role="WorkOrder" Type="AdventureWorks.Store.WorkOrder" Multiplicity="1" />
    <End Role="WorkOrderRouting" Type="AdventureWorks.Store.WorkOrderRouting" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="WorkOrder">
        <PropertyRef Name="WorkOrderID" />
      </Principal>
      <Dependent Role="WorkOrderRouting">
        <PropertyRef Name="WorkOrderID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Function Name="CreateSalesOrderDetail" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="SalesOrderID" Type="int" Mode="In" />
    <Parameter Name="CarrierTrackingNumber" Type="nvarchar" Mode="In" />
    <Parameter Name="OrderQty" Type="smallint" Mode="In" />
    <Parameter Name="ProductID" Type="int" Mode="In" />
    <Parameter Name="SpecialOfferID" Type="int" Mode="In" />
    <Parameter Name="UnitPrice" Type="money" Mode="In" />
    <Parameter Name="UnitPriceDiscount" Type="money" Mode="In" />
    <Parameter Name="rowguid" Type="uniqueidentifier" Mode="In" />
    <Parameter Name="ModifiedDate" Type="datetime" Mode="In" />
  </Function>
  <Function Name="DeleteSalesOrderDetail" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="SalesOrderDetailID" Type="int" Mode="In" />
    <Parameter Name="SalesOrderID" Type="int" Mode="In" />
  </Function>
  <Function Name="GetOrderDetails" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="SalesOrderHeaderId" Type="int" Mode="In" />
  </Function>
  <Function Name="ufnGetAccountingEndDate" ReturnType="datetime" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  <Function Name="ufnGetAccountingStartDate" ReturnType="datetime" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  <Function Name="ufnGetDocumentStatusText" ReturnType="nvarchar" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Status" Type="tinyint" Mode="In" />
  </Function>
  <Function Name="ufnGetProductDealerPrice" ReturnType="money" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="ProductID" Type="int" Mode="In" />
    <Parameter Name="OrderDate" Type="datetime" Mode="In" />
  </Function>
  <Function Name="ufnGetProductListPrice" ReturnType="money" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="ProductID" Type="int" Mode="In" />
    <Parameter Name="OrderDate" Type="datetime" Mode="In" />
  </Function>
  <Function Name="ufnGetProductStandardCost" ReturnType="money" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="ProductID" Type="int" Mode="In" />
    <Parameter Name="OrderDate" Type="datetime" Mode="In" />
  </Function>
  <Function Name="ufnGetPurchaseOrderStatusText" ReturnType="nvarchar" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Status" Type="tinyint" Mode="In" />
  </Function>
  <Function Name="ufnGetSalesOrderStatusText" ReturnType="nvarchar" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Status" Type="tinyint" Mode="In" />
  </Function>
  <Function Name="ufnGetStock" ReturnType="int" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="ProductID" Type="int" Mode="In" />
  </Function>
  <Function Name="ufnLeadingZeros" ReturnType="varchar" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Value" Type="int" Mode="In" />
  </Function>
  <Function Name="UpdateSalesOrderDetail" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="OrderQty" Type="smallint" Mode="In" />
    <Parameter Name="SalesOrderDetailID" Type="int" Mode="In" />
    <Parameter Name="SalesOrderID" Type="int" Mode="In" />
  </Function>
  <Function Name="uspGetBillOfMaterials" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="StartProductID" Type="int" Mode="In" />
    <Parameter Name="CheckDate" Type="datetime" Mode="In" />
  </Function>
  <Function Name="uspGetEmployeeManagers" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="EmployeeID" Type="int" Mode="In" />
  </Function>
  <Function Name="uspGetManagerEmployees" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="ManagerID" Type="int" Mode="In" />
  </Function>
  <Function Name="uspGetWhereUsedProductID" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="StartProductID" Type="int" Mode="In" />
    <Parameter Name="CheckDate" Type="datetime" Mode="In" />
  </Function>
  <Function Name="uspLogError" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="ErrorLogID" Type="int" Mode="InOut" />
  </Function>
  <Function Name="uspPrintError" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  <Function Name="uspUpdateEmployeeHireInfo" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="HumanResources">
    <Parameter Name="EmployeeID" Type="int" Mode="In" />
    <Parameter Name="Title" Type="nvarchar" Mode="In" />
    <Parameter Name="HireDate" Type="datetime" Mode="In" />
    <Parameter Name="RateChangeDate" Type="datetime" Mode="In" />
    <Parameter Name="Rate" Type="money" Mode="In" />
    <Parameter Name="PayFrequency" Type="tinyint" Mode="In" />
    <Parameter Name="CurrentFlag" Type="bit" Mode="In" />
  </Function>
  <Function Name="uspUpdateEmployeeLogin" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="HumanResources">
    <Parameter Name="EmployeeID" Type="int" Mode="In" />
    <Parameter Name="ManagerID" Type="int" Mode="In" />
    <Parameter Name="LoginID" Type="nvarchar" Mode="In" />
    <Parameter Name="Title" Type="nvarchar" Mode="In" />
    <Parameter Name="HireDate" Type="datetime" Mode="In" />
    <Parameter Name="CurrentFlag" Type="bit" Mode="In" />
  </Function>
  <Function Name="uspUpdateEmployeePersonalInfo" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="HumanResources">
    <Parameter Name="EmployeeID" Type="int" Mode="In" />
    <Parameter Name="NationalIDNumber" Type="nvarchar" Mode="In" />
    <Parameter Name="BirthDate" Type="datetime" Mode="In" />
    <Parameter Name="MaritalStatus" Type="nchar" Mode="In" />
    <Parameter Name="Gender" Type="nchar" Mode="In" />
  </Function>
</Schema>