Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 52 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
52
Dung lượng
0,98 MB
Nội dung
Contents
Overview 1
Understanding Dimension Basics 2
Shared vs. Private Dimensions 8
Working with Standard Dimensions 11
Basic Level Properties 13
Lab A: Creating a Standard Dimension 24
Lab B: Creating a Snowflake Dimension 28
Working with Parent-Child Dimensions 32
Lab C: Creating a Parent-Child Dimension 38
Review 45
Module 4:Building
Dimensions Usingthe
Dimension Editor
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Information in this document is subject to change -without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, the only
means of access is electronic, permission to print one copy is hereby granted.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
2000 Microsoft Corporation. All rights reserved.
Microsoft, BackOffice, MS-DOS, Windows, Windows NT, <plus other appropriate product
names or titles. Replace this example list with list of trademarks provided by copy editor.
Microsoft is listed first, followed by all other Microsoft trademarks in alphabetical order. > are
either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other
countries.
<This is where mention of specific, contractually obligated to, third party trademarks, which are
added by the Copy Editor>
The names of companies, products, people, characters, and/or data mentioned herein are fictitious
and are in no way intended to represent any real individual, company, product, or event, unless
otherwise noted.
Other product and company names mentioned herein may be the trademarks of their respective
owners.
Module4:BuildingDimensionsUsingtheDimensionEditor iii
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Instructor Notes
Dimensions are the fundamental beginning point for building an online
analytical processing (OLAP) cube in Microsoft
®
SQL Server
™
2000 Analysis
Services. Cubes contain multiple dimensions, which may be either shared or
private, star or snowflake, regular or parent-child.
In this module, students learn how to build dimensions by usingtheDimension
Editor. You dissect thebuilding blocks of dimensions for students in detail.
When they have completed this module, students will feel comfortable with all
aspects of dimension interfaces.
In the labs, students create two dimensions by usingtheDimensionEditor and
two dimensions by usingtheDimension Wizard. Students perform various
dimension enhancements, such as updating the Member Key Column
property, defining sort order, adding levels, and creating member properties.
After completing this module, students will be able to:
!
Understand dimension fundamentals.
!
Know when to use shared and private dimensions.
!
Describe the characteristics of standard dimensions.
!
Add level properties to dimensions.
!
Develop parent-child dimensions.
Materials and Preparation
This section lists the required materials and preparation tasks that you need to
teach this module.
Required Materials
To teach this module, you need the following materials:
!
Microsoft PowerPoint
®
file
2074A_04.ppt
Preparation Tasks
To prepare for this module, you should:
!
Read all the student materials.
!
Read the instructor notes and margin notes.
!
Complete the demonstration.
!
Practice the lecture presentation and demonstration.
!
Complete the labs.
!
Review the Trainer Preparation presentation for this module on the Trainer
Materials compact disc.
!
Review any relevant white papers that are located on the Trainer Materials
compact disc.
Presentation:
60 Minutes
Labs:
60 Minutes
iv Module4:BuildingDimensionsUsingtheDimensionEditor
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Demonstration: Creating a Star Schema Dimension
You can create dimensions quickly and easily by usingtheDimension Wizard.
While theDimension Wizard is a useful tool for many situations, the
Dimension Editor and the Cube Editor are the primary tools for defining and
modifying dimensions.
The following demonstration procedures provide information that will not fit in
the margin notes or are not appropriate for student notes.
!
To create a new database and define a data source
1. Open Analysis Manager and double-click the local server.
2. In Analysis Manager, right-click the local server, click New Database, type
Module 04 in the Database name box, and then click OK.
3. Double-click Module 04 to expand the database.
4. Right-click the Data Sources folder, and then click New Data Source.
5. On the Provider tab of the Data Link Properties dialog box, click
Microsoft OLE DB Provider for SQL Server, and then click Next.
6. Type localhost in the server name box, click Use Windows NT Integrated
security, click Module 04 in the Select the database on the server list, and
then click OK.
!
To create a new dimension
1. In theModule 04 database, right-click the Shared Dimensions folder, point
to New Dimension, and then click Editor.
2. Click State as thedimension table in the Choose a Dimension Table dialog
box, and then click OK.
The left side of theDimensionEditor is divided into two panes. The upper
left pane contains thedimension tree that displays levels as you design the
dimension. The lower left pane contains dimension properties. If you click
the Properties button, the Properties pane disappears or reappears,
depending on whether the pane is showing after you open theDimension
Editor.
3. In the Properties pane, the current name of thedimension is <New>. Type
State as the name, and then press ENTER.
The name of thedimension appears in thedimension tree.
4. Drag State_Name from the State table in the Schema pane onto the name
of the State dimension in thedimension tree.
This creates a new level in the dimension.
5. Click the State Name level in thedimension tree, type State in the Name
box on the Properties pane, and then press ENTER.
6. Click the Data tab at the bottom of the Schema pane. Double-click All
State and view the members in the State dimension.
7. On the toolbar, click Save, and then close theDimension Editor.
Demonstration:
5 Minutes
Module4:BuildingDimensionsUsingtheDimensionEditor v
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Other Activities
Difficult Questions
Below are difficult questions that students may ask you during the delivery of
this module and answers to the questions. These materials delve into subjects
that are within the scope of themodule but are not specifically addressed in the
content of the student notes.
1. How many dimensions are typically included in cubes?
Normal users cannot digest more than six or seven dimensions in an
OLAP report. For this reason, cube designers restrict the number of
dimensions in cubes based on user comprehension more often than
system limitations. Cubes typically contain four to ten dimensions in
production systems.
2. How does Analysis Services handle data sources for cubes that do not
contain a dimension, because thedimension information is stored in another
system?
You must have all dimension tables and fact tables existing in a single
relational data source before creating dimensions and cubes. If the
dimension exists in a separate system, you can use Data Transformation
Services (DTS) to move thedimension from the other system to the
source database. You must also be sure that the cube fact table contains
keys that map to thedimension table.
3. What options are available for sorting members, other than sorting by the
Member Key Column or the Member Name Column properties?
If neither the Member Key Column nor the Member Name Column of
a dimension provides the correct sort order, you can use a third column
to control the sort order. Simply add that column as a member
property to the level you want to sort. Member properties for a level
automatically appear in the Order by property list. If you build the
dimension by usingtheDimension Wizard, it gives you the option to
select any column from thedimension table to define the sort order, and
then the wizard automatically creates the member property for you.
4. What is the best practice for defining members based on expressions?
Use expressions as a last resort for defining members. The best practice
for updating members is to update the data source so that all systems
describe members in the same manner. However, you may have
difficulties updating the source database due to administrative policies
against such a practice or other external issues. Defining expressions in
the DimensionEditor allows you to update members without updating
the source database.
5. How can users view the default member of a dimension?
When you browse the cube in the Cube Browser, thedimensions in the
filter area default to a single member. This member is known as the
default member.
vi Module4:BuildingDimensionsUsingtheDimensionEditor
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Module Strategy
Use the following strategy to present this module:
!
Understanding Dimension Basics
Introduce dimensions and the role they play in cube design. Describe how
various user communities define and use dimensions. Define levels and
members and how they relate to each other. Review dimension and level
system limitations.
!
Shared vs. Private Dimensions
Describe shared dimensions, focusing on their characteristics and when to
incorporate them into cubes. Define private dimensions, comparing them to
shared dimensions throughout the discussion. Finish the shared dimension
and private dimension discussion with a summary statement of when to use
each type.
!
Working with Standard Dimensions
Define standard dimensions, focusing on the use of columns to determine
dimension levels. Demonstrate the creation of dimensions by usingthe
Dimension Editor.
!
Basic Level Properties
Describe the use of Member Key Columns and Member Name Columns
when creating dimensions. Discuss how you sort members in levels based
upon the key or the name. Introduce creating expressions in Member Key
Columns and Member Name Columns to change members. Focus on the
rules for creating valid expressions. Define ragged dimensions and how to
implement them in standard, balanced dimensions. Define snowflake
dimensions and compare them to star schema dimensions. Explain the
importance of the All level and discuss situations when not to use it in a
dimension. Define the default member and describe situations in which to
change it from its original setting.
!
Working with Parent-Child Dimensions
Introduce parent-child dimensions by giving an example of a situation in
which a parent-child dimension is used. Describe the structure of a parent-
child dimension. Explain that parent-child dimensions can have values in
the fact table at both the leaf level and at a parent level. Introduce the
Members with Data property and describe the three values it can have.
Explain that there are different options for displaying the levels in a parent-
child dimension, and finish up with a description of how the Skipped
Levels Column property allows you to create ragged hierarchies in parent-
child dimensions.
Module4:BuildingDimensionsUsingtheDimensionEditor 1
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Overview
!
Understanding Dimension Basics
!
Shared vs. Private Dimensions
!
Working with Standard Dimensions
!
Basic Level Properties
!
Working with Parent-Child Dimensions
Dimensions are the fundamental beginning point for building an online
analytical processing (OLAP) cube in Microsoft
®
SQL Server
™
2000 Analysis
Services. Cubes contain multiple dimensions, which may be either shared or
private, star or snowflake, regular or parent-child.
After completing this module, you will be able to:
!
Understand dimension fundamentals.
!
Know when to use shared and private dimensions.
!
Describe the characteristics of standard dimensions.
!
Add level properties to dimensions.
!
Develop parent-child dimensions.
Topic Objective
To provide an overview of
the module topics and
objectives.
Lead-in
In this module, you will learn
about theDimensionEditor
and how to use it to create
and manage dimensions.
2 Module4:BuildingDimensionsUsingtheDimensionEditor
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
#
##
#
Understanding Dimension Basics
!
Enabling Various Views
!
Understanding Levels and Members
!
Describing Familial Relationships
!
Reviewing Analysis Services Limits
A dimension contains levels and members organized into hierarchies. It
categorizes the numeric measures stored in a cube. A dimension provides users
with a great number of combinations and intersections with which to analyze
data. Each dimension describes an aspect of the users’ business and provides
intuitive and simple access to data. You design and build each dimension based
upon the business processes required by users.
A cube requires that you define at least one dimension in its schema. Each cube
can have up to 128 dimensions, depending on the business needs of the user
community.
In OLAP cubes, dimensions:
!
Provide a descriptive or analytical view of the key measures in the cube,
typically organized around one or more categories relevant to the business.
!
Are shared across multiple cubes that may differ across user communities.
Examples of commonly shared dimensions are geography, product, time,
customer, and scenario.
!
Contain varying degrees of summarization, called levels, by which data is
viewed. The levels, organized into hierarchies, are frequently described as
drill-down paths for the user in search of more specific answers.
Topic Objective
To introduce the concepts of
dimensions, levels, and
members.
Lead-in
A dimension contains levels
and members organized into
hierarchies. It categorizes
the numeric measures
stored in a cube.
Module4:BuildingDimensionsUsingtheDimensionEditor 3
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Enabling Various Views
Finance
Operations
Profit
by Division
by Country
by Month
by Actual/Budget
Revenue
by Product
by Region
by Sales Rep
by Quarter
Revenue
by Customer
by Industry
by Channel
by Week
Sales
Marketing
Volume
by Plant
by Shift
by Product
by Day
Analysis Server
OLAP cubes answer business questions for summarized data—for example,
what were revenues for all drink products in the northeast region in the second
quarter?
The above illustration shows an Analysis Server and four cubes accessed by
four separate user communities—Finance, Sales, Marketing, and Operations.
Each of the four groups views a different set of cube data because each group
has different business needs. Thedimensions defined for each user community
categorize the measures of the cube. Every measure is analyzed in terms of
every dimension in the cube.
An important word used to introduce each dimension is the word by. For
example, the Marketing users need to see Revenue:
!
By Customer
!
By Industry
!
By Channel
!
By Week
Marketing users can report on Revenue as it applies to any of the above
dimensions.
Topic Objective
To illustrate how different
groups of users use
dimensions.
Lead-in
Each of the four groups
contains a different view of
cube data defined by a user
community.
Delivery Tips
Describe each user
community as the slide
builds the groups one by
one.
Ask students to describe the
important business
processes and underlying
databases that they work
with. Then ask the students
to describe thedimensions
that would apply to the
processes or databases.
4 Module4:BuildingDimensionsUsingtheDimensionEditor
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Understanding Levels and Members
!
Product Dimension
!
Four Levels: All, Category, Sub-Category, Product
!
Category Members: Bread, Dairy, Meat
Dimensions consist of members organized into levels. This organization gives
users access to data at different levels of detail. The above illustration shows a
dimension, Product that contains the levels All, Category, Sub-Category, and
Product. Each level consists of members—for example, the Category level
consists of the members Bread, Dairy, and Meat.
When defining dimensions, you must understand which levels the users require.
In addition, you must determine the tables containing levels and members in the
relational data source.
In most cases, dimensions have different degrees of summarization or levels,
enabling drilling down and drilling up.
In a multidimensional database, levels:
!
Define the hierarchy of a dimension.
!
Are organized by degrees of summarization. For example, Country, State,
City, and Zip Code might each be levels in a Region dimension.
Users and their required business questions determine the number of
dimensions and the number of levels in a dimension.
Topic Objective
To review the terms level
and member and to explain
the importance of levels and
members in dimension
design.
Lead-in
Dimensions consist of
members, organized into
levels, and give users
access to data at different
levels of detail.
Review dimension level and
members. Quiz students on
the levels and members.
[...]... and then close theDimensionEditor ! To open the State dimension • In theModule 04 database, double-click the Shared Dimensions folder, right-click State, and then click Edit BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY 26 Module4:BuildingDimensionsUsingtheDimensionEditor ! To update the Member Key Column 1 In theDimension Editor, click the State level in the dimension. .. Module4:BuildingDimensionsUsingtheDimensionEditor # Shared vs Private Dimensions Topic Objective To introduce the concepts of shared and private dimensions ! Working with Shared Dimensions Lead-in ! Working with Private DimensionsDimensions are defined as either shared or private at the time they are created The goal of this section is to explain the differences between shared and private dimensions, ... ONLY Module4:BuildingDimensionsUsingtheDimensionEditor 27 ! To update the All level 1 In thedimension tree, click the State dimension 2 On the Advanced tab of the Properties pane, change the All Caption property setting from All State to North America, and then press ENTER 3 On theDimension Members pane, notice the North America member at the top of thedimension hierarchy ! To make the dimension. .. many situations, theDimensionEditor and the Cube Editor are the primary tools for defining and modifying dimensions In this demonstration, you will learn how to create a standard star schema dimension by usingtheDimensionEditor instead of theDimension Wizard BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY Module4:BuildingDimensionsUsingtheDimensionEditor 13 # Basic... Select the database on the server list, and then click OK ! To create a new dimension 1 In theModule 04 database, right-click the Shared Dimensions folder, point to New Dimension, and then click Editor 2 Click State as thedimension table in the Choose a Dimension Table dialog box, and then click OK The left side of theDimensionEditor is divided into two panes The upper left pane contains the dimension. .. Click the Order By box, and then click Key Tip If you build thedimension by usingtheDimension Wizard, it gives you the option to select any column from thedimension table to define the sort order, and then the wizard automatically creates the member property for you BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY Module4:BuildingDimensionsUsingtheDimension Editor. .. shared dimensions in the Analysis Manager interface by the sharing hand icon BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY 10 Module4:BuildingDimensionsUsingtheDimensionEditor Working with Private Dimensions Topic Objective To examine the characteristics of private dimensions ! ! Define thedimensions as private if it is unacceptable for the cube to be unavailable to the. .. as you design thedimensionThe lower left pane contains dimension properties If you click the Properties button, the Properties pane disappears or reappears, depending on whether the pane is showing after opening theDimensionEditor 3 In the Properties pane, the current name of thedimension is Type State as the name and then press ENTER The name of thedimension appears in thedimension tree... State_Name from the State table in the Schema pane onto the name of the State dimension in thedimension tree This creates a new level in thedimension 5 Select the State Name level in thedimension tree, type State in the Name box on the Properties pane, and then press ENTER 6 Click the Data tab at the bottom of the Schema pane Double-click All State and view the members in the State dimension 7 On the toolbar,... ONLY Module4:BuildingDimensionsUsingtheDimensionEditor 21 Understanding Snowflake Dimensions Topic Objective To describe and illustrate snowflake dimensionsDimension Tables Lead-in When a dimension in a database originates from more than one dimension table, thedimension is called a snowflake dimension Fact Table When a dimension in a database originates from more than one dimension table, the .
with. Then ask the students
to describe the dimensions
that would apply to the
processes or databases.
4 Module 4: Building Dimensions Using the Dimension. toolbar, click Save, and then close the Dimension Editor.
Demonstration:
5 Minutes
Module 4: Building Dimensions Using the Dimension Editor v
BETA MATERIALS