apex supermarket data warehouse

21
Apex Supermarket Data Warehouse Presented By: Khalid Nour Muhammad Rizvi Raghuram Vempali Surekha Vemuri Presentation 2: Data Modeling

Upload: jaeger

Post on 25-Feb-2016

48 views

Category:

Documents


0 download

DESCRIPTION

Apex Supermarket Data Warehouse. Presentation 2: Data Modeling. Presented By: Khalid Nour Muhammad Rizvi Raghuram Vempali Surekha Vemuri. Outline. Background Business Need Fact Table Dimension Tables Star Schema Snowflake Schema Data Dictionary Information Package - PowerPoint PPT Presentation

TRANSCRIPT

Apex Supermarket Data Warehouse

Apex Supermarket Data WarehousePresented By:Khalid NourMuhammad RizviRaghuram VempaliSurekha VemuriPresentation 2: Data ModelingOutlineBackgroundBusiness NeedFact TableDimension TablesStar SchemaSnowflake SchemaData DictionaryInformation PackageTable Hierarchies

BackgroundApex Supermarket is a supermarket chain with 4 stores in South Texas, Central Texas, North Texas and East TexasThey have stores in:South Texas: LaredoCentral Texas: MidlandNorth Texas: DentonEast Texas: HoustonBusiness NeedHelp executive staff study the sale of products by Categories, Regions, States, Cities, Stores, and Time

Executive Staff will be able to figure out sales revenue through the different dimension combinations

Give strategic information for the Executive Staff to make decisions on optimizing prices of productsData Warehouse Fact TableSales Fact TableKeysOrderIDCardIDProductIDDateIDStoreIDNon-Key ColumnsTotalSalesTotalCostGross Profit

Data Warehouse Dimension TablesOrder TableProduct TablePromotion Card TableStore TableTime Table

Data Warehouse Star Schema

Data Warehouse Snowflake Schema

Data DictionarySales Fact Table

Product Category Table

Column NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexStoreIDCPK; FK to Store Tablevarchar10LIKE '[A-Z][A-Z][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'YOrderIDCPK; FK to Order Tablevarchar20YCardIDCPK; FK to Promotion Cardvarchar20YProductIDCPK; FK to Product Tablevarchar10YDateIDCPK; FK to Time Tablesmalldatetime YTotalSalesTotal economic Sales of productssmallmoneyTotalCostTotal economic cost of productssmallmoneyGrossProfitDifference between revenue and the cost of a productsmallmoneyColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexProductCategoryIDPK; FK to Product tablevarchar10YYProductCategoryCategory of productvarchar20Data Dictionary (Contd)Product Table

Vendor TableColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexProductIDPK; FK to Sales Fact tablevarchar10YYProductCategoryIDCategory of productvarchar20ProductNameName of Productvarchar40YColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexVendorIDPK; FK to Order tablevarchar10YYVendorNameName of vendorvarchar20YZipField zipchar5LIKE '[0-9][0-9][0-9][0-9][0-9]'Data Dictionary (Contd)Order Table

StoreColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexOrderIDPK; FK to Sales Fact tablevarchar20YYVendorIDFK; to Vendor tablevarchar10YDateOrderedDate OrderedsmalldatetimeLIKE '[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]'DateReceivedArrival datesmalldatetimeLIKE '[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]'YPackageCostCost of packages for this ordersmallmoneyColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexStoreIDPK; FK to Sales Fact tablevarchar10YLIKE '[A-Z][A-Z][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'YRegionIDFK; to Region tablevarchar10YCityField cityvarchar25StateField statechar2TXLIKE [A-Z][A-Z]ZipField zipchar5LIKE '[0-9][0-9][0-9][0-9][0-9]'Data Dictionary (Contd)Promotion Card Table

Region TableColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexCardIDPK; FK to Sales Fact tablevarchar20YYFirstNameCustomer First Namevarchar20LastNameCustomer Last Namevarchar20YStreetField streetvarchar30CityField cityvarchar25StateField statechar2TXLIKE [A-Z][A-Z]ZipField zipchar5LIKE '[0-9][0-9][0-9][0-9][0-9]'Column NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexRegionIDPK; FK to Store tablevarchar10YYRegionNameField Region; West Coast, East Coast, Midwest, or Southwestvarchar25YData Dictionary (Contd)Time Table

Quarter TableColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexDateIDPK; FK to Sales Fact TablesmalldatetimeY YMonthIDFK to Month Tablesmalldatetime YDayOfWeekIDFK to DayOfWeek Tablesmalldatetime YQuarterIDFK to Quarter Tablesmalldatetime YDateField datesmalldatetimeLIKE '[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]' YColumn NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexQuarterIDPK; FK to Time TablesmalldatetimeY YQuarterNameName of the Quartervarchar10 Data Dictionary (Contd)Day of Week Table

Month Table

Year Table

Column NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexDayOfWeekIDPK; FK to Time TablesmalldatetimeY YDayOfWeekNameDay of the weekvarchar10 Column NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexMonthIDPK; FK to Time TablesmalldatetimeY YMonthNameName of the Monthvarchar10 Column NameDescriptionData TypeSizeIdentityUniqueDefaultCheckAllow NullsIndexYearIDPK; FK to Time TablesmalldatetimeY YYearNameName of the Yearvarchar10 Information Package

Dimensional Hierarchy

Order HierarchyInvoice Number

Date Ordered

Date received

Package cost

SizeSmall (1-3 billion turnover)Medium (4-10 billion turnover)Large (>11 billion) TypeOrganic VendorTraditional Vendor

Category produce beverages staplesspicescannedbabycondimentspapercleaningpersonalFrozendiaryStore HierarchyStore nameCityStateZipRegionsSouth TexasCentral TexasNorth TexasEast Texas

Each store location is in one region

DateDay of WeekQuarterYear

Quarter ValuesQuarter IJanuaryFebruaryMarchQuarter IIApril MayJuneQuarter IIIJulyAugustSeptemberQuarter IVOctoberNovemberDecemberTime Hierarchy ProductsProducefrozendiaryEggsMilkCheeseBroccoliBeansPeasCornPotatoesFruitsVeggiesSpinachBeveragescannedbabypapercondimentsspicesStaplescleaningpersonalShampooConditionerlotionShaving creamBleachDetergentDish liquidbagswipesKetchupMayoSalad dressingOlive oilDiapersWipesFormulaBaby foodBaby waterOlivesBeansSoupsSeasoningSalt/pepperCerealsBreadGritsSodasJuicesWaterAlcoholPlatesCupsNapkinsCategoriesProduct HierarchyAny Questions?Sheet1Information Subject: SalesDimensionsHierarchies/CategoriesTimeProductPromotionOrderStoreYearCategoryFirst nameVendor nameStateQuarterLast nameDate orderedRegionDateProduct namestateDate receivedCityDay of weekcityPackage costzipstreetvendor zipStore namezipInvoice numberVendor TypeCategory orderedVendor sizeFacts: Total Sales, Total Cost, Gross Profit

Sheet2

Sheet3