Upload
lamhanh
View
215
Download
0
Embed Size (px)
Citation preview
Table of Contents
1. Dimensions ...................................................................................................................................................................................................................................... 5
1.1. Tables ........................................................................................................................................................................................................................................... 5
1.1.1. Table: dbo.DimAccount ................................................................................................................................................................................................... 5
1.1.2. Table: dbo.DimCurrency ................................................................................................................................................................................................. 6
1.1.3. Table: dbo.DimCustomer ................................................................................................................................................................................................6
1.1.4. Table: dbo.DimDate ......................................................................................................................................................................................................... 8
1.1.5. Table: dbo.DimDepartmentGroup .............................................................................................................................................................................. 10
1.1.6. Table: dbo.DimEmployee ...............................................................................................................................................................................................11
1.1.7. Table: dbo.DimGeography ........................................................................................................................................................................................... 12
1.1.8. Table: dbo.DimOrganization ........................................................................................................................................................................................ 13
1.1.9. Table: dbo.DimProduct ................................................................................................................................................................................................. 14
1.1.10. Table: dbo.DimProductCategory ............................................................................................................................................................................... 16
1.1.11. Table: dbo.DimProductSubcategory ......................................................................................................................................................................... 17
1.1.12. Table: dbo.DimPromotion ........................................................................................................................................................................................... 18
1.1.13. Table: dbo.DimReseller ................................................................................................................................................................................................ 19
1.1.14. Table: dbo.DimSalesReason ....................................................................................................................................................................................... 20
1.1.15. Table: dbo.DimSalesTerritory ..................................................................................................................................................................................... 21
1.1.16. Table: dbo.DimScenario .............................................................................................................................................................................................. 22
2. Finance .......................................................................................................................................................................................................................................... 23
2.1. Tables ........................................................................................................................................................................................................................................23
2.1.1. Table: dbo.FactFinance ................................................................................................................................................................................................. 23
3. Call Center .................................................................................................................................................................................................................................... 25
3.1. Tables ........................................................................................................................................................................................................................................25
3.1.1. Table: dbo.FactCallCenter ............................................................................................................................................................................................ 25
4. Inventory ....................................................................................................................................................................................................................................... 27
4.1. Tables ........................................................................................................................................................................................................................................ 27
4.1.1. Table: dbo.FactProductInventory ............................................................................................................................................................................... 27
5. Internet Sales ................................................................................................................................................................................................................................29
5.1. Tables ........................................................................................................................................................................................................................................29
5.1.1. Table: dbo.FactInternetSales ........................................................................................................................................................................................29
5.1.2. Table: dbo.FactInternetSalesReason .......................................................................................................................................................................... 31
6. Sales Quotas ................................................................................................................................................................................................................................ 33
6.1. Tables ........................................................................................................................................................................................................................................33
6.1.1. Table: dbo.FactSalesQuota .......................................................................................................................................................................................... 33
7. Surveys .......................................................................................................................................................................................................................................... 34
7.1. Tables ........................................................................................................................................................................................................................................34
7.1.1. Table: dbo.FactSurveyResponse ................................................................................................................................................................................. 34
8. Currency Rates .............................................................................................................................................................................................................................35
8.1. Tables ........................................................................................................................................................................................................................................35
8.1.1. Table: dbo.FactCurrencyRate ...................................................................................................................................................................................... 35
9. Reseller Sales ................................................................................................................................................................................................................................36
9.1. Tables ........................................................................................................................................................................................................................................36
9.1.1. Table: dbo.FactResellerSales ........................................................................................................................................................................................ 36
10. Product Descriptions ................................................................................................................................................................................................................ 39
10.1. Tables ...................................................................................................................................................................................................................................... 39
10.1.1. Table: dbo.FactAdditionalInternationalProductDescription ............................................................................................................................... 39
Legend
Primary key
Primary key disabled
User-defined primary key
Unique key
Unique key disabled
User-defined unique key
Active trigger
Disabled trigger
Primary key relation
User-defined primary key relation
Foreign key relation
User-defined foreign key relation
Input
Output
Input/Output
Nullable
4
1. Dimensions
1.1. Tables
1.1.1. Table: dbo.DimAccount
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintAccountKey
intParentAccountKey
intAccountCodeAlternateKey
intParentAccountCodeAlternateKey
nvarchar(50)AccountDescription
nvarchar(50)AccountType
nvarchar(50)Operator
nvarchar(300)CustomMembers
nvarchar(50)ValueType
nvarchar(200)CustomMemberOptions
Links to
Title / Name / DescriptionJoinTable
FK_DimAccount_DimAccountdbo.DimAccount.ParentAccountKey =
dbo.DimAccount.AccountKeydbo.DimAccount
Linked from
Title / Name / DescriptionJoinTable
FK_DimAccount_DimAccountdbo.DimAccount.AccountKey =
dbo.DimAccount.ParentAccountKeydbo.DimAccount
FK_FactFinance_DimAccountdbo.DimAccount.AccountKey =
dbo.FactFinance.AccountKeydbo.FactFinance
Unique keys
Name / DescriptionColumns
PK_DimAccount
Table Primary Key / IDAccountKey
AK_DimAccount_AccountCodeAlternateKey
Business KeyAccountCodeAlternateKey
Uses
Name
dbo.DimAccount
dbo.DimAccount
5
Used by
Name
dbo.DimAccount
dbo.DimAccount
dbo.FactFinance
1.1.2. Table: dbo.DimCurrency
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintCurrencyKey
nchar(3)CurrencyAlternateKey
nvarchar(50)CurrencyName
Linked from
Title / Name / DescriptionJoinTable
FK_DimOrganization_DimCurrencydbo.DimCurrency.CurrencyKey =
dbo.DimOrganization.CurrencyKeydbo.DimOrganization
FK_FactCurrencyRate_DimCurrencydbo.DimCurrency.CurrencyKey =
dbo.FactCurrencyRate.CurrencyKeydbo.FactCurrencyRate
FK_FactInternetSales_DimCurrencydbo.DimCurrency.CurrencyKey =
dbo.FactInternetSales.CurrencyKeydbo.FactInternetSales
FK_FactResellerSales_DimCurrencydbo.DimCurrency.CurrencyKey =
dbo.FactResellerSales.CurrencyKeydbo.FactResellerSales
Unique keys
Name / DescriptionColumns
PK_DimCurrency_CurrencyKey
Table Primary Key / IDCurrencyKey
AK_DimCurrency_CurrencyAlternateKey
Business KeyCurrencyAlternateKey
Used by
Name
dbo.DimCurrency
dbo.DimOrganization
dbo.FactCurrencyRate
dbo.FactInternetSales
dbo.FactResellerSales
1.1.3. Table: dbo.DimCustomer
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintCustomerKey
6
Description / AttributesNData typeName
intGeographyKey
nvarchar(15)CustomerAlternateKey
nvarchar(8)Title
nvarchar(50)FirstName
nvarchar(50)MiddleName
nvarchar(50)LastName
bitNameStyle
dateBirthDate
nchar(1)MaritalStatus
nvarchar(10)Suffix
nvarchar(1)Gender
nvarchar(50)EmailAddress
moneyYearlyIncome
tinyintTotalChildren
tinyintNumberChildrenAtHome
nvarchar(40)EnglishEducation
nvarchar(40)SpanishEducation
nvarchar(40)FrenchEducation
nvarchar(100)EnglishOccupation
nvarchar(100)SpanishOccupation
nvarchar(100)FrenchOccupation
nchar(1)HouseOwnerFlag
tinyintNumberCarsOwned
nvarchar(120)AddressLine1
nvarchar(120)AddressLine2
nvarchar(20)Phone
dateDateFirstPurchase
nvarchar(15)CommuteDistance
Links to
Title / Name / DescriptionJoinTable
FK_DimCustomer_DimGeographydbo.DimCustomer.GeographyKey =
dbo.DimGeography.GeographyKeydbo.DimGeography
Linked from
Title / Name / DescriptionJoinTable
FK_FactInternetSales_DimCustomerdbo.DimCustomer.CustomerKey =
dbo.FactInternetSales.CustomerKeydbo.FactInternetSales
FK_FactSurveyResponse_CustomerKey
dbo.DimCustomer.CustomerKey =
dbo.FactSurveyResponse.CustomerKe
y
dbo.FactSurveyResponse
7
Unique keys
Name / DescriptionColumns
PK_DimCustomer_CustomerKey
Table Primary Key / IDCustomerKey
IX_DimCustomer_CustomerAlternateKey
Business KeyCustomerAlternateKey
Uses
Name
dbo.DimCustomer
dbo.DimGeography
Used by
Name
dbo.DimCustomer
dbo.vDMPrep
dbo.vTargetMail
dbo.FactInternetSales
dbo.FactSurveyResponse
1.1.4. Table: dbo.DimDate
Columns
Description / AttributesNData typeName
intDateKey
dateFullDateAlternateKey
tinyintDayNumberOfWeek
nvarchar(10)EnglishDayNameOfWeek
nvarchar(10)SpanishDayNameOfWeek
nvarchar(10)FrenchDayNameOfWeek
tinyintDayNumberOfMonth
smallintDayNumberOfYear
tinyintWeekNumberOfYear
nvarchar(10)EnglishMonthName
nvarchar(10)SpanishMonthName
nvarchar(10)FrenchMonthName
tinyintMonthNumberOfYear
tinyintCalendarQuarter
smallintCalendarYear
tinyintCalendarSemester
tinyintFiscalQuarter
smallintFiscalYear
8
Description / AttributesNData typeName
tinyintFiscalSemester
Linked from
Title / Name / DescriptionJoinTable
FK_FactCallCenter_DimDatedbo.DimDate.DateKey =
dbo.FactCallCenter.DateKeydbo.FactCallCenter
FK_FactCurrencyRate_DimDatedbo.DimDate.DateKey =
dbo.FactCurrencyRate.DateKeydbo.FactCurrencyRate
FK_FactFinance_DimDatedbo.DimDate.DateKey =
dbo.FactFinance.DateKeydbo.FactFinance
Order Data
FK_FactInternetSales_DimDate
dbo.DimDate.DateKey =
dbo.FactInternetSales.OrderDateKeydbo.FactInternetSales
Due Date
FK_FactInternetSales_DimDate1
dbo.DimDate.DateKey =
dbo.FactInternetSales.DueDateKeydbo.FactInternetSales
Ship Date
FK_FactInternetSales_DimDate2
dbo.DimDate.DateKey =
dbo.FactInternetSales.ShipDateKeydbo.FactInternetSales
FK_FactProductInventory_DimDatedbo.DimDate.DateKey =
dbo.FactProductInventory.DateKeydbo.FactProductInventory
Order Date
FK_FactResellerSales_DimDate
dbo.DimDate.DateKey =
dbo.FactResellerSales.OrderDateKeydbo.FactResellerSales
Due Date
FK_FactResellerSales_DimDate1
dbo.DimDate.DateKey =
dbo.FactResellerSales.DueDateKeydbo.FactResellerSales
Ship Date
FK_FactResellerSales_DimDate2
dbo.DimDate.DateKey =
dbo.FactResellerSales.ShipDateKeydbo.FactResellerSales
FK_FactSalesQuota_DimDatedbo.DimDate.DateKey =
dbo.FactSalesQuota.DateKeydbo.FactSalesQuota
FK_FactSurveyResponse_DateKeydbo.DimDate.DateKey =
dbo.FactSurveyResponse.DateKeydbo.FactSurveyResponse
Unique keys
Name / DescriptionColumns
PK_DimDate_DateKey
Table Primary Key / IDDateKey
AK_DimDate_FullDateAlternateKey
Business KeyFullDateAlternateKey
Used by
Name
dbo.DimDate
dbo.vDMPrep
dbo.FactCallCenter
dbo.FactCurrencyRate
dbo.FactFinance
dbo.FactInternetSales (Due Date)
dbo.FactInternetSales (Order Data)
dbo.FactInternetSales (Ship Date)
9
Name
dbo.FactProductInventory
dbo.FactResellerSales (Due Date)
dbo.FactResellerSales (Order Date)
dbo.FactResellerSales (Ship Date)
dbo.FactSalesQuota
dbo.FactSurveyResponse
1.1.5. Table: dbo.DimDepartmentGroup
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintDepartmentGroupKey
intParentDepartmentGroupKey
nvarchar(50)DepartmentGroupName
Links to
Title / Name / DescriptionJoinTable
FK_DimDepartmentGroup_DimDepartmentGroup
dbo.DimDepartmentGroup.ParentDep
artmentGroupKey =
dbo.DimDepartmentGroup.Departme
ntGroupKey
dbo.DimDepartmentGroup
Linked from
Title / Name / DescriptionJoinTable
FK_DimDepartmentGroup_DimDepartmentGroup
dbo.DimDepartmentGroup.Departme
ntGroupKey =
dbo.DimDepartmentGroup.ParentDep
artmentGroupKey
dbo.DimDepartmentGroup
FK_FactFinance_DimDepartmentGroup
dbo.DimDepartmentGroup.Departme
ntGroupKey =
dbo.FactFinance.DepartmentGroupKe
y
dbo.FactFinance
Unique keys
Name / DescriptionColumns
PK_DimDepartmentGroup
Table Primary Key / IDDepartmentGroupKey
Uses
Name
dbo.DimDepartmentGroup
dbo.DimDepartmentGroup
Used by
Name
dbo.DimDepartmentGroup
10
Name
dbo.DimDepartmentGroup
dbo.FactFinance
1.1.6. Table: dbo.DimEmployee
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintEmployeeKey
intParentEmployeeKey
nvarchar(15)EmployeeNationalIDAlternateKey
nvarchar(15)ParentEmployeeNationalIDAlternat
eKey
intSalesTerritoryKey
nvarchar(50)FirstName
nvarchar(50)LastName
nvarchar(50)MiddleName
bitNameStyle
nvarchar(50)Title
dateHireDate
dateBirthDate
nvarchar(256)LoginID
nvarchar(50)EmailAddress
nvarchar(25)Phone
nchar(1)MaritalStatus
nvarchar(50)EmergencyContactName
nvarchar(25)EmergencyContactPhone
bitSalariedFlag
nchar(1)Gender
tinyintPayFrequency
moneyBaseRate
smallintVacationHours
smallintSickLeaveHours
bitCurrentFlag
bitSalesPersonFlag
nvarchar(50)DepartmentName
dateStartDate
dateEndDate
nvarchar(50)Status
varbinary(MAX)EmployeePhoto
11
Links to
Title / Name / DescriptionJoinTable
FK_DimEmployee_DimEmployeedbo.DimEmployee.ParentEmployeeKe
y = dbo.DimEmployee.EmployeeKeydbo.DimEmployee
FK_DimEmployee_DimSalesTerritory
dbo.DimEmployee.SalesTerritoryKey =
dbo.DimSalesTerritory.SalesTerritoryKe
y
dbo.DimSalesTerritory
Linked from
Title / Name / DescriptionJoinTable
FK_DimEmployee_DimEmployee
dbo.DimEmployee.EmployeeKey =
dbo.DimEmployee.ParentEmployeeKe
y
dbo.DimEmployee
FK_FactResellerSales_DimEmployeedbo.DimEmployee.EmployeeKey =
dbo.FactResellerSales.EmployeeKeydbo.FactResellerSales
FK_FactSalesQuota_DimEmployeedbo.DimEmployee.EmployeeKey =
dbo.FactSalesQuota.EmployeeKeydbo.FactSalesQuota
Unique keys
Name / DescriptionColumns
PK_DimEmployee_EmployeeKey
Table Primary Key / IDEmployeeKey
Uses
Name
dbo.DimEmployee
dbo.DimEmployee
dbo.DimSalesTerritory
Used by
Name
dbo.DimEmployee
dbo.DimEmployee
dbo.FactResellerSales
dbo.FactSalesQuota
1.1.7. Table: dbo.DimGeography
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintGeographyKey
nvarchar(30)City
nvarchar(3)StateProvinceCode
nvarchar(50)StateProvinceName
nvarchar(3)CountryRegionCode
nvarchar(50)EnglishCountryRegionName
12
Description / AttributesNData typeName
nvarchar(50)SpanishCountryRegionName
nvarchar(50)FrenchCountryRegionName
nvarchar(15)PostalCode
intSalesTerritoryKey
nvarchar(15)IpAddressLocator
Links to
Title / Name / DescriptionJoinTable
FK_DimGeography_DimSalesTerritory
dbo.DimGeography.SalesTerritoryKey
=
dbo.DimSalesTerritory.SalesTerritoryKe
y
dbo.DimSalesTerritory
Linked from
Title / Name / DescriptionJoinTable
FK_DimCustomer_DimGeographydbo.DimGeography.GeographyKey =
dbo.DimCustomer.GeographyKeydbo.DimCustomer
FK_DimReseller_DimGeographydbo.DimGeography.GeographyKey =
dbo.DimReseller.GeographyKeydbo.DimReseller
Unique keys
Name / DescriptionColumns
PK_DimGeography_GeographyKey
Table Primary Key / IDGeographyKey
Uses
Name
dbo.DimGeography
dbo.DimSalesTerritory
Used by
Name
dbo.DimGeography
dbo.vDMPrep
dbo.DimCustomer
dbo.DimReseller
1.1.8. Table: dbo.DimOrganization
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintOrganizationKey
intParentOrganizationKey
nvarchar(16)PercentageOfOwnership
nvarchar(50)OrganizationName
13
Description / AttributesNData typeName
intCurrencyKey
Links to
Title / Name / DescriptionJoinTable
FK_DimOrganization_DimCurrencydbo.DimOrganization.CurrencyKey =
dbo.DimCurrency.CurrencyKeydbo.DimCurrency
FK_DimOrganization_DimOrganization
dbo.DimOrganization.ParentOrganizat
ionKey =
dbo.DimOrganization.OrganizationKe
y
dbo.DimOrganization
Linked from
Title / Name / DescriptionJoinTable
FK_DimOrganization_DimOrganization
dbo.DimOrganization.OrganizationKe
y =
dbo.DimOrganization.ParentOrganizat
ionKey
dbo.DimOrganization
FK_FactFinance_DimOrganizationdbo.DimOrganization.OrganizationKe
y = dbo.FactFinance.OrganizationKeydbo.FactFinance
Unique keys
Name / DescriptionColumns
PK_DimOrganization
Table Primary Key / IDOrganizationKey
Uses
Name
dbo.DimOrganization
dbo.DimCurrency
dbo.DimOrganization
Used by
Name
dbo.DimOrganization
dbo.DimOrganization
dbo.FactFinance
1.1.9. Table: dbo.DimProduct
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintProductKey
nvarchar(25)ProductAlternateKey
intProductSubcategoryKey
nchar(3)WeightUnitMeasureCode
nchar(3)SizeUnitMeasureCode
14
Description / AttributesNData typeName
nvarchar(50)EnglishProductName
nvarchar(50)SpanishProductName
nvarchar(50)FrenchProductName
moneyStandardCost
bitFinishedGoodsFlag
nvarchar(15)Color
smallintSafetyStockLevel
smallintReorderPoint
moneyListPrice
nvarchar(50)Size
nvarchar(50)SizeRange
floatWeight
intDaysToManufacture
nchar(2)ProductLine
moneyDealerPrice
nchar(2)Class
nchar(2)Style
nvarchar(50)ModelName
varbinary(MAX)LargePhoto
nvarchar(400)EnglishDescription
nvarchar(400)FrenchDescription
nvarchar(400)ChineseDescription
nvarchar(400)ArabicDescription
nvarchar(400)HebrewDescription
nvarchar(400)ThaiDescription
nvarchar(400)GermanDescription
nvarchar(400)JapaneseDescription
nvarchar(400)TurkishDescription
datetimeStartDate
datetimeEndDate
nvarchar(7)Status
Links to
Title / Name / DescriptionJoinTable
FK_DimProduct_DimProductSubcategory
dbo.DimProduct.ProductSubcategory
Key =
dbo.DimProductSubcategory.ProductS
ubcategoryKey
dbo.DimProductSubcategory
15
Linked from
Title / Name / DescriptionJoinTable
User-defined relation
dbo.DimProduct.ProductKey =
dbo.FactAdditionalInternationalProduc
tDescription.ProductKey
dbo.FactAdditionalInternationalPro
ductDescription
FK_FactInternetSales_DimProductdbo.DimProduct.ProductKey =
dbo.FactInternetSales.ProductKeydbo.FactInternetSales
FK_FactProductInventory_DimProductdbo.DimProduct.ProductKey =
dbo.FactProductInventory.ProductKeydbo.FactProductInventory
FK_FactResellerSales_DimProductdbo.DimProduct.ProductKey =
dbo.FactResellerSales.ProductKeydbo.FactResellerSales
Unique keys
Name / DescriptionColumns
PK_DimProduct_ProductKey
Table Primary Key / IDProductKey
AK_DimProduct_ProductAlternateKey_StartDate
Business KeyProductAlternateKey, StartDate
Uses
Name
dbo.DimProduct
dbo.DimProductSubcategory
Used by
Name
dbo.DimProduct
dbo.vDMPrep
dbo.FactAdditionalInternationalProductDescription
dbo.FactInternetSales
dbo.FactProductInventory
dbo.FactResellerSales
1.1.10. Table: dbo.DimProductCategory
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintProductCategoryKey
intProductCategoryAlternateKey
nvarchar(50)EnglishProductCategoryName
nvarchar(50)SpanishProductCategoryName
nvarchar(50)FrenchProductCategoryName
16
Linked from
Title / Name / DescriptionJoinTable
FK_DimProductSubcategory_DimProductCategory
dbo.DimProductCategory.ProductCat
egoryKey =
dbo.DimProductSubcategory.Product
CategoryKey
dbo.DimProductSubcategory
Unique keys
Name / DescriptionColumns
PK_DimProductCategory_ProductCategoryKey
Table Primary Key / IDProductCategoryKey
AK_DimProductCategory_ProductCategoryAlternateKey
Business KeyProductCategoryAlternateKey
Used by
Name
dbo.DimProductCategory
dbo.vDMPrep
dbo.DimProductSubcategory
1.1.11. Table: dbo.DimProductSubcategory
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintProductSubcategoryKey
intProductSubcategoryAlternateKey
nvarchar(50)EnglishProductSubcategoryName
nvarchar(50)SpanishProductSubcategoryName
nvarchar(50)FrenchProductSubcategoryName
intProductCategoryKey
Links to
Title / Name / DescriptionJoinTable
FK_DimProductSubcategory_DimProductCategory
dbo.DimProductSubcategory.Product
CategoryKey =
dbo.DimProductCategory.ProductCate
goryKey
dbo.DimProductCategory
Linked from
Title / Name / DescriptionJoinTable
FK_DimProduct_DimProductSubcategory
dbo.DimProductSubcategory.Product
SubcategoryKey =
dbo.DimProduct.ProductSubcategory
Key
dbo.DimProduct
17
Unique keys
Name / DescriptionColumns
PK_DimProductSubcategory_ProductSubcategoryKey
Table Primary Key / IDProductSubcategoryKey
AK_DimProductSubcategory_ProductSubcategoryAlternateKey
Business KeyProductSubcategoryAlternateKey
Uses
Name
dbo.DimProductSubcategory
dbo.DimProductCategory
Used by
Name
dbo.DimProductSubcategory
dbo.vDMPrep
dbo.DimProduct
1.1.12. Table: dbo.DimPromotion
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintPromotionKey
intPromotionAlternateKey
nvarchar(255)EnglishPromotionName
nvarchar(255)SpanishPromotionName
nvarchar(255)FrenchPromotionName
floatDiscountPct
nvarchar(50)EnglishPromotionType
nvarchar(50)SpanishPromotionType
nvarchar(50)FrenchPromotionType
nvarchar(50)EnglishPromotionCategory
nvarchar(50)SpanishPromotionCategory
nvarchar(50)FrenchPromotionCategory
datetimeStartDate
datetimeEndDate
intMinQty
intMaxQty
Linked from
Title / Name / DescriptionJoinTable
FK_FactInternetSales_DimPromotiondbo.DimPromotion.PromotionKey =
dbo.FactInternetSales.PromotionKeydbo.FactInternetSales
18
Title / Name / DescriptionJoinTable
FK_FactResellerSales_DimPromotiondbo.DimPromotion.PromotionKey =
dbo.FactResellerSales.PromotionKeydbo.FactResellerSales
Unique keys
Name / DescriptionColumns
PK_DimPromotion_PromotionKey
Table Primary Key / IDPromotionKey
AK_DimPromotion_PromotionAlternateKey
Business KeyPromotionAlternateKey
Used by
Name
dbo.DimPromotion
dbo.FactInternetSales
dbo.FactResellerSales
1.1.13. Table: dbo.DimReseller
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintResellerKey
intGeographyKey
nvarchar(15)ResellerAlternateKey
nvarchar(25)Phone
varchar(20)BusinessType
nvarchar(50)ResellerName
intNumberEmployees
char(1)OrderFrequency
tinyintOrderMonth
intFirstOrderYear
intLastOrderYear
nvarchar(50)ProductLine
nvarchar(60)AddressLine1
nvarchar(60)AddressLine2
moneyAnnualSales
nvarchar(50)BankName
tinyintMinPaymentType
moneyMinPaymentAmount
moneyAnnualRevenue
intYearOpened
19
Links to
Title / Name / DescriptionJoinTable
FK_DimReseller_DimGeographydbo.DimReseller.GeographyKey =
dbo.DimGeography.GeographyKeydbo.DimGeography
Linked from
Title / Name / DescriptionJoinTable
FK_FactResellerSales_DimResellerdbo.DimReseller.ResellerKey =
dbo.FactResellerSales.ResellerKeydbo.FactResellerSales
Unique keys
Name / DescriptionColumns
PK_DimReseller_ResellerKey
Table Primary Key / IDResellerKey
AK_DimReseller_ResellerAlternateKey
Business KeyResellerAlternateKey
Uses
Name
dbo.DimReseller
dbo.DimGeography
Used by
Name
dbo.DimReseller
dbo.FactResellerSales
1.1.14. Table: dbo.DimSalesReason
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintSalesReasonKey
intSalesReasonAlternateKey
nvarchar(50)SalesReasonName
nvarchar(50)SalesReasonReasonType
Linked from
Title / Name / DescriptionJoinTable
FK_FactInternetSalesReason_DimSalesReason
dbo.DimSalesReason.SalesReasonKey
=
dbo.FactInternetSalesReason.SalesRea
sonKey
dbo.FactInternetSalesReason
Unique keys
Name / DescriptionColumns
PK_DimSalesReason_SalesReasonKey
Table Primary Key / IDSalesReasonKey
20
Used by
Name
dbo.DimSalesReason
dbo.FactInternetSalesReason
1.1.15. Table: dbo.DimSalesTerritory
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintSalesTerritoryKey
intSalesTerritoryAlternateKey
nvarchar(50)SalesTerritoryRegion
nvarchar(50)SalesTerritoryCountry
nvarchar(50)SalesTerritoryGroup
varbinary(MAX)SalesTerritoryImage
Linked from
Title / Name / DescriptionJoinTable
FK_DimEmployee_DimSalesTerritory
dbo.DimSalesTerritory.SalesTerritoryKe
y =
dbo.DimEmployee.SalesTerritoryKey
dbo.DimEmployee
FK_DimGeography_DimSalesTerritory
dbo.DimSalesTerritory.SalesTerritoryKe
y =
dbo.DimGeography.SalesTerritoryKey
dbo.DimGeography
FK_FactInternetSales_DimSalesTerritory
dbo.DimSalesTerritory.SalesTerritoryKe
y =
dbo.FactInternetSales.SalesTerritoryKe
y
dbo.FactInternetSales
FK_FactResellerSales_DimSalesTerritory
dbo.DimSalesTerritory.SalesTerritoryKe
y =
dbo.FactResellerSales.SalesTerritoryKe
y
dbo.FactResellerSales
Unique keys
Name / DescriptionColumns
PK_DimSalesTerritory_SalesTerritoryKey
Table Primary Key / IDSalesTerritoryKey
AK_DimSalesTerritory_SalesTerritoryAlternateKey
Business KeySalesTerritoryAlternateKey
Used by
Name
dbo.DimSalesTerritory
dbo.vDMPrep
dbo.DimEmployee
dbo.DimGeography
dbo.FactInternetSales
21
Name
dbo.FactResellerSales
1.1.16. Table: dbo.DimScenario
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintScenarioKey
nvarchar(50)ScenarioName
Linked from
Title / Name / DescriptionJoinTable
FK_FactFinance_DimScenariodbo.DimScenario.ScenarioKey =
dbo.FactFinance.ScenarioKeydbo.FactFinance
Unique keys
Name / DescriptionColumns
PK_DimScenario
Table Primary Key / IDScenarioKey
Used by
Name
dbo.DimScenario
dbo.FactFinance
22
2. Finance
2.1. Tables
2.1.1. Table: dbo.FactFinance
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintFinanceKey
intDateKey
intOrganizationKey
intDepartmentGroupKey
intScenarioKey
intAccountKey
floatAmount
datetimeDate
Links to
Title / Name / DescriptionJoinTable
FK_FactFinance_DimAccountdbo.FactFinance.AccountKey =
dbo.DimAccount.AccountKeydbo.DimAccount
FK_FactFinance_DimDatedbo.FactFinance.DateKey =
dbo.DimDate.DateKeydbo.DimDate
FK_FactFinance_DimDepartmentGroup
dbo.FactFinance.DepartmentGroupKe
y =
dbo.DimDepartmentGroup.Departme
ntGroupKey
dbo.DimDepartmentGroup
FK_FactFinance_DimOrganization
dbo.FactFinance.OrganizationKey =
dbo.DimOrganization.OrganizationKe
y
dbo.DimOrganization
23
Title / Name / DescriptionJoinTable
FK_FactFinance_DimScenariodbo.FactFinance.ScenarioKey =
dbo.DimScenario.ScenarioKeydbo.DimScenario
Uses
Name
dbo.FactFinance
dbo.DimAccount
dbo.DimDate
dbo.DimDepartmentGroup
dbo.DimOrganization
dbo.DimScenario
24
3. Call Center
Module of the DW holds key metrics of call center performance and is used by VP Customer Service to monitor
customer behaviour and bottlenecks.
It is used by
· Customer Service Management Dashboard,
· some operational reports.
All data is collected by CRM.
Owner: VP CS
3.1. Tables
3.1.1. Table: dbo.FactCallCenter
This table holds statistics of call center.
Each row represents a shift on a specific date.
Columns
Description / AttributesNData typeName
DWH row ID
Identity / Auto increment columnintFactCallCenterID
Date of the statisitcsintDateKey
'holiday' or 'weekday'nvarchar(15)WageType
AM, midnight, PM1, PM2nvarchar(20)Shift
Number of level 1 operationrs on that shiftsmallintLevelOneOperators
Number of level 2 operationrs on that shiftsmallintLevelTwoOperators
Total number operationrs on that shift. Equals level 1 operators + level 2
operators.smallintTotalOperators
Number calls received on that shift.intCalls
NumberintAutomaticResponses
intOrders
smallintIssuesRaised
25
Description / AttributesNData typeName
smallintAverageTimePerIssue
floatServiceGrade
datetimeDate
Links to
Title / Name / DescriptionJoinTable
FK_FactCallCenter_DimDatedbo.FactCallCenter.DateKey =
dbo.DimDate.DateKeydbo.DimDate
Unique keys
Name / DescriptionColumns
PK_FactCallCenter_FactCallCenterID
Table Primary Key / IDFactCallCenterID
AK_FactCallCenter_DateKey_Shift
Business KeyDateKey, Shift
Uses
Name
dbo.FactCallCenter
dbo.DimDate
26
4. Inventory
4.1. Tables
4.1.1. Table: dbo.FactProductInventory
Columns
Description / AttributesNData typeName
intProductKey
intDateKey
dateMovementDate
moneyUnitCost
intUnitsIn
intUnitsOut
intUnitsBalance
Links to
Title / Name / DescriptionJoinTable
FK_FactProductInventory_DimDatedbo.FactProductInventory.DateKey =
dbo.DimDate.DateKeydbo.DimDate
FK_FactProductInventory_DimProductdbo.FactProductInventory.ProductKey
= dbo.DimProduct.ProductKeydbo.DimProduct
Unique keys
Name / DescriptionColumns
PK_FactProductInventory
Table Primary Key / IDProductKey, DateKey
27
5. Internet Sales
5.1. Tables
5.1.1. Table: dbo.FactInternetSales
Columns
Description / AttributesNData typeName
intProductKey
intOrderDateKey
intDueDateKey
intShipDateKey
intCustomerKey
intPromotionKey
intCurrencyKey
29
Description / AttributesNData typeName
intSalesTerritoryKey
nvarchar(20)SalesOrderNumber
tinyintSalesOrderLineNumber
tinyintRevisionNumber
smallintOrderQuantity
moneyUnitPrice
moneyExtendedAmount
floatUnitPriceDiscountPct
floatDiscountAmount
moneyProductStandardCost
moneyTotalProductCost
moneySalesAmount
moneyTaxAmt
moneyFreight
nvarchar(25)CarrierTrackingNumber
nvarchar(25)CustomerPONumber
datetimeOrderDate
datetimeDueDate
datetimeShipDate
Links to
Title / Name / DescriptionJoinTable
FK_FactInternetSales_DimCurrencydbo.FactInternetSales.CurrencyKey =
dbo.DimCurrency.CurrencyKeydbo.DimCurrency
FK_FactInternetSales_DimCustomerdbo.FactInternetSales.CustomerKey =
dbo.DimCustomer.CustomerKeydbo.DimCustomer
Order Data
FK_FactInternetSales_DimDate
dbo.FactInternetSales.OrderDateKey =
dbo.DimDate.DateKeydbo.DimDate
Due Date
FK_FactInternetSales_DimDate1
dbo.FactInternetSales.DueDateKey =
dbo.DimDate.DateKeydbo.DimDate
Ship Date
FK_FactInternetSales_DimDate2
dbo.FactInternetSales.ShipDateKey =
dbo.DimDate.DateKeydbo.DimDate
FK_FactInternetSales_DimProductdbo.FactInternetSales.ProductKey =
dbo.DimProduct.ProductKeydbo.DimProduct
FK_FactInternetSales_DimPromotiondbo.FactInternetSales.PromotionKey =
dbo.DimPromotion.PromotionKeydbo.DimPromotion
FK_FactInternetSales_DimSalesTerritory
dbo.FactInternetSales.SalesTerritoryKe
y =
dbo.DimSalesTerritory.SalesTerritoryKe
y
dbo.DimSalesTerritory
30
Linked from
Title / Name / DescriptionJoinTable
FK_FactInternetSalesReason_FactInternetSales
dbo.FactInternetSales.SalesOrderNum
ber =
dbo.FactInternetSalesReason.SalesOrd
erNumber,
dbo.FactInternetSales.SalesOrderLine
Number =
dbo.FactInternetSalesReason.SalesOrd
erLineNumber
dbo.FactInternetSalesReason
Unique keys
Name / DescriptionColumns
PK_FactInternetSales_SalesOrderNumber_SalesOrderLineNumber
Table Primary Key / ID
SalesOrderNumber,
SalesOrderLineNumber
Uses
Name
dbo.FactInternetSales
dbo.DimCurrency
dbo.DimCustomer
dbo.DimDate (Due Date)
dbo.DimDate (Order Data)
dbo.DimDate (Ship Date)
dbo.DimProduct
dbo.DimPromotion
dbo.DimSalesTerritory
Used by
Name
dbo.FactInternetSales
dbo.vDMPrep
dbo.FactInternetSalesReason
5.1.2. Table: dbo.FactInternetSalesReason
Columns
Description / AttributesNData typeName
nvarchar(20)SalesOrderNumber
tinyintSalesOrderLineNumber
intSalesReasonKey
31
Links to
Title / Name / DescriptionJoinTable
FK_FactInternetSalesReason_DimSalesReason
dbo.FactInternetSalesReason.SalesRea
sonKey =
dbo.DimSalesReason.SalesReasonKey
dbo.DimSalesReason
FK_FactInternetSalesReason_FactInternetSales
dbo.FactInternetSalesReason.SalesOrd
erNumber =
dbo.FactInternetSales.SalesOrderNum
ber,
dbo.FactInternetSalesReason.SalesOrd
erLineNumber =
dbo.FactInternetSales.SalesOrderLine
Number
dbo.FactInternetSales
Unique keys
Name / DescriptionColumns
PK_FactInternetSalesReason_SalesOrderNumber_SalesOrderLineNumber_SalesReasonKey
Table Primary Key / ID
SalesOrderNumber,
SalesOrderLineNumber,
SalesReasonKey
Uses
Name
dbo.FactInternetSalesReason
dbo.DimSalesReason
dbo.FactInternetSales
32
6. Sales Quotas
6.1. Tables
6.1.1. Table: dbo.FactSalesQuota
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintSalesQuotaKey
intEmployeeKey
intDateKey
smallintCalendarYear
tinyintCalendarQuarter
moneySalesAmountQuota
datetimeDate
Links to
Title / Name / DescriptionJoinTable
FK_FactSalesQuota_DimDatedbo.FactSalesQuota.DateKey =
dbo.DimDate.DateKeydbo.DimDate
FK_FactSalesQuota_DimEmployeedbo.FactSalesQuota.EmployeeKey =
dbo.DimEmployee.EmployeeKeydbo.DimEmployee
Unique keys
Name / DescriptionColumns
PK_FactSalesQuota_SalesQuotaKey
Table Primary Key / IDSalesQuotaKey
Uses
Name
dbo.FactSalesQuota
dbo.DimDate
dbo.DimEmployee
33
7. Surveys
7.1. Tables
7.1.1. Table: dbo.FactSurveyResponse
Columns
Description / AttributesNData typeName
Identity / Auto increment columnintSurveyResponseKey
intDateKey
intCustomerKey
intProductCategoryKey
nvarchar(50)EnglishProductCategoryName
intProductSubcategoryKey
nvarchar(50)EnglishProductSubcategoryName
datetimeDate
Links to
Title / Name / DescriptionJoinTable
FK_FactSurveyResponse_CustomerKeydbo.FactSurveyResponse.CustomerKe
y = dbo.DimCustomer.CustomerKeydbo.DimCustomer
FK_FactSurveyResponse_DateKeydbo.FactSurveyResponse.DateKey =
dbo.DimDate.DateKeydbo.DimDate
Unique keys
Name / DescriptionColumns
PK_FactSurveyResponse_SurveyResponseKey
Table Primary Key / IDSurveyResponseKey
Uses
Name
dbo.FactSurveyResponse
dbo.DimCustomer
dbo.DimDate
34
8. Currency Rates
8.1. Tables
8.1.1. Table: dbo.FactCurrencyRate
Columns
Description / AttributesNData typeName
intCurrencyKey
intDateKey
floatAverageRate
floatEndOfDayRate
datetimeDate
Links to
Title / Name / DescriptionJoinTable
FK_FactCurrencyRate_DimCurrencydbo.FactCurrencyRate.CurrencyKey =
dbo.DimCurrency.CurrencyKeydbo.DimCurrency
FK_FactCurrencyRate_DimDatedbo.FactCurrencyRate.DateKey =
dbo.DimDate.DateKeydbo.DimDate
Unique keys
Name / DescriptionColumns
PK_FactCurrencyRate_CurrencyKey_DateKey
Table Primary Key / IDCurrencyKey, DateKey
Uses
Name
dbo.FactCurrencyRate
dbo.DimCurrency
dbo.DimDate
35
9. Reseller Sales
9.1. Tables
9.1.1. Table: dbo.FactResellerSales
Columns
Description / AttributesNData typeName
intProductKey
intOrderDateKey
intDueDateKey
intShipDateKey
intResellerKey
intEmployeeKey
intPromotionKey
intCurrencyKey
intSalesTerritoryKey
nvarchar(20)SalesOrderNumber
tinyintSalesOrderLineNumber
tinyintRevisionNumber
36
Description / AttributesNData typeName
smallintOrderQuantity
moneyUnitPrice
moneyExtendedAmount
floatUnitPriceDiscountPct
floatDiscountAmount
moneyProductStandardCost
moneyTotalProductCost
moneySalesAmount
moneyTaxAmt
moneyFreight
nvarchar(25)CarrierTrackingNumber
nvarchar(25)CustomerPONumber
datetimeOrderDate
datetimeDueDate
datetimeShipDate
Links to
Title / Name / DescriptionJoinTable
FK_FactResellerSales_DimCurrencydbo.FactResellerSales.CurrencyKey =
dbo.DimCurrency.CurrencyKeydbo.DimCurrency
Order Date
FK_FactResellerSales_DimDate
dbo.FactResellerSales.OrderDateKey =
dbo.DimDate.DateKeydbo.DimDate
Due Date
FK_FactResellerSales_DimDate1
dbo.FactResellerSales.DueDateKey =
dbo.DimDate.DateKeydbo.DimDate
Ship Date
FK_FactResellerSales_DimDate2
dbo.FactResellerSales.ShipDateKey =
dbo.DimDate.DateKeydbo.DimDate
FK_FactResellerSales_DimEmployeedbo.FactResellerSales.EmployeeKey =
dbo.DimEmployee.EmployeeKeydbo.DimEmployee
FK_FactResellerSales_DimProductdbo.FactResellerSales.ProductKey =
dbo.DimProduct.ProductKeydbo.DimProduct
FK_FactResellerSales_DimPromotiondbo.FactResellerSales.PromotionKey =
dbo.DimPromotion.PromotionKeydbo.DimPromotion
FK_FactResellerSales_DimResellerdbo.FactResellerSales.ResellerKey =
dbo.DimReseller.ResellerKeydbo.DimReseller
FK_FactResellerSales_DimSalesTerritory
dbo.FactResellerSales.SalesTerritoryKe
y =
dbo.DimSalesTerritory.SalesTerritoryKe
y
dbo.DimSalesTerritory
Unique keys
Name / DescriptionColumns
PK_FactResellerSales_SalesOrderNumber_SalesOrderLineNumber
Table Primary Key / ID
SalesOrderNumber,
SalesOrderLineNumber
37
Uses
Name
dbo.FactResellerSales
dbo.DimCurrency
dbo.DimDate (Due Date)
dbo.DimDate (Order Date)
dbo.DimDate (Ship Date)
dbo.DimEmployee
dbo.DimProduct
dbo.DimPromotion
dbo.DimReseller
dbo.DimSalesTerritory
38
10. Product Descriptions
10.1. Tables
10.1.1. Table: dbo.FactAdditionalInternationalProductDescription
Columns
Description / AttributesNData typeName
intProductKey
nvarchar(50)CultureName
nvarchar(MAX)ProductDescription
Links to
Title / Name / DescriptionJoinTable
User-defined relation
dbo.FactAdditionalInternationalProduc
tDescription.ProductKey =
dbo.DimProduct.ProductKey
dbo.DimProduct
Unique keys
Name / DescriptionColumns
PK_FactAdditionalInternationalProductDescription_ProductKey_CultureName
Table Primary Key / IDProductKey, CultureName
Uses
Name
dbo.FactAdditionalInternationalProductDescription
dbo.DimProduct
39