An Analysis of Many-To-Many Relationships Between Fact and Dimension Tables in Dimensional Modeling

An Analysis of Many-To-Many Relationships Between Fact and Dimension Tables in Dimensional Modeling

An Analysis of Many-to-Many Relationships Between Fact and Dimension Tables in Dimensional Modeling Il -Yeol Song William Rowen College of Information Science and Technology College of Information Science and Technology Drexel University Drexel University Philadelphia, PA 19104 Philadelphia, PA 19104 [email protected] [email protected] Carl Medsker Edward Ewen, M.D Arynth, Inc. Christiana Care Health System Cinnaminson, NJ 08077 Wilmington, DE 19899 [email protected] [email protected] 1. Introduction Abstract The data warehouse (DW) is an integrated repository of Star schema, which maintains one-to-many data, generated and used by an entire organization. The relationships between dimensions and a fact table, data warehouse employs a suite of tools that transforms is widely accepted as the most viable data raw data into meaningful business information. This representation for dimensional analysis. Real- information depicts a view of a distinct business process to world DW schema, however, frequently includes identify trends and patterns and serves as a foundation for many-to-many relationships between a dimension decision-making. and a fact table. Having those relationships in a dimensional model causes several difficult issues, The dimensional model is a logical representation of a such as losing the simplicity of the star schema business process whose significant features are user structure, increasing complexity in forming understandability, query performance, and resilience to queries, and degrading query performance by change. Dimensional modeling is widely accepted as the adding more joins. Therefore, it is desirable to viable technique for delivering data to end users in a data represent the many-to-many relationships with warehouse [KRRT98, AM97, AV98, AS97, DSHB98, correct semantics while still keeping the structure MC98]. The main components of a dimensional model are of the star schema. fact tables and dimension tables. A fact table contains In this paper, we analyze many-to-many measurements of the business or records events. A relationships between a dimension table and a fact dimension table contains attributes used to constrain, table in dimensional modeling. We illustrate six group, or browse the fact data. There are two primary different approaches and show the advantages and advantages of using a dimensional model in data disadvantages of each. We propose two ad-hoc warehouse environments. First, a dimensional model methods that maintain a star schema structure by provides a multidimensional analysis space in relational denormalizing the dimensions to avoid many-to- database environments; we are analyzing factual data using many relationships. This method allows quick dimensions. Second, a typical denormalized dimensional query processing by using a concatenated attribute model has a simple schema structure, which simplifies end- with minimal overhead. Other issues addressed user query processing and improves performance. are data redundancy, weighting factors, storage requirements, and performance concerns. The dimension tables contain a large number of attributes, reflecting the details of the business processes. Browsing is a user activity that explores the relationships The copyright of this paper belongs to the paper’s authors. Permission to copy between attributes in a dimension table. The attributes will without fee all or part of this material is granted provided that the copies are not serve as row headers and constraints for these views. It is made or distributed for direct commercial advantage. common to have more than one hundred attributes in a real Proceedings of the International Workshop on Design and world application. Dimension tables are considered wide Management of Data Warehouses (DMDW'2001) for this reason. Denormalization of dimension tables is an Interlaken, Switzerland, June 4, 2001 acceptable practice in data warehousing. A dimensional (D. Theodoratos, J. Hammer, M. Jeusfeld, M. Staudt, eds.) model with highly normalized dimension structure is called http://sunsite.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-39/ I-Y. Song, W.Rowen, C. Medsker, E. Ewen 6-1 a snowflake schema [KRRT98]. Any attempts to dimension tables are typically joined to the fact table with normalize a dimension table into a series of tables could a one-to-many relationship. When all the dimensions are reduce the browsing capabilities of the user, resulting in related by one-to-many relationships with the fact table, the more complex queries and increased retrieval time. Our schema is called a star schema. However, real-world DW experiences with real-world data warehouse development schema frequently includes many-to-many relationships shows that browsing and group-by queries are the two between a dimension and a fact table [KRRT98, AS97]. salient issues that drive the design of data warehouses. Having those relationships in a dimensional model causes several difficult issues, such as losing the star schema The fact table is where the numerical measurements of structure, increasing complexity in forming queries, and the business processes are stored. These measurements or degrading query performance by adding more joins. events are related to each dimension table by foreign keys. Therefore, it is desirable that we handle the many-to-many The fact table contains thousands, or even millions of rows relationships while still keeping the structure of the star of records. A typical query will compress or extract a large schema. number of records into a handful of rows using aggregation. Therefore, the most useful facts are numeric, In this paper, we analyze many-to-many relationships continuously valued, and additive; Kimball calls this between a dimension table and a fact table in dimensional premise the holy grail of dimensional database design modeling. Even though there are some previous studies on [Kimb96]. how to represent a data warehouse conceptual schema [GR98, SBHD98, TBC99] or how to derive/design a data The grain of the fact table is a very important warehouse schema [AM97, KS97, TS98, LAW98, PJ99, characteristic. The grain is the level of detail at which MK00, HLB00], the specific method of handling many-to- measurements or events are stored. It determines the many relationships is rarely addressed. Two sources we dimensionality of the data warehouse and dramatically found are books by Kimball et al. [KRRT98] and impacts the size and conversely the performance. Giovinazzo [Giov00]. Not being satisfied by those approaches for our real-world project, we have performed The goal in designing the data warehouse model is to a thorough study on how to handle many-to-many keep it simple to understand, simple to load with relationships. In this paper, we illustrate six different operational data, and as fast as possible to query [Kimb96, approaches and show the advantages and disadvantages of Kimb97, KRRT98, AM97, AV98]. We would like to have each. We propose two ad-hoc methods that maintain a star neophyte and experienced business analysts creating schema structure by denormalizing the dimension to avoid reports, so the logical model needs to be easy to many-to-many relationships. These methods allow us to comprehend. Most business analysts frequently have a quickly process queries. Other issues that will be addressed difficult time finding data in both highly normalized include data redundancy, weighting factors, storage designs and abstract object designs. The flatter the requirements, and performance concerns. dimensional model, the better for end-users. The more complex the model, the more complex will be the The remainder of this paper is organized as follows: extract/transform/load (ETL) routines to create and run. Section 2 presents a motivation example. Section 3 presents six approaches and discusses the advantages and Finally, queries against the database will run faster if a disadvantages. Sections 4 presents a summary table and minimal number of one-to-many relationships and joins are Section 5 concludes our paper. present. To provide users with the views they need for analysis, the one-to-many relationships between facts and 2. Motivational Example dimensions should be flattened into a series of views or In the healthcare billing process, there are usually derived tables. For instance, the statistician may want to multiple diagnoses for each patient visit. A design problem create a regression model against diagnoses with the grain arises in modeling a diagnosis dimension that has a many- of the analysis being a single visit to the hospital. to-many relationship with a fact table as shown in Figure 1. Therefore, each row must completely define a visit with We will explore specific data warehousing structures to columns for specific diagnoses or columns that represent analyze this predicament. We will use, as an illustrated groups of diagnoses. To meet the fundamental goal of example, the patient-billing situation throughout this paper empowering end users to perform their own queries and to compare and contrast the different solutions. analyses, the design must balance elegance in conceptual design with understandability, usability, and performance. In Figure 1, the relationship between the diagnosis dimension and the billable patient encounter fact table is Design principles dictate that one should identify any illustrated as a many-to-many. This considers the situation dimensional attribute that has a single value for an where a patient has more than one diagnosis for each individual

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us