0% found this document useful (0 votes)
16 views5 pages

Data Warehouse Design Mini Case Study

This document describes a case study for designing a data warehouse to track inventory for a retail firm. It includes sample data from purchase and product databases as well as custom product spreadsheets. The data warehouse needs to track inventory quantities and values over time to analyze balances, changes, and contributions. Key dimensions include product, date, and supplier. Measures include quantity on hand and inventory value. The document outlines problems to solve such as specifying the dimensional model, resolving summarizability issues, and populating data warehouse tables.

Uploaded by

Ahmed yasser
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views5 pages

Data Warehouse Design Mini Case Study

This document describes a case study for designing a data warehouse to track inventory for a retail firm. It includes sample data from purchase and product databases as well as custom product spreadsheets. The data warehouse needs to track inventory quantities and values over time to analyze balances, changes, and contributions. Key dimensions include product, date, and supplier. Measures include quantity on hand and inventory value. The document outlines problems to solve such as specifying the dimensional model, resolving summarizability issues, and populating data warehouse tables.

Uploaded by

Ahmed yasser
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Practice Mini Case for Data Warehouse Design

This mini case study contains two data sources with sample data along with a statement

of business needs. Using the data sources and business needs, you will specify a dimensional

model with dimensions, measures, and grain, create a schema design for the data warehouse that

integrates the data sources, identify summarizability problems in the design, and populate data

warehouse tables from sample rows in the data sources.

Data Sources
The case study involves two data sources for a retail firm. The Purchase database

supports purchase transactions to replenish retail inventory. A purchase consists of a heading

with the purchase number, date, payment method, delivery date, and supplier. A purchase

contains a collection of products with the quantity and unit cost recorded on a purchase line

along with links to the product and purchase heading. Each product has one preferred supplier.

However, a purchase can use a non-preferred supplier if necessary.

Individual stores of the retail firm also maintain an inventory of custom products ordered

from local suppliers. These products are ordered through the purchase spreadsheets for custom

products. Inventory practices for custom products are informal. New products are typically

purchased when the manager senses new demand for local items.

The ERD in Figure 1 supports the purchase database. Tables 1 to 4 show sample data for

the tables in the purchases database. The supply purchase spreadsheet (Table 5) contains a

sample of purchases of custom products from local suppliers. The Stock column in the

spreadsheet indicates the quantity in stock at the time of purchase.


Practice Mini Case for Data Warehouse Design

Figure 1: ERD for Retail Purchase Operations

Table 1: Sample Data for the Supplier Table


SuppNo SuppName SuppEmail SuppPhone SuppDisc
S2029929 ColorMeg, Inc. custrel@[Link] (720) 444-1231 0.10
S3399214 Connex help@[Link] (206) 432-1142 0.12
S4290202 Ethlite ordering@[Link] (303) 213-2234 0.05
S4298800 Intersafe orderdesk@[Link] (512) 443-2215 0.10
S4420948 UV Components custserv@[Link] (303) 321-0432 0.08
S5095332 Cybercx orderhelp@[Link] (212) 324-5683 0.00

Table 2: Sample Data for the Product Table


ProdNo ProdName SuppNo ProdQOH ProdPrice ProdNextShipDate
P0036566 17 inch Color Monitor S2029929 12 $169.00 02/20/2013
P0036577 19 inch Color Monitor S2029929 10 $319.00 02/20/2013
P1114590 R3000 Color Laser Printer S3399214 5 $699.00 01/22/2013
P1412138 10 Foot Printer Cable S4290202 100 $12.00
P1445671 8-Outlet Surge Protector S4298800 33 $14.99
P1556678 CVP Ink Jet Color Printer S3399214 8 $99.00 01/22/2013
P3455443 Color Ink Jet Cartridge S3399214 24 $38.00 01/22/2013
P4200344 36-Bit Color Scanner S4420948 16 $199.99 01/29/2013
P6677900 Black Ink Jet Cartridge S3399214 44 $25.69
P9995676 Battery Back-up System S5095332 12 $89.00 02/01/2013

Table 3: Sample Data for the Purchase Table

2
Practice Mini Case for Data Warehouse Design

PurchNo PurchDate SuppNo PurchPayMethod PurchDelDate


P2224040 02/03/2013 S2029929 Credit 02/08/2013
P2345877 02/03/2013 S5095332 PO 02/11/2013
P3249952 02/04/2013 S3399214 PO 02/09/2013
P3854432 02/03/2013 S4290202 PO 02/08/2013
P9855443 02/07/2013 S4420948 PO 02/15/2013

Table 4: Sample Data for the PurchLine Table


PurchNo ProdNo PLQty PLUnitCost
P2224040 P0036566 10 $100.00
P2224040 P0036577 10 $200.00
P2345877 P9995676 10 $45.00
P3249952 P1114590 15 $450.00
P3249952 P1556678 10 $50.00
P3249952 P3455443 25 $21.95
P3249952 P6677900 25 $12.50
P3854432 P1412138 50 $6.50
P9855443 P4200344 15 $99.00

Table 5: Sample Spreadsheet Data for Custom Product Purchases


ProdCode ProdDesc Supp Qty Stock Unit Price PurchDate Amount
CPC1 Souvenir 1 Omart 20 1 $2.00 13-Feb-2014 $40.00
CPC2 Souvenir 2 Smart 10 2 $3.50 14-Feb-2014 $35.00
CPC3 Souvenir 3 Pmart 20 0 $1.50 11-Feb-2014 $30.00

Data source size statistics


To compute grain size, you should use these estimates about cardinalities of tables and

unique values of some columns.

 Product rows: 1,000

 Supplier rows: 100

 Purchase rows: 100,000 per year

 PurchLine rows: 500,000 per year

 Spreadsheet rows: 1,000 per month; new spreadsheet each month

 Unique products in a spreadsheet for one year: 100

 Unique suppliers in a spreadsheet for one year: 20

3
Practice Mini Case for Data Warehouse Design

Business Needs
The main purpose of the data warehouse is to track inventory balances over time.

Inventory balances are a type of snapshot. Snapshots are typical in applications in which

balances are involved, such as account balances in financial services, enrollment in courses,

reservations in hospitality and travel, and head count in personnel management. Snapshots

cannot be aggregated over time [Link] quantities and values over time is not

meaningful.

The basic values for inventory tracking are quantity on hand and inventory value.

Inventory valuation can be complex as many accounting methods exist to value inventory. For

this case, the purchase price or unit cost of the inventory can be used for valuation. The data

warehouse should support detailed tracking of inventory to the individual product, purchased by

date, and supplier.

Here are typical computations for analyzing and tracking inventory balances using the

quantity on hand and inventory value:

 The average quantities and stock values in each time period

 The opening and closing balances for each time period

 The change in inventory levels between consecutive periods and parallel periods

 The minimum and maximum inventory levels in a time period

 The relative contribution of the stocked item to the overall stock value

Problems
1. You should identify dimensions, map dimensions to data sources, and specify dimension

hierarchies. For each dimension, you should identify its data sources and attributes in each

4
Practice Mini Case for Data Warehouse Design

data source. For hierarchical dimensions, you should indicate the levels from broad to

narrow.

2. You should specify measures, related data sources, and measure aggregation properties.

3. Identify the grain in your dimensional design using the business needs as a guideline. You

should then indicate relative storage requirements for the grain using the statistics for the data

sources. Using the cardinality estimates provided, you should determine either the fact table

size or sparsity and then compute the unknown grain size variable. For example, you should

compute sparsity if the fact table size is given.

4. Extend your analysis to design a star schema (or variation) to support inventory analysis. For

each table, you should define the table name, primary key, and columns. You do not need to

write complete CREATE TABLE statements.

5. Identify summarizability problems in your star schema and indicate preferred resolutions of

the summarizability problems. For incomplete dimension-fact relationships, you should also

indicate if columns in a dimension table allow null values.

6. You should populate your data warehouse tables based on the data in the sample tables and

spreadsheet. You do not need to write SQL INSERT statements or insert the data into your

tables. You can just show table listings in your solution. You should indicate mappings from

data sources into tables. For example, a mapping may involve generating new primary key

values for a data warehouse table or using a default value for a missing value.

Common questions

Powered by AI

The key considerations include identifying dimensions and measures, ensuring correct grain definition, and addressing summarizability issues. The business needs of the retail firm emphasize tracking inventory balances over time, requiring a dimensional model with time, product, and supplier dimensions. Key measures include inventory quantity and value. Correct grain definition is crucial as it determines data granularity, using estimates about table cardinalities; this helps in managing storage as purchases and lines could number in hundreds of thousands annually . Summarizability issues arise due to the complex nature of inventory tracking, particularly because snapshot metrics like opening and closing balances cannot be aggregated simply over time . Efficient mapping of data sources into these dimensions and measures ensures the model meets the firm's detailed tracking and analytical needs for inventory at various granularity levels.

Defining a star schema offers simplicity and efficiency in query performance by organizing data into fact and dimension tables, which is beneficial for the retail firm as it supports fast and intuitive inventory analysis. Star schemas enable straightforward calculations for measures such as inventory levels and tracking by linking central fact tables directly to dimension tables. Variations like snowflake schema may further normalize dimensions, reducing redundancy. For complex inventory analysis, incorporating conformed dimensions like time consistently across the warehouse ensures uniform analysis metrics. Such variations aid in handling hierarchical and frequently-changing data, which might be vital given the firm's diverse inventory sources .

Challenges in maintaining summarizability in a star schema include handling incomplete dimension relationships and null values in dimension tables. Summarizability problems occur when aggregating data without fully intact dimensions, leading to potential misinterpretations. These can be resolved by ensuring all relevant dimension relationships are fully represented, avoiding nulls where possible, and implementing default values or surrogate keys to handle missing data . For the retail firm, ensuring all products and suppliers correctly link to purchases across time periods is crucial, as incomplete mappings can distort inventory tracking. Establishing explicit hierarchies and ensuring consistency with business granularity rules assists in resolving these issues.

Assessing the relative contribution of a stocked item to the overall stock value involves computational strategies such as calculating the item's inventory value as a percentage of the total inventory value during a period. Techniques like weighting item prices against total inventory costs or applying index-based comparisons across time periods allow tracking shifts in contribution. For the retail firm, deploying these strategies in the warehouse design ensures detailed visibility into individual product performance. Incorporating dynamic reports and pivot functionalities within the warehouse system can facilitate such real-time analysis, offering insights into how each item impacts overall financial metrics .

The ERD (Entity-Relationship Diagram) plays a crucial role by visually mapping out the key entities and relationships within the purchase database, aiding in identifying dimensions and relationships necessary for the data warehouse's dimensional model. It provides a blueprint of the purchase transaction structure, including headings, lines, and supplier relations, helping designers understand how purchase data relates to inventory tracking in the warehouse. For the retail firm, the ERD supports the conceptualization of joining tables across transactions and defining how information flows, thus aiding in the design of star schemas and ensuring comprehensive coverage of inventory tracking needs .

The grain of a dimensional design defines the lowest level of detail for data storage, critically influencing the storage requirements. For the retail firm, cardinality estimates suggest different tables could contain thousands to hundreds of thousands of rows annually. A finer grain, like transactional-level inventory, demands more storage because it captures each item's detailed movement. However, aligning the grain with business needs, like tracking at the product or supplier level rather than transaction, reduces storage while meeting analytical needs. Correctly balancing grain helps avoid unnecessary data inflation and optimizes resource utilization, leveraging relative storage requirements effectively .

Using snapshots complicates aggregation because snapshot data represents a moment in time, making temporal aggregation inappropriate. For instance, summing stocks over different periods doesn't yield meaningful insights since each snapshot is independent. To address this, the data warehouse design should incorporate time-bound metrics like opening and closing balances for each period, changes between periods, and minimum/maximum levels within periods . These metrics help analyze inventory trends without relying on misleading aggregates. The design should store time dimensions separately, explicitly linking snapshot instances to specific dates to maintain snapshot's temporal accuracy.

Integrating custom product purchases into the warehouse model poses challenges like inconsistent inventory records and the lack of structured tables compared to standard purchases, leading to potential data quality issues. The retail firm must standardize reporting from informal spreadsheets into structured formats, transforming unstructured data into consistent dimensions and measures. Addressing these challenges involves creating a separate dimension or schema extension for custom products, ensuring all custom purchase data aligns with standard inventory metrics and adopting ETL processes to normalize irregular data entries . Additionally, incorporating flexibility in schema design allows accommodating variances in custom product reports, maintaining accuracy and completeness.

Mapping data sources into warehouse tables and generating new primary key values help maintain unique identifiers for each entity across different systems, ensuring integrity and consistency in the warehouse. Using default values for missing data helps fill gaps without halting data integration processes, preventing analytical inaccuracies. Data integration is thus streamlined, especially with varied inputs like standard purchases and custom product spreadsheets. For the retail firm, these strategies enable a cohesive data narrative across all inventory records which supports comprehensive tracking and minimizes analytical discrepancies . Effective use of default values and unique keys creates a smooth data warehouse ecosystem, facilitating accurate and timely analyses.

Grain size computation in warehouse design involves determining either the sparsity or the fact table size based on existing cardinality estimates. For the retail firm, cardinality estimates provide data about annual table sizes for purchases and purchase lines. Knowing these figures allows one to decide on the granularity of the fact table. For example, a high cardinality means many potential dimensions, suggesting a sparser table since not all dimensions will be filled. Conversely, lower cardinality can streamline the fact table size. This balance, informed by business needs, ensures optimized storage while supporting required analytical operations without excessive computation .

You might also like