Chapter 32 Data Warehousing Design Transparencies Pearson Education

  • Slides: 42
Download presentation
Chapter 32 Data Warehousing Design Transparencies © Pearson Education Limited 1995, 2005 1

Chapter 32 Data Warehousing Design Transparencies © Pearson Education Limited 1995, 2005 1

Chapter 32 - Objectives u The issues associated with designing a data warehouse. u

Chapter 32 - Objectives u The issues associated with designing a data warehouse. u A technique for designing the database component of a data warehouse called dimensionality modeling. u How a dimensional model (DM) differs from an Entity-Relationship (ER) model. © Pearson Education Limited 1995, 2005 2

Chapter 32 - Objectives u A step-by-step methodology for designing a data warehouse. u

Chapter 32 - Objectives u A step-by-step methodology for designing a data warehouse. u Criteria for assessing the degree of dimensionality provided by a data warehouse. u How Oracle Warehouse Builder can be used to build a data warehouse. © Pearson Education Limited 1995, 2005 3

Designing Data Warehouses u To begin a data warehouse project, we need to find

Designing Data Warehouses u To begin a data warehouse project, we need to find answers for questions such as: – Which user requirements are most important and which data should be considered first? – Which data should be considered first? – Should the project be scaled down into something more manageable? – Should the infrastructure for a scaled down project be capable of ultimately delivering a full-scale enterprise-wide data warehouse? © Pearson Education Limited 1995, 2005 4

Designing Data Warehouses u For many enterprises the way to avoid the complexities associated

Designing Data Warehouses u For many enterprises the way to avoid the complexities associated with designing a data warehouse is to start by building one or more data marts. u Data marts allow designers to build something that is far simpler and achievable for a specific group of users. © Pearson Education Limited 1995, 2005 5

Designing Data Warehouses u Few designers are willing to commit to an enterprise-wide design

Designing Data Warehouses u Few designers are willing to commit to an enterprise-wide design that must meet all user requirements at one time. u Despite the interim solution of building data marts, the goal remains the same: that is, the ultimate creation of a data warehouse that supports the requirements of the enterprise. © Pearson Education Limited 1995, 2005 6

Designing Data Warehouses u The requirements collection and analysis stage of a data warehouse

Designing Data Warehouses u The requirements collection and analysis stage of a data warehouse project involves interviewing appropriate members of staff (such as marketing users, finance users, and sales users) to enable the identification of a prioritized set of requirements that the data warehouse must meet. © Pearson Education Limited 1995, 2005 7

Designing Data Warehouses u At the same time, interviews are conducted with members of

Designing Data Warehouses u At the same time, interviews are conducted with members of staff responsible for operational systems to identify, which data sources can provide clean, valid, and consistent data that will remain supported over the next few years. © Pearson Education Limited 1995, 2005 8

Designing Data Warehouses u Interviews provide the necessary information for the top-down view (user

Designing Data Warehouses u Interviews provide the necessary information for the top-down view (user requirements) and the bottom-up view (which data sources are available) of the data warehouse. u The database component of a data warehouse is described using a technique called dimensionality modeling. © Pearson Education Limited 1995, 2005 9

Dimensionality modeling u A logical design technique that aims to present the data in

Dimensionality modeling u A logical design technique that aims to present the data in a standard, intuitive form that allows for high-performance access u Uses the concepts of Entity-Relationship modeling with some important restrictions. u Every dimensional model (DM) is composed of one table with a composite primary key, called the fact table, and a set of smaller tables called dimension tables. © Pearson Education Limited 1995, 2005 10

Dimensionality modeling u Each dimension table has a simple (non- composite) primary key that

Dimensionality modeling u Each dimension table has a simple (non- composite) primary key that corresponds exactly to one of the components of the composite key in the fact table. u Forms ‘star-like’ structure, which is called a star schema or star join. © Pearson Education Limited 1995, 2005 11

Dimensionality modeling u All natural keys are replaced with surrogate keys. Means that every

Dimensionality modeling u All natural keys are replaced with surrogate keys. Means that every join between fact and dimension tables is based on surrogate keys, not natural keys. u Surrogate keys allows the data in the warehouse to have some independence from the data used and produced by the OLTP systems. © Pearson Education Limited 1995, 2005 12

Star schema for property sales of Dream. Home © Pearson Education Limited 1995, 2005

Star schema for property sales of Dream. Home © Pearson Education Limited 1995, 2005 13

Dimensionality modeling u Star schema is a logical structure that has a fact table

Dimensionality modeling u Star schema is a logical structure that has a fact table containing factual data in the center, surrounded by dimension tables containing reference data, which can be denormalized. u Facts are generated by events that occurred in the past, and are unlikely to change, regardless of how they are analyzed. © Pearson Education Limited 1995, 2005 14

Dimensionality modeling u Bulk of data in data warehouse is in fact tables, which

Dimensionality modeling u Bulk of data in data warehouse is in fact tables, which can be extremely large. u Important to treat fact data as read-only reference data that will not change over time. u Most useful fact tables contain one or more numerical measures, or ‘facts’ that occur for each record and are numeric and additive. © Pearson Education Limited 1995, 2005 15

Dimensionality modeling u Dimension tables usually contain descriptive textual information. u Dimension attributes are

Dimensionality modeling u Dimension tables usually contain descriptive textual information. u Dimension attributes are used as the constraints in data warehouse queries. u Star schemas can be used to speed up query performance by denormalizing reference information into a single dimension table. © Pearson Education Limited 1995, 2005 16

Dimensionality modeling u Snowflake schema is a variant of the star schema where dimension

Dimensionality modeling u Snowflake schema is a variant of the star schema where dimension tables do not contain denormalized data. u Starflake schema is a hybrid structure that contains a mixture of star (denormalized) and snowflake (normalized) schemas. Allows dimensions to be present in both forms to cater for different query requirements. © Pearson Education Limited 1995, 2005 17

Property sales with normalized version of Branch dimension table © Pearson Education Limited 1995,

Property sales with normalized version of Branch dimension table © Pearson Education Limited 1995, 2005 18

Dimensionality modeling u Predictable and standard form of the underlying dimensional model offers important

Dimensionality modeling u Predictable and standard form of the underlying dimensional model offers important advantages: – Efficiency – Ability to handle changing requirements – Extensibility – Ability to model common business situations – Predictable query processing © Pearson Education Limited 1995, 2005 19

Comparison of DM and ER models u A single ER model normally decomposes into

Comparison of DM and ER models u A single ER model normally decomposes into multiple DMs. u Multiple DMs are then associated through ‘shared’ dimension tables. © Pearson Education Limited 1995, 2005 20

Database Design Methodology for Data Warehouses u ‘Nine-Step Methodology’ includes following steps: – –

Database Design Methodology for Data Warehouses u ‘Nine-Step Methodology’ includes following steps: – – – – – Choosing the process Choosing the grain Identifying and conforming the dimensions Choosing the facts Storing pre-calculations in the fact table Rounding out the dimension tables Choosing the duration of the database Tracking slowly changing dimensions Deciding the query priorities and the query modes © Pearson Education Limited 1995, 2005 21

Step 1: Choosing the process u The process (function) refers to the subject matter

Step 1: Choosing the process u The process (function) refers to the subject matter of a particular data mart. u First data mart built should be the one that is most likely to be delivered on time, within budget, and to answer the most commercially important business questions. © Pearson Education Limited 1995, 2005 22

ER model of an extended version of Dream. Home © Pearson Education Limited 1995,

ER model of an extended version of Dream. Home © Pearson Education Limited 1995, 2005 23

ER model of property sales business process of Dream. Home © Pearson Education Limited

ER model of property sales business process of Dream. Home © Pearson Education Limited 1995, 2005 24

Step 2: Choosing the grain u Decide what a record of the fact table

Step 2: Choosing the grain u Decide what a record of the fact table is to represents. u Identify dimensions of the fact table. The grain decision for the fact table also determines the grain of each dimension table. u Also include time as a core dimension, which is always present in star schemas. © Pearson Education Limited 1995, 2005 25

Step 3: Identifying and conforming the dimensions u Dimensions set the context for asking

Step 3: Identifying and conforming the dimensions u Dimensions set the context for asking questions about the facts in the fact table. u If any dimension occurs in two data marts, they must be exactly the same dimension, or one must be a mathematical subset of the other. u A dimension used in more than one data mart is referred to as being conformed. © Pearson Education Limited 1995, 2005 26

Star schemas for property sales and property advertising 27 © Pearson Education Limited 1995,

Star schemas for property sales and property advertising 27 © Pearson Education Limited 1995, 2005

Step 4: Choosing the facts u The grain of the fact table determines which

Step 4: Choosing the facts u The grain of the fact table determines which facts can be used in the data mart. u Facts should be numeric and additive. u Unusable facts include: – non-numeric facts – non-additive facts – fact at different granularity from other facts in table © Pearson Education Limited 1995, 2005 28

Property rentals with a badly structured fact table © Pearson Education Limited 1995, 2005

Property rentals with a badly structured fact table © Pearson Education Limited 1995, 2005 29

Property rentals with fact table corrected © Pearson Education Limited 1995, 2005 30

Property rentals with fact table corrected © Pearson Education Limited 1995, 2005 30

Step 5: Storing pre-calculations in the fact table u Once the facts have been

Step 5: Storing pre-calculations in the fact table u Once the facts have been selected each should be re -examined to determine whethere are opportunities to use pre-calculations. © Pearson Education Limited 1995, 2005 31

Step 6: Rounding out the dimension tables u Text descriptions are added to the

Step 6: Rounding out the dimension tables u Text descriptions are added to the dimension tables. u Text descriptions should be as intuitive and understandable to the users as possible. u Usefulness of a data mart is determined by the scope and nature of the attributes of the dimension tables. © Pearson Education Limited 1995, 2005 32

Step 7: Choosing the duration of the database u Duration measures how far back

Step 7: Choosing the duration of the database u Duration measures how far back in time the fact table goes. u Very large fact tables raise at least two very significant data warehouse design issues. – Often difficult to source increasing old data. – It is mandatory that the old versions of the important dimensions be used, not the most current versions. Known as the ‘Slowly Changing Dimension’ problem. © Pearson Education Limited 1995, 2005 33

Step 8: Tracking slowly changing dimensions u Slowly changing dimension problem means that the

Step 8: Tracking slowly changing dimensions u Slowly changing dimension problem means that the proper description of the old dimension data must be used with the old fact data. u Often, a generalized key must be assigned to important dimensions in order to distinguish multiple snapshots of dimensions over a period of time. © Pearson Education Limited 1995, 2005 34

Step 8: Tracking slowly changing dimensions u There are three basic types of slowly

Step 8: Tracking slowly changing dimensions u There are three basic types of slowly changing dimensions: – Type 1, where a changed dimension attribute is overwritten – Type 2, where a changed dimension attribute causes a new dimension record to be created – Type 3, where a changed dimension attribute causes an alternate attribute to be created so that both the old and new values of the attribute are simultaneously accessible in the same dimension record © Pearson Education Limited 1995, 2005 35

Step 9: Deciding the query priorities and the query modes u Most critical physical

Step 9: Deciding the query priorities and the query modes u Most critical physical design issues affecting the end-user’s perception includes: – physical sort order of the fact table on disk – presence of pre-stored summaries or aggregations u Additional physical design issues include administration, backup, indexing performance, and security. © Pearson Education Limited 1995, 2005 36

Database Design Methodology for Data Warehouses u Methodology designs a data mart that supports

Database Design Methodology for Data Warehouses u Methodology designs a data mart that supports the requirements of a particular business process and allows the easy integration with other related data marts to form the enterprise-wide data warehouse. u A dimensional model, which contains more than one fact table sharing one or more conformed dimension tables, is referred to as a fact constellation. © Pearson Education Limited 1995, 2005 37

 Fact and dimension tables for each business process of Dream. Home © Pearson

Fact and dimension tables for each business process of Dream. Home © Pearson Education Limited 1995, 2005 38

 Dimensional model (fact constellation) for the Dream. Home data warehouse © Pearson Education

Dimensional model (fact constellation) for the Dream. Home data warehouse © Pearson Education Limited 1995, 2005 39

Criteria for assessing the dimensionality of a data warehouse u Criteria proposed by Ralph

Criteria for assessing the dimensionality of a data warehouse u Criteria proposed by Ralph Kimball (2000) to measure the extent to which a system supports the dimensional view of data warehousing. u Twenty criteria divided into three broad groups: architecture, administration, and expression. © Pearson Education Limited 1995, 2005 40

Criteria for assessing the dimensionality of a data warehouse 41 © Pearson Education Limited

Criteria for assessing the dimensionality of a data warehouse 41 © Pearson Education Limited 1995, 2005

Criteria for assessing the dimensionality of a data warehouse u Architectural criteria describes the

Criteria for assessing the dimensionality of a data warehouse u Architectural criteria describes the way the entire system is organized. u Administration criteria are considered to be essential to the ‘smooth running’ of a dimensionally-oriented data warehouse. u Expression criteria are mostly analytic capabilities that are needed in real-life situations. © Pearson Education Limited 1995, 2005 42