You are on page 1of 1

AdventureWorks 2008 Data Warehouse Schema

Samples and Sample Databases at http://CodePlex.com/SqlServerSamples


Rev 10.00.0003

dbo

AdventureWorksDWBuildVersion

DatabaseLog PK

DimSalesReason SalesReasonKey SalesReasonAlternateKey SalesReasonName SalesReasonType

FactInternetSalesReason PK,FK2 PK,FK2 PK,FK1 SalesOrderNumber SalesOrderLineNumber SalesReasonKey FK2,I5 FK3,I4 FK4,I3 FK5,I7 FK1,I2 FK7 FK6 FK8

FactInternetSales SalesOrderNumber SalesOrderLineNumber ProductKey OrderDateKey DueDateKey ShipDateKey CustomerKey PromotionKey CurrencyKey SalesTerritoryKey RevisionNumber OrderQuantity UnitPrice ExtendedAmount UnitPriceDiscountPct DiscountAmount ProductStandardCost TotalProductCost SalesAmount TaxAmt Freight CarrierTrackingNumber CustomerPONumber FactSurveyResponse PK DimReseller PK FK1 U1 ResellerKey GeographyKey ResellerAlternateKey Phone BusinessType ResellerName NumberEmployees OrderFrequency OrderMonth FirstOrderYear LastOrderYear ProductLine AddressLine1 AddressLine2 AnnualSales BankName MinPaymentType MinPaymentAmount AnnualRevenue YearOpened DateKey CustomerKey ProductCategoryKey EnglishProductCategoryname ProductSubCategoryKey EnglishProductSubcategoryName SurveyResponseKey ProspectiveBuyer PK ProspectiveBuyerKey ProspectAlternateKey FirstName MiddleName LastName BirthDate MaritalStatus Gender EmailAddress YearlyIncome TotalChildren NumberChildrenAtHome Education Occupation HouseOwnerFlag NumberCarsOwned AddressLine1 AddressLine2 City StateProvinceCode PostalCode Phone Salutation Unknown PK FK1,I1 U1

DimCustomer CustomerKey GeographyKey CustomerAlternateKey Title FirstName MiddleName LastName NameStyle BirthDate MaritalStatus Suffix Gender EmailAddress YearlyIncome TotalChildren NumberChildrenAtHome EnglishEducation SpanishEducation FrenchEducation EnglishOccupation SpanishOccupation FrenchOccupation HouseOwnerFlag NumberCarsOwned AddressLine1 AddressLine2 Phone DateFirstPurchase CommuteDistance

DBVersion VersionDate

DatabaseLogID PostTime DatabaseUser Event Schema Object TSQL XmlEvent

DimAccount PK FK1 U1 AccountKey ParentAccountKey AccountCodeAlternateKey ParentAccountCodeAlternateKey AccountDescription AccountType Operator CustomMembers ValueType CustomMemberOptions

DimGeography PK GeographyKey City StateProvinceCode StateProvinceName CountryRegionCode EnglishCountryRegionName SpanishCountryRegionName FrenchCountryRegionName PostalCode SalesTerritoryKey

FK1 DimCurrency PK DimDepartmentGroup PK FK1 DepartmentGroupKey ParentDepartmentGroupKey DepartmentGroupName U1 CurrencyKey CurrencyAlternateKey CurrencyName PK U1 PK DimPromotion PromotionKey PromotionAlternateKey EnglishPromotionName SpanishPromotionName FrenchPromotionName DiscountPct EnglishPromotionType SpanishPromotionType FrenchPromotionType EnglishPromotionCategory SpanishPromotionCategory FrenchPromotionCategory StartDate EndDate MinQty MaxQty U1 FK1,I1 ProductAlternateKey ProductSubCategoryKey WeightUnitMeasureCode SizeUnitMeasureCode EnglishProductName SpanishProductName FrenchProductName StandardCost FinishedGoodsFlag Color SafetyStockLevel ReorderPoint ListPrice Size SizeRange Weight DaysToManufacture ProductLine DealerPrice Class Style ModelName LargePhoto EnglishDescription FrenchDescription ChineseDescription ArabicDescription HebrewDescription ThaiDescription GermanDescription JapaneseDescription TurkishDescription StartDate EndDate Status DimProduct ProductKey

DimEmployee PK FK1,I1 EmployeeKey ParentEmployeeKey EmployeeNationalIDAlternateKey ParentEmployeeNationalIDAlternateKey SalesTerritoryKey FirstName LastName MiddleName NameStyle Title HireDate BirthDate LoginID EmailAddress Phone MaritalStatus EmergencyContactName EmergencyContactPhone SalariedFlag Gender PayFrequency BaseRate VacationHours SickLeaveHours CurrentFlag SalesPersonFlag DepartmentName StartDate EndDate Status

FactCurrencyRate DimScenario PK ScenarioKey ScenarioName AverageRate EndOfDayRate FK1,I5 FK2,I4 FK3,I3 FK4,I7 FK8 FK6 FK5 FK7 DimDate PK U1 DateKey FullDateAlternateKey DayNumberOfWeek EnglishDayNameOfWeek SpanishDayNameOfWeek FrenchDayNameOfWeek DayNumberOfMonth DayNumberOfYear EnglishMonthName SpanishMonthName FrenchMonthName WeekNumberOfYear MonthNumberOfYear CalendarQuarter CalendarYear CalendarSemester FiscalQuarter FiscalYear FiscalSemester FK1 FK2 CurrencyKey DateKey FactResellerSales SalesOrderNumber SalesOrderLineNumber ProductKey OrderDateKey DueDateKey ShipDateKey ResellerKey PromotionKey CurrencyKey SalesTerritoryKey RevisionNumber OrderQuantity UnitPrice ExtendedAmount UnitPriceDiscountPct DiscountAmount ProductStandardCost TotalProductCost SalesAmount TaxAmt Freight CarrierTrackingNumber CustomerPONumber

FK2,I2

FactFinance PK FK5 FK3 FK2 FK4 FK1 FinanceKey DateKey OrganizationKey DepartmentGroupKey ScenarioKey AccountKey Amount

DimSalesTerritory PK U1 SalesTerritoryKey SalesTerritoryAlternateKey SalesTerritoryRegion SalesTerritoryCountry SalesTerritoryGroup GeographyKey

U1

FK1

DimOrganization PK FK1 OrganizationKey ParentOrganizationKey PercentageOfOwnership OrganizationName CurrencyKey

DimProductSubcategory PK U1 ProductSubCategoryKey ProductSubCategoryAlternateKey EnglishProductSubCategoryName SpanishProductSubCategoryName FrenchProductSubCategoryName ProductCategoryKey PK U1

DimProductCategory ProductCategoryKey ProductCategoryAlternateKey EnglishProductCategoryName SpanishProductCategoryName FrenchProductCategoryName PK FK1,I1 FK2,I2 FactSalesQuota SalesQuotaKey EmployeeKey DateKey CalendarYear CalendarQuarter SalesAmountQuota

FK1

You might also like