Download presentation
Presentation is loading. Please wait.
2
A multi-dimensional data model
Location Time Item The word cube brings to mind a 3-D object, and we can think of a 3-D data cube as being a set of similarly structured 2-D tables stacked on top of one another. We can think of a 4-D data cube as consisting of a series of 3-D cubes. If we continue in this way, we may display any n-D data as a series of (n - 1)-D “cubes". The data cube is a metaphor for multidimensional data storage. The actual physical storage of such data may differ from its logical representation.
3
Multi-dimensional Data Model
A multidimensional data model views data in the form of a data cube. A data cube allows data to be modeled and viewed in multiple dimensions. It is defined by dimensions and facts. Dimensions are the perspectives or entities with respect to which an organization wants to keep records. It represents data by means of a multidimensional N grid Q which is Cartesian product of certain discrete sets Di called dimension. Elements of a dimensions are called members. The set of dimension & members forms metadata.
4
Example Loc= Chicago Loc= New York Loc=Toronto Loc= Vancouver Item
home ent. Comp. phone Sec. Time Q1 Q2 Q3 Q4
5
Multi-dimensional Data Model
Dimensions: Product, Region, Time Hierarchical summarization paths Product Region Time Industry Country Year Category Region Quarter Product City Month week Office Day Region W S N Product Toothpaste Juice Cola Milk Cream Soap Month 1 2 3 4 7 6 5
6
Conceptual Modeling of Data Warehouses
The most popular data model for data warehouses is a multidimensional model. This model can exist in the form of a star schema, a snowflake schema, or a fact constellation schema. Star schema: The most common modeling paradigm is the star schema in which the data warehouse contains A large central table (fact table) containing the bulk of the data, with no redundancy, and A set of smaller attendant tables (dimension tables), one for each dimension. The schema graph resembles a starburst, with the dimension tables displayed in a radial pattern around the central fact table.
8
Example of Star Schema item branch time Sales Fact Table time_key
day day_of_the_week month quarter year time item_key item_name brand type supplier_type item Sales Fact Table time_key item_key branch_key branch_key branch_name branch_type branch location_key street city state_or_province country location location_key units_sold dollars_sold avg_sales Measures
9
The Snowflake schema: The snowflake schema is a variant of the star schema model, where some dimension tables are normalized, thereby further splitting the data into additional tables. The resulting schema graph forms a shape similar to a snowflake. The major difference between the snowflake and star schema models is that the dimension tables of the snowflake model may be kept in normalized form. Such a table is easy to maintain and saves storage space. The snowflake structure can reduce the effectiveness of browsing since more joins will be needed to execute a query. Consequently, the system performance may be adversely impacted.
10
Example of Snowflake Schema
time_key day day_of_the_week month quarter year time item_key item_name brand type supplier_key item supplier_key supplier_type supplier Sales Fact Table time_key item_key branch_key location_key street city_key location branch_key branch_name branch_type branch location_key units_sold city_key city state_or_province country dollars_sold avg_sales Measures
11
Fact schema: Sophisticated applications may require multiple fact tables to share dimension tables. This kind of schema can be viewed as a collection of stars, and hence is called a galaxy schema or a fact constellation.
12
Example of Fact Constellation
time_key day day_of_the_week month quarter year time item_key item_name brand type supplier_type item Shipping Fact Table Sales Fact Table time_key item_key time_key shipper_key item_key from_location branch_key branch_key branch_name branch_type branch location_key to_location location_key street city province_or_state country location dollars_cost units_sold units_shipped dollars_sold avg_sales shipper_key shipper_name location_key shipper_type shipper Measures
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.