Professional Documents
Culture Documents
Contents
Introduction 1
Course Materials 2
Prerequisites 3
Course Outline 4
Course Outline (continued) 6
Microsoft Certified Professional Program 8
Facilities 10
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, your 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.
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 should be
listed.>
Other product and company names mentioned herein may be the trademarks of their respective
owners.
Instructor Notes
Presentation: The Introduction module provides students with an overview of the course
30 Minutes content, materials, and logistics for course 2074A, Designing and Implementing
OLAP Solutions with Microsoft SQL Server 2000.
Preparation Tasks
To prepare for this course, you must:
! Complete the Course Preparation Checklist that is included with the trainer
course materials.
Module Strategy
Use the following strategy to present this module:
! Course 2074A: Designing and Implementing OLAP Solutions with
Microsoft SQL Server 2000.
Show the slide that displays the course number and course title.
! Introduction
Welcome students to the course and introduce yourself. Provide a brief
overview of your background to establish credibility.
Have students introduce themselves and provide their backgrounds, product
experience, and expectations of the course.
Record student expectations on a white board or flip chart that you can
reference later in class.
! Course Materials
Explain the purpose of all materials used in this course.
Tell students that they will have an opportunity at the end of class to
provide feedback on the course and facilities by using the Microsoft Online
Evaluation System.
! Prerequisites
Provide the students with the list of prerequisites that they should have met
before taking this course. This is an opportunity for you to identify students
who may not have the appropriate background or experience to attend this
course.
! Course Outline
Provide an overview of each module and what students will learn.
Explain how this course will meet students’ expectations by relating the
information covered in individual modules to their expectations.
! Microsoft Certified Professional Program
Inform students about the Microsoft Certified Professional (MCP) program
and the various certification options.
! Facilities
Explain the facility information for the training site.
Introduction
Topic Objective
To introduce yourself,
establish credibility, meet ! Name
students, and set student
expectations for the course. ! Company Affiliation
Lead-in ! Title/Function
Good morning. Welcome to
Designing and Implementing ! Job Responsibility
OLAP Solutions Using
Microsoft SQL Server 2000. ! Database Design, Administration, and Implementation
Experience
My name is...
! Analysis Services or OLAP Experience
! Data Warehousing Experience
! Expectations for the Course
Introduce yourself.
Course Materials
Topic Objective
To identify and describe the
course materials.
Lead-in ! Name Card
We have provided ! Student Workbook
everything you need for this
course. You will find the ! Student Materials Compact Disc
following materials at your
desk... ! Course Evaluation
Describe the contents of the The following materials are included with your kit:
student workbook and the
Student Materials compact ! Name card. Write your name on both sides of the name card.
disc. ! Student workbook. The student workbook contains the material covered in
class, in addition to the hands-on lab exercises.
Have students write their
names on both sides of the ! Student Materials compact disc. The Student Materials compact disc
name card. contains the Web page that provides students with links to resources
pertaining to this course, including additional readings, review and lab
Tell students that a course answers, lab files, multimedia presentations, and course-related Web sites.
evaluation must be
completed at the end of the
Note To open the Web page, insert the Student Materials compact disc into
course.
the CD-ROM drive and then, in the root directory of the compact disc,
Tell students where they double-click Default.htm.
can send comments.
Delivery Tip ! Course evaluation. At the conclusion of this course, please complete the
Demonstrate how to open course evaluation to provide feedback on the instructor, course, and
the Web page provided on software product. Your comments will help us improve future courses.
the Student Materials
To provide additional comments on course materials, send e-mail to
compact disc. On the
Trainer Materials compact
mstrain@microsoft.com. Be sure to type Course 2074A in the subject line.
disc, double-click To provide additional comments or inquire about the Microsoft Certified
Default.htm in the Professional program, send e-mail to mcp@msprograms.com.
StudntCD folder.
Prerequisites
Topic Objective
To present and describe the
prerequisites for this course.
Lead-in ! Understanding of Basic Database Design,
The following prerequisite Administration, and Implementation Concepts
knowledge is needed for this
course.
! Experience with Microsoft Windows 2000
Course Outline
Topic Objective
To provide an overview of
each module and what ! Module 1: Introduction to Data Warehousing and OLAP
students will learn. ! Module 2: Introducing Analysis Manager Wizards
Lead-in ! Module 3: Understanding Analysis Services Architecture
In this course, we will
cover... ! Module 4: Building Dimensions Using the Dimension Editor
! Module 5: Using Advanced Dimension Settings
! Module 6: Working with Cubes and Measures
! Module 7: Case Study—Creating the Store Expense Cube
! Module 8: Managing Storage and Optimization
! Module 9: Processing Dimensions and Cubes
Module 14, “Using Actions, Drillthrough, and Writeback,” teaches you how to
implement three important features: actions, drillthrough, and writeback. At the
end of this module, you will be able to create and view actions, implement and
test drillthrough, and describe the applications for cube writeback.
Module 15, “Implementing Security,” teaches you how to implement security in
Analysis Services. At the end of this module, you will be able to understand the
use of security, explain administrator security, and describe authentication
methods. You also will be able to assign database roles, apply dimension
security, and manage cube roles.
Module 16, “Deploying an OLAP Solution,” explains how to automate cube
processing, copy server objects, and move databases from testing to production
environments. After completing this module, you will be able to describe the
role of Data Transformation Services (DTS), create a DTS package, and define
an Analysis Services processing task. You also will be able to copy, archive,
and restore OLAP databases.
Module 17, “Introduction to Data Mining,” introduces you to data mining
principles and applications while you explore the wizard-driven interface for
creating data mining models. After completing this module, you will be able to
describe data mining characteristics, applications, and modeling techniques,
describe the process of training your model, and use the OLAP Mining Model
Wizard to edit, process, and explore the decision trees. You also will be able to
analyze relational data relationships in the dependency network browser,
describe the steps required to build a clustering model by using OLAP data, and
use the Relational Mining Model Wizard to edit, process, and browse a
clustering model.
Module 18, “Case Study—Working with the Foodmart Database,” is a case
study covering material from the earlier modules. In this module, you use
various cube and dimension techniques to build cubes from the Foodmart 2000
database by using Analysis Services. After completing this module, you will be
able to create a cube based on user requirements. You also will be able to build
a virtual cube.
Microsoft Certified Systems MCSEs with a specialty in Internet technologies are qualified to enhance, deploy,
Engineer + Internet and manage intranet and Internet solutions that include a browser, proxy server, host
(MCSE + Internet) servers, database, messaging, and commerce components. An MCSE + Internet
certified professional also manages and analyzes Web sites.
Microsoft Certified Systems MCSEs are qualified to effectively plan, implement, maintain, and support
Engineer information systems in a wide range of computing environments with Microsoft®
(MCSE) Windows NT® Server and Microsoft BackOffice®.
Microsoft Certified MCDBAs are qualified to derive physical database designs, develop logical data
Database Administrator models, create physical databases, create data services by using Transact-SQL,
(MCDBA) manage and maintain databases, configure and manage security, monitor and
optimize databases and install and configure Microsoft SQL Server.
Microsoft Certified Solution MCSDs are qualified to build Web-based, distributed, and commerce applications by
Developer using Microsoft products, such as Microsoft SQL Server, Microsoft Visual Studio®,
(MCSD) and Component Services.
Microsoft Certified MCPs with a specialty in site building are qualified to plan, build, maintain, and
Professional + Site Building manage Web sites by using Microsoft technologies and products.
(MCP + Site Building)
Microsoft Certified MCPs with a specialty in the Internet are qualified to plan security, install and
Professional + Internet configure server products, manage server resources, extend servers to run Common
(MCP + Internet) Gateway Interface (CGI) scripts or Internet Server Application Programming Inter-
face (ISAPI) scripts, monitor and analyze performance, and troubleshoot problems.
Microsoft Certified MCPs demonstrate in-depth knowledge of at least one product by passing any one
Professional (MCP) exam (except Networking Essentials).
Microsoft Certified Trainer MCTs demonstrate the instructional and technical skills that qualify them to deliver
(MCT) Microsoft Official Curriculum through Microsoft Certified Technical Education
Centers (Microsoft CTEC).
Certification Requirements
The certification requirements differ for each certification category and are
specific to the products and job functions addressed by the certification. To
become a Microsoft Certified Professional, you must pass rigorous certification
exams that provide a valid and reliable measure of technical proficiency and
expertise.
The following table describes exam requirements.
Certification Exam requirements
MCSE + Internet Pass seven core exams and two elective exams.
MCSE Pass four core exams and two elective exams.
MCDBA Pass four core exams and one elective exam.
MCSD Pass three core exams and one elective exam.
MCP + Site Building Pass two core exams.
MCP + Internet Pass three core exams.
MCP Pass one exam (except Networking Essentials).
MCT Required to meet instructional and technical requirements
specific to each Microsoft Official Curriculum course they
are certified to deliver.1
For More Information See the “Certification” section of the Web page provided
on the compact disc or the Microsoft Training and Certification Web site at
http://www.microsoft.com/train_cert/
You can also send e-mail to mcp@msprograms.com if you have specific
certification questions.
1
Inside the United States and Canada, call (800) 636-7544 for more information on becoming a
Microsoft Certified Trainer. Outside the United States and Canada, contact your local Microsoft
subsidiary.
Facilities
Topic Objective
To inform students of class Class Hours
logistics and rules for the
training site.
Lead-in Building Hours Phones
Before we start, let’s go over
the class logistics.
Parking Messages
Meals Recycling
Overview 1
Introducing Data Warehousing 2
Defining OLAP Solutions 11
Understanding Data Warehouse Design 18
Understanding OLAP Models 24
Applying OLAP Cubes 32
Review 40
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, your 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.
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.
Instructor Notes
Presentation: This module introduces students to data warehousing and online analytical
60 Minutes processing (OLAP)—their uses, essential concepts, terminology, and
architecture.
Lab:
00 Minutes The module describes the value of deriving business information from raw
operational data, and the process of using defined types of business analysis to
drive decision support systems. The module introduces data warehouses and
OLAP systems and describes the differences between relational data marts and
OLAP cubes.
Finally, the module introduces OLAP technology. Students will learn the
fundamentals of dimensions, members, and cubes. The materials also explore
methods for visualizing multidimensional databases.
After completing this module, students will be able to:
! Describe characteristics, goals, and applications of a data warehouse.
! Understand the need of and use for OLAP solutions.
! Describe data warehouse design.
! Understand the reasons for implementing OLAP models and describe their
components.
! Visualize a multidimensional database.
Required Materials
To teach this module, you need the following materials:
! Microsoft® PowerPoint® file 2074A_01.ppt
! Microsoft Excel file DEMO_01.xls
! Local cube file DEMO_01.cub
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read the instructor notes and margin notes.
! Practice the lecture presentation and demonstration.
! Review the Trainer Preparation presentation for this module on the Trainer
Materials compact disc.
! Review any relevant white papers that are on the Trainer Materials compact
disc.
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 the module but are not specifically addressed in the
content of the student notes.
1. Is a data mart synonymous with a star schema?
Not necessarily. The data mart is a subset of a data warehouse with
data specific to a particular subject or business activity. It can be
relational or multidimensional.
A relational data mart may have one or many star schemas that belong
to the data mart and contain data particular to a subject.
Multidimensional data marts use star schemas behind the scenes to
support multidimensional data structures called cubes.
2. Are data marts only composed of summary data?
No. Data marts can contain detailed data in addition to summarized
data. Using summarized data marts is a way to enhance query
performance.
3. Do you need to purchase Microsoft SQL Server™ 2000 in order to use
Microsoft SQL Server 2000 Analysis Services?
Yes. Analysis Services is bundled with SQL Server. However, you can
install Analysis Services without using—or installing—SQL Server.
4. What are reasons to use OLAP technology instead of relational database
technology?
OLAP technology provides fast, intuitive access to numeric data. It
gives users the ability to browse the database themselves, without
needing intermediate parties to develop queries. OLAP technology
provides a central calculation engine to model complex business models
and processes.
5. Is Measures a dimension?
When administering a cube, Measures are treated differently from
dimensions. When browsing a cube and when using MDX, Measures is
simply a dimension with only one level—and no All level.
6. Is a cell that is empty—that is, it has no value—still a cell?
Yes. The intersection of a member from each dimension forms a cell,
whether that cell is populated or not. The cell does not take any
physical storage space, but a cube is a logical construct and does not
reflect the physical storage.
Module Strategy
Use the following strategy to present this module:
! Introducing Data Warehousing
Present the differences between raw data and information. Describe the
characteristics of online transaction processing (OLTP) source systems and
give some examples of OLTP systems. Present the characteristics of a data
warehouse and describe the components of a data warehouse system.
! Defining OLAP Solutions
Begin by introducing the basic characteristics of OLAP databases. Give
examples of common OLAP applications. Explain the differences between
relational data marts and OLAP cubes in terms of data storage, data content,
data sources, and data retrieval. Finally, introduce OLAP in
SQL Server 2000 and discuss its two main OLAP components—the
SQL Server database and Analysis Services.
! Understanding Data Warehouse Design
Introduce the concept of a star schema and describe its characteristics. Next,
present the components of a fact table—foreign keys and measures—and
explain the concept of the fact table grain. Describe the characteristics of
dimension tables and give examples from a data warehouse. Finally, define
a snowflake schema as a variation of a star schema in which hierarchies are
stored in dimension tables.
! Understanding OLAP Models
Define the key components of the OLAP database—measures, dimensions,
and cubes. Compare OLAP dimensions and relational dimensions. Next,
define the components of a dimension—levels and members—giving
examples of each. Discuss the family terms that describe the relationships
between levels and members in a dimension. Describe the characteristics of
measures. Finally, to summarize the requirements for building OLAP cubes
by using relational data sources, discuss how the relational source relates to
the OLAP cube.
! Applying OLAP Cubes
Define a cube as the logical storage structure for an OLAP database.
Explain that each cell of a cube holds one value. Describe how users isolate
data with a cube. Introduce the concepts of slicing and dicing data in a cube,
and drilling up and drilling down through the levels in a hierarchy. Discuss
the visualization of multidimensional data, using spreadsheets to illustrate
the concept. Finally, connect to an OLAP cube by using a Microsoft Excel
PivotChart® to demonstrate the power of OLAP.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Introducing Data Warehousing
Lead-in ! Defining OLAP Solutions
In this module, you will learn
about data warehousing, ! Understanding Data Warehouse Design
OLAP systems, and OLAP
cube fundamentals. ! Understanding OLAP Models
! Applying OLAP Cubes
This section defines the differences between raw data and derived information,
describes online transaction processing (OLTP) systems, and introduces data
warehouse systems. An understanding of data warehouse system components is
important when you begin to design and implement decision support systems.
The following topics are discussed:
! Raw data versus business information
! OLTP source systems
! Data warehouse characteristics
! Data warehouse system components
Turning raw data into valuable information is a core analysis process that drives
Delivery Tip the operations and business decisions of a company.
Ask students about the
types of systems that they
work with that capture raw Capturing Raw Data
data, derive business A company typically captures large amounts of data daily. This data often
information, and turn data
consists of raw facts that reflect the current state of the business.
into information.
Examples of raw data include:
! An international retail music store chain captures sales data for every
product purchase, return, and exchange around the world. A raw fact may
describe the Chicago branch of this music store selling $10,000 worth of
merchandise in June of 2000.
! A financial institution captures data for each customer’s checking and
savings account. A raw data fact may describe Stefan Knorr withdrawing
$50 from his checking account this morning in Amsterdam.
On the surface, this data provides an indication of what happens in the business.
However, the captured data can perform many more functions. The captured
data can help a company understand how it currently operates and help a
company plan its operations in the future.
By using this process, consider how the raw data from the previous examples is
converted to valuable business information.
The Chicago Music Store
Raw Data: The Chicago branch of this music store sold $10,000 worth of
merchandise in June 2000. However, the Chicago branch sold $15,000 in June
1999. The Chicago branch sales goal for June 2000 is $20,000.
Derived Information: It appears as if the Chicago branch did not meet its sales
goal for June 2000 and did not perform as well as the previous year. Business
analysis is now required to determine the cause of the decline in sales.
Typical business questions arising from this analysis include:
! What products are selling in the Chicago store?
! What products are not selling?
! What is the effect of product promotions?
A data warehouse system has components that move data from a source system
to users who want to perform data analysis. The primary function of a data
warehouse system is to support an organization’s business analysis processes.
A data warehouse:
! Provides data for business analysis processes.
A data warehouse is a data store that supports an organization’s business
analysis processes. Often, it is implemented as an enterprise-wide decision
support system, installed to provide a reporting environment that facilitates
data analysis by providing extensive decision support capabilities.
! Integrates data from heterogeneous source systems.
Operational systems and, sometimes, external systems are the sources for
data warehouses. These heterogeneous source systems can contain
transformed and integrated source data from OLTP systems, previous-
version systems, text files, and spreadsheets.
! Combines validated source data.
A data warehouse combines heterogeneous source data that has been
authenticated according to previously defined business rules. It is important
that the integrity of data in a data warehouse meet the standards of the
business rules and processes.
Data Input
Data Access
Delivery Tips The data warehouse system contains several components that transfer data from
Use this slide to introduce a source system to users who want to perform data analysis. It is important to
OLAP solutions and data understand the role of a data warehouse system and where it persists in the data
marts and to transition into flow of an organization.
the next section that
describes OLAP solutions. User Data Access
Use the slide to explain The purpose of a data warehouse in an organization is to expose business
each of the data warehouse information to users. Users analyze data to derive business information and
system components and the thereby make decisions. The data that users are interested in is the data from
relationships of the operational source systems.
components.
Even though users require the data in these source systems, directly accessing a
Before explaining the above source system can lead to several problems. Because source systems are
slide, review Displaying the optimized for the inserts and updates associated with essential business
Animated PowerPoint Slides operations, user data access queries often burden and interfere with essential
in the Other Activities business processes. In addition, because these systems are constantly changing,
section of the Instructor you will find that user data retrieval can produce differing results and lead to
Notes. inconsistent reports.
Given the limitations of source system reporting, the best way to meet the
business analysis needs of an organization is to use a data warehouse. The
transfer of data from the source system to users becomes the primary function
of the data warehouse system.
Important The transfer of data from source system to user is the critical path of
a data warehouse system.
Data Sources
Source systems are known as OLTP systems or legacy systems in a mainframe
environment. Source systems are the operational systems that capture the
transactions of a business and supply data to the data warehouse or data mart.
A source system can be relational or non-relational. Source systems do not
generally contain large amounts of historical information, as they are
continually updated to reflect the current state of the business.
Staging Area
The staging area, or data preparation area, is a collection of processes that
cleans, transforms, combines, and prepares source data for use in the data
warehouse or data mart. In a staging area, source system data is transformed
into common formats, checked for consistency and referential integrity, and
prepared to load into the data warehouse database. A staging area:
! Is on one or several computers.
! May not be based on relational technologies.
! Does not support user reporting.
Data Marts
The data mart is a subset of a data warehouse with data specific to a particular
subject or business activity, such as finance or customer analysis. Data marts:
! Can be included (one or many subject-specific data marts) in a data
warehouse.
! Can be built in relational or OLAP databases.
! Can contain detailed or summarized data, which may or may not be shared
across data marts.
Note The definition of a data mart can vary. In this course, the data mart is a
subset of a data warehouse with data specific to a particular subject or business
activity. The data marts you will create in this course will be OLAP databases.
Data Warehouse
In this course, the data warehouse is defined as a virtual union of data marts
with integrated information that is shared across data marts. In other
circumstances, a data warehouse may be defined as a centralized, integrated
data store providing data to the data marts. Either definition is correct.
In the previous section, you learned about data warehousing and the flow of
data from source systems to users. This section focuses on one area of the data
warehouse—the OLAP database. The section introduces OLAP databases,
describes common applications implemented by using OLAP technology,
differentiates relational data marts and OLAP cubes, and describes the OLAP
database solution available in Microsoft® SQL Server™ 2000.
OLAP Databases
Topic Objective
To introduce the
fundamental characteristics
of OLAP databases. ! Optimized Schema for Fast User Queries
Lead-in ! Robust Calculation Engine for Numeric Analysis
OLAP database technology
provides an alternative to ! Conceptual, Intuitive Data Model
relational database
technology, offering fast, ! Multidimensional View of Data
flexible data viewing,
analysis, and navigation. $ Drill down and drill up
$ Pivot views of data
Relational
Relational and
and Relational
Relational and
and
Data
Data Sources
Sources Non-relational
Non-relational Sources
Sources Non-relational
Non-relational Sources
Sources
Fast
Fast Performance
Performance for
for Faster
Faster Performance
Performance for
for
Data
Data Retrieval
Retrieval Data
Data Extract
Extract Queries
Queries Data
Data Extract
Extract Queries
Queries
Most organizations use a combination of relational data marts and OLAP cubes
Point out that the table to meet their decision support needs.
presents a a general
comparison. The Given their common decision support goals, relational data marts and OLAP
comparision points may vary cubes differ greatly in data storage, data content, data sources, data retrieval,
depending on the particular and business analysis capabilities.
relational or OLAP
technology.
Data Storage
Ask students to participate Relational data marts and OLAP cubes differ in how they store data:
in a comparision discussion.
! Relational data marts store data in structures supported by relational
database technologies.
! OLAP cubes store data in multidimensional structures. These structures can
use both relational and multidimensional database technologies.
Data Content
Relational data marts and OLAP cubes differ in their data content:
! Relational data marts store detailed and summarized data in relational
structures.
! OLAP cubes store summarized data in n-dimensional structures.
Data Sources
Relational data marts and OLAP cubes differ in how they are sourced:
! Relational data marts can centralize source data from one or many
heterogeneous source systems that may or may not be relational.
! OLAP cubes can be sourced from relational or non-relational sources, and
most often originate from detailed, relational data marts.
Data Retrieval
Relational data marts and OLAP cubes differ in how they retrieve data:
! Relational data mart structures are optimized for data retrieval.
! OLAP cube structures are also optimized for data retrieval. Because
aggregated data is stored in these n-dimensional structures, query
performance exceeds that of relational data marts.
Analysis Services includes multiple types of OLAP storage schemes, such as:
! Multidimensional OLAP (MOLAP). Data is stored in and retrieved from
cube structures that are separate from the relational database source of
information.
! Relational OLAP (ROLAP). Data is stored in and retrieved from a relational
database.
! Hybrid OLAP (HOLAP). Data is stored in and retrieved from a combination
of multidimensional cube structures and relational database tables.
Before you can create an OLAP database and understand its components, you
must first understand the data warehouse components that you use to build the
OLAP databases.
This section describes data warehouse design concepts including the star
schema, fact tables, and dimension tables. It is important to understand how all
the elements interact, because you define OLAP cubes from these data
warehouse components.
This section discusses the following components:
! The star schema
! Fact table components
! Dimension characteristics
! The snowflake schema
Shipper_Dim
Shipper_Dim Customer_Dim
Customer_Dim
ShipperKey
ShipperKey CustomerKey
CustomerKey
ShipperID
ShipperID CustomerID
CustomerID
...
... ...
...
Introduce the concept of the To facilitate data retrieval and analysis, a data warehouse physically organizes
star schema and explain data into easy-to-use structures called star schemas. A data warehouse made up
that OLAP cubes use star of subject-oriented data marts uses one or more star schemas to represent
schemas as their data specific business events or processes.
sources.
A star schema is characterized as having one central fact table surrounded by
many dimension tables that contain denormalized descriptions of the facts.
The following items are characteristics of a star schema:
! The center of the star is the fact table (Sales_Fact).
A fact table contains business metrics—measures—that describe specific
events in a business, such as bank transactions or product sales. It can also
contain aggregated data, such as sales that are summarized at the monthly
level from daily transactions.
! The points of the star are the dimensional tables (Employee_Dim,
Product_Dim, Customer_Dim, Shipper_Dim, and Time_Dim).
These points of the star are used to describe the information that exists in a
specific business process and to provide context for the numeric data. In the
retail sales example in the preceding illustration, the dimension tables
describe how sales data is measured.
! The grain of the fact table is a one-sentence definition of what the fact table
represents. This fact table contains daily sales data by product, employee,
shipper, and customer.
OLAP cubes use star schemas as their data sources. Therefore, a star schema
must be present before you can create an OLAP cube in Analysis Services.
time_dim
time_dim
134
134 1/1/2000
1/1/2000
The grain of the sales_fact table is defined by the lowest
level of detail stored in each dimension
The fact table is a central table in a star schema that presents numeric data in
Delivery Tips the context of business entities. The fact table is principally made up of
Use the example in the measures and foreign keys.
preceding illustration to
explain the components of
fact tables.
Measures
A measure is a quantitative, numerical column in the fact table. Measures
Point out the major typically represent the values that are analyzed, such as unit sales or number of
components of the fact employees. Measures are generally additive and numeric because these values
table: foreign keys and are the bases from which you can perform calculations.
measures.
In the preceding illustration, the measures in the sales_fact table are
Use the data in the slide to quantity_sales and amount_sales. These measures are additive across all
show how each foreign key dimensions.
relates to a primary key in a
dimension table.
Foreign Keys
A foreign key is the representation of a dimension’s primary key in the fact
table. Foreign keys are taken from the primary keys of each dimension table.
The combination of these keys is typically the unique identifier for each fact
table record.
In the slide, the foreign keys are the customer_key, product_key, and
time_key fields.
Note Note that fact tables can also contain additional facts that are not foreign
keys or measures. These facts provide additional descriptive information to the
fact table record, such as data lineage information.
Tip Typically, the fact table grain is the lowest level of detail stored in each of
the dimensions associated with the fact table
In the slide, the grain of the sales_fact table is sales data by customer ID,
product ID, and order date. These represent the lowest level of detail in the
customer_dim, product_dim, and time_dim dimensions.
In the previous section, you learned about data warehouse design concepts.
Now, you will learn how to apply those concepts to the design and creation of
OLAP models.
This section describes OLAP models and their components. You will learn
about the components that define an OLAP database, the difference between
OLAP and relational dimensions, the fundamentals of OLAP dimensions,
family relationship terms used to describe dimensions, the definition of cube
measures, and the relational data sources of cubes.
Describe OLAP dimensions In order to understand OLAP dimensions, it is important to recognize the
as being the logical differences between OLAP and relational dimensions:
equivalent of relational
domains. This helps ! OLAP dimensions are usually stored in structures that are completely
students who come from a different and separate from relational tables. These structures are very fast
relational background. to query.
Note You have the ability in Analysis Services to create dimensions that
store their structures in relational tables. These dimensions are known as
ROLAP dimensions and are discussion in module 9, “Processing
Dimensions and Cubes,” in course 2074A, Designing and Implementing
OLAP Solutions with Microsoft SQL Server 2000.
! Relational dimensions are stored in relational tables. For example, the two
tables Region and State store the relational dimension of Region.
! Users navigate easily through OLAP dimensions. To move from level to
level, a user simply double-clicks in the front-end application. For example,
to move from East to East’s children, users double-click East to move to
MA and NY.
! Tables are less intuitive for users as they navigate through relational
dimensions. Therefore, organizations purchase or develop front-end
applications to assist in relational dimension access. These applications
perform SQL-generated queries hidden from the user to provide the same
behavior as OLAP reports.
! The hierarchical structures and relationships of relational dimensions are not
as apparent as they are in OLAP dimensions.
! Relational dimension tables contain information that is not applicable to
user queries. For example, a dimension table contains a primary key, foreign
keys, and attributes. OLAP dimensions, on the surface, only contain
information used by users and their queries.
Dimension Fundamentals
Topic Objective
To present OLAP dimension
fundamentals
Lead-in
An OLAP dimension
consists of levels and
members.
Use the time dimension in An OLAP dimension is made up of levels and members. These components
the slide to define levels and map to the dimension tables found in the OLAP cube’s data source.
members.
Dimensions contain the hierarchical elements that are shown in the following
table.
Dimension Element Definition
Members of the dimension are the years—1999, 2000, and 2001—and the
quarters and months—for example, Quarter 1 and January.
Cube Measures
Topic Objective
To describe the
characteristics of cube
measures. ! Are the Numeric Values of Principle Interest
Lead-in ! Correspond to Fact Table Facts
Measures are the numeric
values of principle interest to ! Intersect All Dimensions at All Levels
users.
! Are Aggregated at All Levels of Detail
! Form a Dimension
Measures are the numeric values that users analyze. Every cube must contain at
least one measure, but cannot have more than 1,024 measures total.
The following are true of measures:
! Measures must be numeric.
! Measures correspond to fact table facts. Only one fact table can be used to
design a cube. Therefore, measures can only come from one table in the
cube’s data source.
! Measures intersect all dimensions at all levels.
! Measures are aggregated at all levels of detail across all dimensions. For
example, a Sales measure can be accessed at the monthly, quarterly, and
year total levels of the Time dimension, in addition to all levels in all other
dimensions of the cube.
! All cubes by definition contain a Measures dimension. You can think of the
measures in a cube as members of the Measures dimension.
Note The Measure dimension contains only one level. In other words, the
measure dimension does not contain a hierarchy.
Use this slide to summarize Analysis Services creates a new layer on top of an existing relational
the requirements for building warehouse. The purpose of that new layer is to make access to the data very fast
OLAP cubes by using and very flexible.
relational data sources.
Star and Snowflake Schema
Before you build a cube with Analysis Server, your source data must be staged
in a relational database, in a star or snowflake schema. To use Analysis Services
successfully, you must know what Analysis Services expects the data
warehouse to look like.
If students are confused at
this point, let them know that Fact Table
the process of creating To be usable by Analysis Services, the fact table in the cube data source must
cubes reinforces all these contain a column for each measure. In addition, the fact table must contain
data source requirements. dimension keys that join to dimension tables.
The fact table must contain rows at the lowest level of detail you might want to
retrieve for a measure. In other words, the fact table contains rows only for the
lowest level of members of each dimension. Analysis Services cannot use a fact
table that stores aggregates, such as quarter and year totals.
Dimension Tables
From an OLAP perspective, dimension tables serve three purposes. A
dimension table:
! Contains member names.
! Contains the hierarchy definition.
! Contains other attributes.
Dimension tables must exist in the same database as the fact table. Some
organizations store dimensional information in separate, isolated data sources.
In such cases, all information must be consolidated into one data source before
developing Analysis Services OLAP cubes.
In the data warehouse, the primary key column for a dimension table must
contain a unique value for each member of the dimension. The primary key
column of each dimension table must match one of the key columns in the
related fact table. Each key value that appears once in the dimension table will
appear multiple times in the fact table.
Defining a Cube
Topic Objective
To introduce the concept of
a cube.
Lead-in
Cubes are the logical
storage structures for OLAP
Atlanta
databases.
Market Dimension
Chicago
Denver
Grapes
ion
Cherries
ns
me
Detroit Melons
Di
Apples
ts
uc
Q1 Q2 Q3 Q4
od
Pr
Time Dimension
The next few slides highlight Cubes are the logical storage structures for OLAP databases. They combine
query patterns of users by dimensions and measures into intuitive and flexible models that users
using the example cube manipulate to create queries.
introduced here. Use this
slide to define the cube and A cube defines a set of related dimensions that form an n-dimensional grid:
to describe the three
dimensions in this example. ! Each cell of the cube holds one value, exactly like a spreadsheet.
! The value of each cell is an intersection of the dimensions.
The cube in the preceding illustration stores sales for all products, all markets,
and for all time periods. To retrieve an annual total, users choose a product and
a market, and sum up the four quarterly cells to retrieve the annual sales.
Querying a Cube
Topic Objective
To demonstrate how users
isolate data with cubes.
Lead-in
Users must be able to
isolate the data in which Sales
Atlanta
Fact
Markets Dimension
they are interested, in an
intuitive and timely manner.
Chicago
Denver
Grapes
Cherries
Dallas
n
Melons
sio
Apples
n
me
Q4
Di
Q1 Q2 Q3
ts
uc
Time Dimension
od
Pr
The Sales cube in the illustration contains three dimensions:
Delivery Tip
This slide builds a query in ! Time
the following order:
1. Apples ! Products
2. Q4 ! Markets
3. Atlanta
4. Sales Fact
Sales facts are stored at the intersections of all dimensions in the cube. Users
When you press the ENTER typically want to see only the data applicable to their market, to the products
key, the first three steps of they manage, and in time periods relevant to their business questions.
the query highlight in the
above order. The Sales
A user who manages Apples in the Atlanta region wants to query the cube for
Fact intersection appears Q4 Sales values. The user can easily query this information without having to
automatically if you do not sift through all the other cube data.
press ENTER.
Note Many times users cannot see other members and data because they do not
have security access to those members and data values.
Markets Dimension
Cherry data across all time
periods, for all markets.
Chicago
Denver
Grapes
Cherries
ion
Detroit Melons
ns
Apples
me
Di
Q1 Q2 Q3 Q4
ts
uc
Time Dimension
od
Pr
This slide is not a build The term slice is used in cubes to define a member or group of members that
slide. When delivering this are isolated and then evaluated across other dimensions. You can think of a
slide, define the term slice in slice as being a subset of a cube.
the context of the Cherry
distribution manager. The manager of Cherry distribution wants to view Cherry data across all time
periods, for all markets. The manager queries a slice of the cube to analyze
Cherries across all members of all other dimensions.
The term slice is also used as a verb, indicating the act of querying a subset of a
cube. For example, the Cherry manager slices the cube, analyzing the Cherry
sales for all markets across all time periods.
Key Points
The word cube implies three
dimensions. In reality, an
OLAP cube is n-
dimensional.
Even though the model contains three dimensions, it still is true that every
member intersects with every member of the other dimensions.
Suppose you add a fourth dimension—Employee—consisting of four members:
Jones, Phelps, Smith, and Williams. The cube can be visualized by using
multiple, multi-sheet workbooks:
Lead-in 6000
Category Subcategory
To fully understand the power of OLAP technology, you must observe a client
Delivery Tips application connecting to an OLAP cube. Microsoft Excel 2000 PivotTables®
Click the chart in the slide
during your presentation to
and PivotCharts® connect to Analysis Services OLAP cubes and provide users
automatically connect to a with a flexible and intuitive interface to use when accessing OLAP data.
local cube file located in
When you connect to a cube, you can:
C:\Moc\2074A\Demo\
DEMO_01.cub. ! Drill up and drill down dimension hierarchies by using the mouse.
The PivotChart ! Easily change the axes in which dimensions reside.
automatically opens and you ! Select individual members to slice dimensions.
can navigate the cube in the
chart. When you drill down, ! View several members in a single dimension.
select other members, and
so on, the chart Without OLAP technology, you create an endless number of separate reports to
automatically connects to perform the same analysis that simple mouse-clicks achieve in OLAP. OLAP
the cube file. If the cube file solutions reduce the need for standard reports, report writers, SQL query
does not exist in the defined
syntax, long query times, and report printouts.
location, the chart prompts
you to connect to the proper
cube source.
Review
Topic Objective
To reinforce module
objectives by reviewing key ! Introducing Data Warehousing
points.
! Defining OLAP Solutions
Lead-in
The review questions cover ! Understanding Data Warehouse Design
some of the key concepts
taught in the module. ! Understanding OLAP Models
! Applying OLAP Cubes
3. Describe the differences between relational data marts and OLAP cubes.
Relational data marts store detailed and summarized data in two-
dimensional structures, optimized for data retrieval. Relational data
marts tend to store more detailed data than multidimensional data
marts.
Multidimensional data marts contain data in n-multidimensional
structures. Because aggregated data is stored in these n-dimensional
structures, query performance exceeds that of relational data marts.
4. Define the main relational components from which you build an OLAP
cube.
Fact table—A central table in a data warehouse or data mart
presenting numeric data in a context that describes a specific event in a
business
Measure—A quantitative, numerical column in a fact table. Measures
typically represent the values that users analyze.
Dimension table—A table in a data warehouse or data mart
representing a business entity.
Overview 1
Defining Terms 2
Previewing Analysis Manager 3
Preparing to Create a Cube 5
Building the Sales Cube 11
Processing the Cube 23
Viewing the Results 24
Review 27
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, your 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.
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.
Required Materials
To teach this module, you need Microsoft PowerPoint® file 2074A_02.ppt.
Preparation Tasks
To prepare for this module, you should:
! Read all of the student materials for this module.
! Read the instructor notes and margin notes.
! Practice combining the lecture with the demonstrations.
! 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.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Defining Terms
Lead-in ! Previewing Analysis Manager
In this module, you will learn
about the fundamentals of ! Preparing to Create a Cube
cube building within
Analysis Manager. ! Building the Sales Cube
! Processing the Cube
! Viewing the Results
Defining Terms
Topic Objective
To define commonly used
terms.
Lead-in ! Analysis Services
Before creating databases ! Analysis Server
and cubes by using the
Analysis Manager, you must ! Analysis Manager
understand fundamental
terms applicable to Analysis ! PivotTable Service
Services.
Before creating databases and cubes by using the Analysis Manager, you must
understand fundamental terms applicable to Analysis Services.
The following are the product definitions for Analysis Services:
! Analysis Services. Microsoft SQL Server 2000 Analysis Services. The
Microsoft OLAP and data mining product that ships with SQL Server 2000
and includes the server and client software.
! Analysis Server. The central component of Analysis Services. Analysis
Server contains an OLAP engine and a data mining engine that runs as a
service under Microsoft Windows® 2000, or Microsoft Windows NT® with
Service Pack 5 or later. The Analysis Server service is called
MSSQLServerOLAPService.
! Analysis Manager. The administrative user interface for Analysis Server.
Analysis Manager runs under Windows 2000 and Windows NT.
! PivotTable Service. The client component of Analysis Services, commonly
referred to as PTS. PTS runs under Windows 2000, Windows NT, Microsoft
Windows 98, and Microsoft Windows 95. PTS is different from Microsoft
Excel PivotTables®.
Delivery Tips Analysis Manager is the interface for designing and administering Analysis
Note that more than one Server databases and cubes. It is a snap-in application in Microsoft
server may appear below Management Console (MMC), a common interface for hosting administrative
the Analysis Servers folder. tools. Analysis Manager contains various panes and menus that assist you in
When performing the administering Analysis Server objects.
demonstration, ensure that
students log on to the
Analysis Server located on
Console Tree View
their own computers. The tree view in the left pane of MMC, also referred to as the console tree, is
the primary means for navigating Analysis Manager.
Deliver these materials
while performing an informal Each level of the tree contains folders, OLAP objects, or both. The Analysis
demonstration of the Servers folder displays a list of servers that are available to you. Because only
Analysis Manager. one server can run on a single computer at a time, each server displays the name
of the computer running it.
Stress the usefulness of
right-clicking. In Analysis The server name acts as a folder for OLAP databases on that server. Each
Manager, when you want to Analysis Server can contain one or more databases. Databases can manage one
perform actions on server or many cubes. Shared components such as dimensions, roles, and data sources
objects, you usually do so are also stored at the database level.
by right-clicking the object.
The following folders are found under each OLAP database folder:
Do not spend too much time
on the data pane at this ! Data Sources
point. Using the data pane ! Cubes
for browsing data is covered
more thoroughly later in the ! Shared Dimensions
module. ! Mining Models
! Database Roles
Menu System
You have access to several menus in Analysis Manager and MMC. MMC snap-
in applications such as Analysis Manager have two levels of menus.
The top-level menusConsole, Window, and Helpbelong to MMC itself
and do not apply to the current snap-in application.
The second level of menus is actually a toolbar. This toolbar contains the
Action, View, and Help menus, which are specific to the current MMC snap-in
applicationin this case, Analysis Manager.
The Action menu, which contains most of the functionality, is context-
sensitive. In other words, the commands that appear on the menu change
depending on the object you select in the tree view. The same commands that
appear on the Action menu also appear on a shortcut menu displayed by right-
clicking an item in the tree view.
Metadata View
The details pane can display a metadata view, which is a convenient technique
to review statistics about databases, cubes, and dimensions.
The metadata view is context-sensitive. The information that is displayed is
dependent on the folder that is selected in the Tree view. For example, at a
particular cube level, dimensions, measures, and cube size are among the
elements available in the metadata view.
Data Pane
The data pane enables you to browse the data of your cubes. This view is
accessible only at the cube level.
Note The details pane displays the Getting Started, Metadata, and Data tabs
only when HTML mode is enabled. To enable or disable HTML mode on the
toolbar, click View and then click HTML.
Before you develop a prototype cube, you review the data source that was used
Delivery Tip to build the cube. You must also understand how to create the OLAP database
Use this slide simply to
introduce the bullets on this
that contains the cube, as well as all of the related cube objects.
slide. Cover the two
sections when you arrive at
the next two slides.
You base the cube created in this module on a SQL Server database called
Delivery Tip Module 02. The database is a scaled-down version of the Foodmart 2000
You can present the tables
and keys by using the slide,
database that is included with Analysis Services.
or you can open SQL Server The Module 02 data warehouse is small and uncomplicated so that you can
Enterprise Manager directly,
easily describe its structure. This database illustrates basic dimension types.
connect to the Module 02
database, and open the
Module 02 Schema Note For more information about different types of dimensions, see module 4,
diagram. “Setting up Dimensions”, in course 2074A, Designing and Implementing OLAP
Solutions with Microsoft SQL Server 2000.
You must set up an OLAP database before designing and building a cube. An
OLAP database in Analysis Services is a collection of cubes and related cube
objects. After creating an OLAP database, you can begin creating the Module
02 database cube by starting the Cube Wizard.
The first table to assign in the Cube Wizard is the fact table. To assign a fact
table for a cube, you must specify a data source for the database. To do so, you
refer the Analysis Server Module 02 OLAP database to the SQL Server
Module 02 database.
Delivery Tips In this demonstration, you will learn how to perform the tasks that are
Encourage students to performed before building an OLAP cube. You will connect to the Analysis
follow along with your Server, define an OLAP database, and specify the data source for the cube.
demonstration on their
computers. ! To verify that the Analysis Server is running on your computer
Periodically ask students
1. Log in to the NWTraders classroom domain by using the data in the
how they are doing to following table.
ensure that they are keeping Option Value
up with your demonstration.
User Name SQLAdminx (where x is your computer number)
The procedures in this Password Password
demonstration are:
1. Verify running service.
2. Click Start, point to Programs, point to Administrative Tools, and then
2. Open Analysis Manager.
3. Create OLAP Database. click Computer Management.
4. Start Cube Wizard. 3. Expand Services and Applications.
5. Define Data Source.
4. Double-click Services.
You may want to 5. Scroll down, and verify that the service MSSQLServerOLAPService
incorporate these exists and is running in the right pane of the Computer Management
demonstration procedures in
window.
the previous lecture topics.
The status of MSSQLServerOLAPService should indicate Started.
6. If the service is not started, right-click MSSQLServerOLAPService, and
then click Start.
7. Close the Computer Management window.
Note Where you invoke Analysis Manager on the Start menu depends on
how Analysis Services was configured during installation. The procedure
here describes the steps for starting Analysis Manager if a default
installation was performed on your computer.
2. In the tree pane of the MMC console, expand the Analysis Servers folder.
3. Double-click the server name to which you will be connecting.
After you create an OLAP database and specify a data source in the database,
Delivery Tip you can build a cube. A cube contains measures, such as sales or cost. A cube
Use this slide as an
introduction to the section.
also contains dimensions, such as region, time, and product.
Do not describe each In this section, you will learn the basic procedures required to build a cube
dimension type at this time.
within Analysis Services. You will learn about the following topics:
! Selecting the fact table and measures
! Creating the dimensions
! Finalizing the cube
! Summarizing the Sales dimensions
Topic Objective
To show students the step
for selecting measures.
Lead-in
Each cube has one fact
table, which determines the
contents of the cube.
Each cube contains one fact table that determines the contents of the cube.
Specifically, fact tables contain the cube measures.
Measures are the numeric values that users analyze in cubes. All measures in a
cube come from a single fact table.
When you begin to design a cube in the Cube Wizard, you first select a fact
table, and then you select measures from that fact table.
The Cube Wizard prompts you to choose a fact table by listing all of the tables
within the source relational database management system (RDBMS)—even the
tables that are not fact tables.
You use each of the four dimension keys in the SalesFact table to create a
dimension, each by a different method.
You create the State dimension by using the star schema method.
The State_ID key joins to a single dimension table named State. The State
dimension table includes columns suitable for creating a three-level hierarchy
consisting of the following levels:
! Country
! Region
! State_Name
A single star schema dimension table contains all of these levels. By using the
Cube Wizard, which accesses the State table, you select the levels in the correct
order.
Topic Objective
To briefly define a snowflake
dimension.
Lead-in
A snowflake schema
dimension is a dimension
defined by more than one
dimension table. You create
the Product dimension by
using the snowflake schema
method.
Analysis Services gives you the flexibility to create dimensions when your
database source contains multiple tables defining a single dimension. A
snowflake schema dimension is a dimension defined by more than one
dimension table. You create the Product dimension by using the snowflake
schema method.
These tables correspond to the levels required for the Product dimension. Each
dimension table contains a column for a single level of a three-tier hierarchy.
This is a classic snowflake dimension.
Almost all cubes contain a dimension that tracks time. The level of detail stored
for time varies considerably—for example, one cube may store data only at a
yearly level while another cube may store data at hourly intervals.
You create the Time dimension directly from the SalesFact table. In the
Module 02 database, no separate dimension table exists for the Time
dimension. Only a column labeled Month resides in the fact table.
Analysis Services can use the fact table itself as a dimension table. It simply
extracts unique values from the column you select.
You normally need a dimension table to define a hierarchy. The Dimension
Wizard, however, can generate an entire hierarchy from a single Date/Time
column. The wizard automatically generates several date-related hierarchies and
then gives you the option of selecting a hierarchy that meets your need.
Note The automatic construction of the date/time hierarchy requires that a field
in the source RDBMS be a Date/Time data type. However, it is possible to
manually build time dimensions from fields that are not Date/Time fields.
In this demonstration, you will learn how to build an OLAP cube. You will
define the fact table, select the measures, create the dimensions, and name the
Delivery Tips cube.
Encourage students to
follow along with your ! To choose the fact table from the Module 02 database
demonstration on their
computers. 1. From the Select a fact table from a data source step in the Cube Wizard,
click SalesFact in the Data sources and tables box.
Periodically ask students
how they are doing to
2. Click Browse Data to review the fact table information.
ensure that they are keeping 3. Close the Browse Data window, and then click Next to move to the next
up with your demonstration. page in the wizard.
The procedures in this
demonstration are:
! To select measures for the Module 02 database cube
1. Choose fact table. 1. From the Select the numeric columns that define your measures step,
2. Select measures. add Sales_Dollars and Sales_Units to the Cube measures box by double-
3. Create star-schema State clicking each one or by selecting each measure and clicking the right arrow
dimension. button (>).
4. Create snowflake-schema
Product dimension. 2. Click Next to move to the next step in the wizard.
5. Create parent-child
Employee dimension. ! To create the State dimension for the Module 02 database
6. Create star-schema Time
dimension. 1. To start the Dimension Wizard, click New Dimension in the Cube Wizard.
7. Name the cube Sales. 2. To continue through the welcome page, click Next.
8. Close the Cube Editor.
3. Click Star Schema: A single dimension table, and then click Next.
Briefly describe each
4. In the Select the dimension table page, click State from the Available
dimension structure, but do
not describe the structures tables list.
in too much detail, because 5. Click Next to move to the next page in the wizard.
they are described
thoroughly in later modules.
6. In the Select the levels for your dimension page, sequentially double-click
Country, Region, and State_Name.
You must click levels in the correct order when defining levels because the
Delivery Tips order defines the placement of a level in a dimension. You select levels
The Dimension Wizard does
not resize table widths to
from the most summarized to the most detailed.
accommodate long table 7. Click Next three times—after selecting the levels, to bypass the Specify the
names. Therefore, when member key columns page, and to bypass the Select advanced options
you create the Product page.
dimension, you will need to
resize the various product 8. Type State in the Dimension name box.
tables to view their full 9. In the Preview box, expand the All New Dimension member and the USA
names in the Create and
member, and then click Finish.
edit joins step of the
Dimension Wizard. When the Dimension Wizard creates the dimension, it uses the dimension
name you enter as the top-level member name, preceded by the word All. In
Point out that the data being this case, All State will replace All New Dimension.
viewed in the browser is not
real data. The numbers are
sample data only.
! To create the Product dimension for the Module 02 database
1. To start the Dimension Wizard, click New Dimension in the Cube Wizard.
2. To continue through the welcome page, click Next.
3. Click Snowflake Schema: Multiple, related dimension tables, and then
click Next.
4. Double-click the dimension tables in the following order:
• Product
• Product Subcategory
• Product Category
5. To move to the Create and edit joins page, click Next.
The Create and edit joins page allows you to confirm the relationships
between the dimension tables.
6. If you added the tables in the correct order, the wizard suggests the proper
relationships by automatically connecting joined fields. Click Next to
continue.
7. If necessary, add joins between the two Subcategory_ID columns and the
two Category_ID columns by dragging and dropping columns between the
tables.
8. Double-click the following columns:
• Category, not Category_ID
• Subcategory, not Subcategory_ID
• Product_Name
9. Click Next three times—after selecting the levels, to bypass the Specify the
member key columns page, and to bypass the Select advanced options
page.
10. Type Product as the name of the dimension. You can preview the
dimension hierarchy from the Preview box, and then click Finish.
The Module 02 database cube now has four dimensions that originated from
the Module 02 SQL Server data source. All four dimensions are unique in how
they were constructed.
The following table summarizes key characteristics of each of the four
dimensions.
Number of Star,
Dimension Dimension Snowflake, or Dimension
Name Table(s) Tables Parent-Child Type
The Cube wizard defines the structure of the cube. The act of saving the cube
stores the definition in the OLAP repository database, but it does not create
actual cube files or load values from the data warehouse.
To use the cube, you must first process it. When you process a cube, the
Analysis Server automatically processes any dimensions in the cube that have
not yet been processed. Therefore, to process the cube and all of its dimensions,
you need to execute only one command.
When you process this cube, Analysis Services copies the detail values from the
fact table into a proprietary data structure. In this cube, because we did not
design aggregations, Analysis Services stores the data using the propriety data
structure and does not store any aggregated values.
For a small cube, such as the Sales cube, the lack of aggregates does not hinder
the ability to browse the cube data.
Note For more information about storage options and aggregation design, see
module 8, “Managing Storage and Optimization” in course 2074A, Designing
and Implementing OLAP Solutions with Microsoft SQL Server 2000.
You can use the Cube Browser interface included with Analysis Manager to
view values in a processed cube. In addition, you can view metadata describing
the structure and the size of the cube in Analysis Manager.
In this demonstration, you will learn how to process a cube and then view data
Delivery Tip from the cube.
Encourage students to
follow along with your
demonstration on their ! To process the Sales cube
computers. 1. Expand the Cubes folder of the Module 02 database, right-click the newly
created Sales cube, and then click Process.
Periodically ask students
how they are doing to 2. Click OK to begin processing.
ensure that they are keeping
A log appears showing the progress of the processing operation. As each
up with your demonstration.
dimension and cube partition is processed, a group of entries appears in the
The procedures in this log.
demonstration are: 3. Click Close to close the Process dialog box after the cube finishes
1. Process the Sales cube. processing.
2. Browse Sales cube data.
3. View metadata for Sales.
! To browse data in the Sales cube
1. Right-click the Sales cube in the Module 02 database, and then click
Browse Data.
The cube browser displays all measures and one dimension in the data grid.
The remaining dimensions appear at the top of the browser in the Slicer
pane.
In the row or column areas, a plus sign (+) indicates that you can expand the
hierarchy and view more detail. A minus sign (–) indicates that you can
collapse the hierarchy to view less detail.
2. Double-click the Sheri Nowmer member to see the employees below Sheri
in the hierarchy.
3. Double-click the Sheri Nowmer member again to collapse the hierarchy.
4. Click and then drag the State button from the Slicer pane over the top of the
Level 02 label in the row area. When the mouse pointer icon includes a
double-headed arrow, release the mouse button.
The browser interchanges, or pivots, the two dimensions.
5. Double-click the Country label, the column heading, to expand countries in
one action.
Canada, Mexico, and USA all appear at one time.
6. Click and then drag the Product button from the Slicer pane over the top of
the Canada label. When the mouse pointer icon does not include a double-
headed arrow, release the mouse button.
The browser combines the two dimensions within the row headings.
Note You can drag and drop from the Slicer pane to the data grid to add a
column or row respectively. You can drag and drop the dimension from the
Slicer pane or data grid to replace the column or row respectively on the
data grid.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Defining Terms
Lead-in ! Previewing Analysis Manager
The review questions cover
some of the key concepts ! Preparing to Create a Cube
taught in the module.
! Building the Sales Cube
! Processing the Cube
! Viewing the Results
4. How do you reference the Module 02 SQL Server database in the Sales
cube?
When you create the cube and start the cube wizard, the first step is to
define a data source for the cube. At this point, you define the SQL
Server data source, which in the example is Module 02.
5. What action must you perform on a cube before viewing cube data?
You must process a cube before you can view cube data.
6. What is the difference between the Module 02 OLAP database and the
Module 02 SQL Server database?
The Module 02 OLAP database is the database that is created in
Analysis Manager and that contains the cube, the data source, and the
dimensions.
The Module 02 SQL Server database is the data warehouse source used
to define and build the Module 02 OLAP database.
Overview 1
Microsoft Data Warehousing Overview 2
Analysis Services Components 8
Metadata Repository 12
Cube Storage Options 14
Client Architecture 24
Office 2000 OLAP Components 30
Review 31
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, your 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.
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.
Instructor Notes
This module provides students with an architectural foundation for the many
Presentation: different system components that comprise Microsoft® SQL Server™ 2000
60 Minutes Analysis Services. The various elements are introduced in this module.
Lab:
00 Minutes After completing this module, students will be able to:
! Describe the components of the Microsoft data warehousing strategy.
! Understand the Microsoft SQL Server 2000 Analysis Server components.
! Describe the function of the Microsoft Metadata Repository.
! Explain the basic differences between the three storage modes for online
analytical processing (OLAP) cubes—multidimensional OLAP (MOLAP),
relational OLAP (ROLAP), and hybrid OLAP (HOLAP).
! Understand client architecture and the role of PivotTable® Service (PTS).
! Recognize Microsoft Office 2000 OLAP capabilities.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_03.ppt.
Preparation Tasks
To prepare for this module, you should:
! Read all the materials for this module.
! Read the instructor notes and margin notes for this module.
! Practice the lecture presentation.
! Review the Trainer Preparation presentation for this module on the Trainer
Materials compact disc.
! Review relevant white papers that are located on the instructor compact
disc.
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 the module but are not specifically addressed in the
content of the student notes.
1. What are some of the third-party client applications that access Analysis
Server?
As of the date of publication of course 2074A, Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000, these are
the companies taken from the Microsoft Web site
http://www.microsoft.com/SQL/offerings.htm that provide client front-
end support for Analysis Services: Cognos®, Comshare®, AppsCo™,
Business Objects®, Knosys™, OutlookSoft™, and Seagate Software™.
2. Must PTS exist on all client computers accessing data from Analysis
Server? Is it possible for PTS to reside on a middle-tier?
Analysis Services makes it possible to connect from a thin client to the
server by using Internet protocols.
3. Can the metadata repository be migrated to a data source other than SQL
Server?
No.
4. How can programmers develop applications that access PTS?
PTS is bundled with Microsoft Excel 2000 as well as with Microsoft
Visual Studio®. Therefore, programmers have access to PTS in
Microsoft Visual Basic®.
Module Strategy
Use the following strategy to present this module:
! Microsoft Data Warehousing Overview
This section introduces the components of the Microsoft data warehousing
and business intelligence strategy. The first slide acts as an introductory
slide. Use the first slide to introduce the section, then deliver the following
five slides in more detail, emphasizing the specific information for each
element. Each slide lists the concepts to teach in the lecture.
! Analysis Services Components
This section focuses on the overall architecture of Analysis Services. The
first slide is a build slide that highlights each component one at a time. Take
your time and thoroughly describe each component in detail. Realize that
some topics such as PTS and Decision Support Objects (DSO) are covered
later in the module. The architecture build slide is followed by a discussion
of Analysis Manager and DSO, and Analysis Server characteristics. Prepare
for this section from the student notes and the SQL Server Books Online.
! Metadata Repository
This one-page section is an important overview of the metadata repository.
Go through the lecture and describe the metadata repository’s importance
and role. After the lecture, you can incorporate an informal demonstration
by opening Microsoft Windows® Explorer and navigating to the metadata
repository in the Bin directory.
! Cube Storage Options
This section begins by introducing the three storage modes—MOLAP,
ROLAP and HOLAP. A key point to emphasize is that the storage mode
assigned to cubes is transparent and unimportant to users. Quickly present
the three storage modes. They are covered in substantial detail in module 8,
“Managing Storage and Optimization,” in course 2074A, Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000.
After the storage mode discussion, your lecture reviews partitions, virtual
cubes, database and cube structure, and Analysis Services limits. The slides
for these topics have useful graphics and tables to help you with the lecture.
! Client Architecture
This section introduces PTS. Emphasize the fact that PTS must be used to
access data from an OLAP cube by whatever client tool is used. In addition
to PTS, you will cover the specifics of intelligent caching and
multidimensional expressions (MDX). The intelligent caching animated
slide is integrated with the lecture. The last subject is MDX, and the slide is
intended to introduce its place and importance in Analysis Services.
! Office 2000 OLAP Components
This section describes the roles of Microsoft Excel PivotTables and the Web
Pivot control—two OLAP features in Office 2000 that depend on PTS in the
background. While describing Excel PivotTables, be sure to clarify the
difference between PivotTables and PivotTable Services.
Customization Information
This section identifies the lab setup requirements for a module and the
configuration changes that occur on student computers during the labs. This
information is provided to assist you in replicating or customizing Microsoft
Official Curriculum (MOC) courseware.
There are no labs in this module, and as a result, there are no lab setup
requirements or configuration changes that affect replication or customization.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Microsoft Data Warehousing Overview
Lead-in ! Analysis Services Components
In this module, you will learn
about the many different ! Metadata Repository
elements that make up
Analysis Services. ! Cube Storage Options
! Client Architecture
! Office 2000 OLAP Components
Use this slide to introduce There are many elements that make up Microsoft® SQL Server™ 2000 Analysis
the concepts that are Services. The purpose of this module is to provide an architectural foundation
presented in this module. for the different system components.
Tell students that most of
these subjects will be After completing this module, you will be able to:
covered in substantial detail
in module 8, “Managing ! Describe the components of the Microsoft data warehousing strategy.
Storage and Optimization,” ! Understand the SQL Server Analysis Server components.
in course 2074A, Designing
and Implementing OLAP ! Describe the function of the metadata repository.
Solutions with Microsoft ! Explain the basic differences between the three storage modes for online
SQL Server 2000.
analytical processing (OLAP) cubes—multidimensional OLAP (MOLAP),
relational OLAP (ROLAP), and hybrid OLAP (HOLAP).
! Understand client architecture and the role of PivotTable® Services (PTS).
! Recognize Microsoft Office 2000 OLAP capabilities.
DTS is a feature built into SQL Server that moves and transforms data. Features
of DTS include:
! Transforming and moving data between heterogeneous data sources.
! Scheduling DTS tasks.
! Automating OLAP administrative tasks.
Analysis Services
Topic Objective
To describe the role of
Analysis Services in the
Microsoft data warehousing
framework.
Lead-in
Analysis Services is an OLTP DTS DW DTS Analysis Clients
essential component of the Source Storage
Services
Microsoft data warehousing
and business intelligence
strategy.
Client Interfaces
Topic Objective
To describe the client
interfaces used to access
Analysis Services data from
client applications.
Lead-in
Now let us discuss the OLTP DTS DW DTS Analysis Client Clients
Source Storage Services Interfaces
application programming
interfaces (APIs) used to
develop front-end
applications for Analysis ! APIs:
Services.
$ Low level: OLE DB for OLAP and OLE DB for Data
Mining
$ High level: ADO-MD
Analysis Services client applications, such as Microsoft Excel 2000, use OLE
Delivery Tip DB for OLAP to communicate with the Analysis Server.
Be prepared to discuss OLE
DB for OLAP, OLE DB for OLE DB for OLAP is a set of methods—an application programming interface
Data Mining, and ADO MD. (API)—added to OLE DB to provide efficient access to multidimensional data.
This is a common area for
Programmers who use OLE DB for OLAP are typically developing commercial
students to ask questions.
front-end applications by using tools such as Microsoft Visual C++®.
OLE DB support has been enhanced with the OLE DB for Data Mining
specification. Programmers can therefore create custom applications that work
with the Analysis Services data mining features.
To assist programmers developing corporate applications, OLE DB for OLAP
comes in a wrapper layer called ADO MD.
ADO MD is a simpler, higher-level set of instructions commonly used by tools
such as Microsoft Visual Basic®. ADO MD is usable in Visual Basic, Excel
2000, or any development environment that supports Microsoft ActiveX
controls.
Note OLE DB for OLAP and ADO MD are not proprietary to Microsoft. Any
developer can create a data warehouse or OLAP database that supports OLE
DB for OLAP. In addition, a developer may create a client application that
works with any OLE DB for OLAP data source. In theory, any third-party
client application that works with OLE DB for OLAP will work with the
Analysis Server.
Client Applications
Topic Objective
To describe the role of client
applications in the Microsoft
data warehousing
framework.
Lead-in
To browse the Analysis OLTP DTS DW DTS Analysis Client Clients
Server data, a front-end Source Storage Services Interfaces
client application must be
used.
! Office 2000
! Third-Party Applications
! Custom Applications
Excel 2000 is Microsoft’s own OLAP client. In Excel 2000, PivotTables have
been enhanced to work smoothly with Analysis Server.
Delivery Tip
Mention any third-party
client applications you have Note In earlier versions of Excel, PivotTables were limited to the volume of
worked with. Such tools are data that could be analyzed—a restriction that is now relieved with Excel 2000.
generally easy to learn.
Students are naturally
curious about alternatives Most major third-party OLAP client products that interface with other OLAP
beyond Excel 2000. tools also interface with Analysis Server.
You can also create custom front-end applications to access Analysis Server by
using OLE DB for OLAP or by using ADO MD.
Analysis Services contains many components that exist on the server and the
client side of the product. It is important to understand each of the components
and the interaction that occurs between them.
In the next section, you will learn about the following topics:
! Analysis Services architecture
! Analysis Manager
! Analysis Server characteristics
OLEDB for DM
Lead-in
PivotTable Service
to OLAP cube data in
Analysis Services.
Application
Other
OLE DB Analysis Server
ADO MD
Providers
OLAP DM
MOLAP Engine Engine
Store
Analysis Manager
Topic Objective
To introduce the Analysis
Manager and DSO. ! Application for Database Administration
Lead-in ! Snap-In to MMC
Analysis Manager is the
application you use to ! Decision Support Objects
perform database and
server administration in
Analysis Services. Analysis Manager Custom Administration Interface
When you interact with Analysis Server as an administrator, you use the
Key Point Analysis Manager application. With Analysis Manager, you define cubes,
The DSO interface is
specific to Analysis Server.
administer the server, and perform cube and dimension processing.
In other words, Analysis Analysis Manager works in Microsoft Management Console (MMC). MMC
Server is the only OLAP
allows for the customization of Analysis Manager. For example, you may add
server that communicates
with DSO. Conversely, OLE
commands that automate batch operations such as monthly cube processing.
DB for OLAP is the open, The Analysis Manager application communicates with the Analysis Server by
standard interface used by a
using a layer called DSO. DSO is a set of programming instructions—an API—
variety of OLAP database
servers.
that allows an application to control Analysis Services. Analysis Manager is an
application that uses DSO to control Analysis Services. You can use DSO to
write your own applications to manage the Analysis Server.
Tip There are certain aspects of the Analysis Server that are available through
DSO but are not included in the Analysis Manager application.
Metadata Repository
Topic Objective
To introduce the Analysis
Server metadata repository.
Lead-in ! Contains All Metadata for Analysis Server
The most important file on ! By Default, an Access Database
the Analysis Server
computer is the metadata ! msmdrep.mdb
repository.
! Can Migrate Repository to SQL Server
$ SQL Server 7.0 OLAP Services format
$ SQL Server 2000 Meta Data Services repository format
The metadata repository resides on the Analysis Server computer and contains
Delivery Tip the definitional information for all databases on that server.
After presenting the bullets
from the slide, take As you use Analysis Manager to administer an Analysis Server, your inputs are
students into Windows stored in the OLAP metadata repository.
Explorer and navigate to
the repository in the By default, the metadata repository is a Microsoft Access file stored on the
Program Files\Analysis Analysis Server in the Bin directory. Its name is msmdrep.mdb. When you use
Services\Bin directory. Analysis Manager, you are editing the Metadata Repository.
Tip After migration, both the old and new databases exist. Only the new
database is used by Analysis Services, however. You must delete the old
.mdb file manually. If you leave the repository in Access format, be sure to
periodically compact it by using Access. Also, back up the repository
frequently during database development and production.
! A wizard is included with Analysis Services that will migrate the metadata
repository to SQL Server. To start the wizard, right-click the server, and
click Migrate Repository.
! At the beginning of the wizard, you choose whether you want to store the
repository in SQL Server 7.0 OLAP Services format or in SQL Server 2000
Meta Data Services repository format.
! You can only migrate the metadata repository from Access to SQL Server.
You cannot migrate a SQL Server Analysis Services repository back to
Access.
! If an error occurs during the migration process, the entire transaction is
rolled back and the original repository is still in use.
Storage Modes
Topic Objective
To introduce the three
storage modes for Analysis
Server.
Lead-in
Analysis Server supports
three storage modes.
Note Dimension structures are stored on the Analysis Server for all three
storage modes, except when the dimensions are designed by using the
ROLAP storage mode. ROLAP dimensions are discussed in module 9,
"Processing Dimensions and Cubes," in course 2074A, Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000.
! All three provide the same multidimensional model to clients, users, and
applications.
MOLAP Storage
When MOLAP is used, detailed data and aggregations are stored in Analysis
Server cube format.
The following are characteristics of MOLAP storage:
! MOLAP cubes have the fastest query performance for users.
! Because the detail data from the fact table is brought into Analysis Server
for storage, there is duplication of data.
! Due to efficient data compression algorithms, MOLAP is an economical
mode in terms of disk storage.
! Queries to the Analysis Server do not access the relational database
management system (RDBMS). If the RDBMS server is shut down at run
time, the Analysis Server is not affected.
ROLAP Storage
When ROLAP is used, detailed data and aggregations are stored in the source
RDBMS. The only data stored on the Analysis Server is the dimensional
hierarchies, assuming ROLAP dimensions are not used.
The following are characteristics of ROLAP storage:
! Analysis Server provides a multidimensional middle tier between clients
and the RDBMS.
! All queries, other than those satisfied by the client or server caches, must
access the source RDBMS tables.
! Under most circumstances, ROLAP cubes are much slower in query
performance than MOLAP cube equivalents.
HOLAP Storage
When HOLAP is used, detailed data is stored in the RDBMS and aggregations
are stored in multidimensional format.
The following are characteristics of HOLAP storage:
! HOLAP is a compromise between MOLAP and ROLAP in terms of
performance and disk consumption.
! Because detailed data is not duplicated, HOLAP is a reasonable storage
compromise where disk consumption is a concern.
! Queries are not as slow as in ROLAP cubes, nor as fast as in MOLAP
cubes.
! Processing times for HOLAP cubes are similar to processing times for
MOLAP cubes.
Partitioning
Topic Objective
To introduce the concept of
partitioning.
Lead-in MOLAP
Partitioning is an important Current Year 35% agg
feature of Analysis Services
that increases cube
scalability.
MOLAP
Prior Year 10% agg
ROLAP
History 0% agg
Note Partitions are physical, not logical, storage mechanisms. They are
transparent to users and to applications.
Example of Partitioning
In the above example, three partitions exist in a cube. The cube contains
partitions organized by current year, prior year, and history data. The
aggregation design for each partition is based on user access. The higher the
aggregation percentage is for a partition, the faster the queries execute against
the partition. The current year partition contains a higher aggregation
percentage because users access the current year partition in most of their
queries. Users access the history data infrequently, which explains why the
history partition contains zero aggregations.
Partitioning is available only with the Enterprise Edition of SQL Server
Analysis Services.
Benefits of Partitioning
Cubes consisting of multiple partitions can derive performance benefits both at
cube processing time and at query time. The following are potential benefits:
! A cube aggregation design can be different for each partition, depending on
query and cube processing performance requirements.
! Specific partitions can be processed separately from other partitions.
Therefore, you can process a small subset of the cube for shorter processing
times.
! Partitions can reside on separate computers. Therefore, the processing and
querying of partitions can take advantage of separate processors, memory,
and storage.
! Query performance can be improved when queries only have to access a
single partition.
Virtual Cubes
Topic Objective
To list the benefits of virtual
cubes.
! Equivalent of RDBMS View
Lead-in ! Subset of One Cube
A virtual cube is a logical
cube based on underlying ! Combination of Data from Multiple Cubes
physical cubes.
! Virtually No Storage Consumed
Actual
A virtual cube is a logical cube based upon underlying physical cubes. To users,
virtual cubes look the same as physical cubes.
The following are characteristics of virtual cubes:
! Virtual cubes are to Analysis Services what views are to relational
databases.
! One way to create a virtual cube is to define a subset of a single cube.
! The other method of creating a virtual cube is to define data from multiple
source cubes to define a single virtual cube.
! Virtual cubes consume no storage except for their definitions in the
metadata repository.
Virtual cubes access source cube data and aggregations and therefore do not
need to store their own data. You can create an unlimited number of virtual
cubes on the Analysis Server and each virtual cube can combine up to 64 source
cubes.
Linked Cubes
Topic Objective ! Linked Cubes Characteristics
To list the benefits and use
of linked cubes. $ Are based on source cubes stored on different servers
Lead-in $ Reference entire source cubes and not subsets
Linked cubes give you
another option for cube $ Appear as regular cubes
storage on Analysis
Servers. $ Always have ROLAP storage mode with no aggregations
! Linked Cubes Limitations
$ Can only be created with SQL Server 2000 Enterprise
Edition
$ Cannot be used to write back cube data
$ Can only be created on Analysis Server with query
access to source cube
Linked cubes give you an alternative option for cube storage on Analysis
Servers.
A linked cube uses a cube as its data source and resides on a different Analysis
Server. The linked cube does not store data, but accesses its data from the other
cube, known as the source cube. Therefore, you can maintain multiple servers
that access the same cube without duplicating data on each server.
The linked cube resides on the subscribing server, and the source cube resides
on the publishing server.
Note For more information about writeback, see module 14, “Using
Actions, Drillthrough, and Writeback,” in course 2074A, Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000.
! The Analysis Server used as the subscribing server must have query access
to the source cube on the publishing server.
Database Architecture
Topic Objective
To show the organization of
a database.
Lead-in ! Analysis Server Contains One or More Databases
This is the hierarchy by ! Each Database Contains One or More Cubes
which databases, cubes,
and partitions are organized. ! Each Cube Contains One or More Partitions
! Each Partition Can Have a Different Storage Mode, a
Different Aggregation Design, and a Different Storage
Location
Ask students if any of the There are limits to the number of dimensions and measures you can create in
limits are going to be Analysis Services cubes and databases. The following table contains those
problematic for them. limits, along with other restrictions.
Most of these limits are so large that normal databases will not have difficulty
conforming to the limitations. However, for very large databases, you may need
to consider design alternatives to work around these limitations.
# Client Architecture
Topic Objective
To introduce the
components and features of
client architecture. ! PivotTable Service
Lead-in ! PTS Architecture
This section introduces the
components of OLAP client ! Intelligent Caching
architecture.
! Multidimensional Expressions
! Internet Support on Clients
PivotTable Service
Topic Objective
To describe PTS in detail
and discuss its importance
when accessing Analysis ! Is Required in Order to Query Server
Server.
! Is the Desktop OLAP Component—Subset of Analysis
Lead-in
The client component of
Server
Analysis Services is PTS. ! Ships with Office 2000
All client applications must
communicate with the ! Provides:
Analysis Server through
PTS. ! Intelligent data and query caching
! Multidimensional formula engine
! Ability to create local cubes
The client component of Analysis Services is PTS. All client applications must
communicate with the Analysis Server through PTS.
PTS is the desktop OLAP component designed for Analysis Server to provide
online and offline data analysis. There is no user interface for PTS. It interacts
transparently with applications such as Excel 2000, third-party applications, and
custom applications.
PTS ships as a component of Microsoft Office 2000.
Note PTS is not the same as an Excel PivotTable. PTS is an OLE DB provider
that supports OLE DB for OLAP extensions, as well as ADO MD, the high-
level object interface.
PTS has some of the same features as Analysis Server. The following are
features the two have in common:
! Intelligent data and query caching. Both Analysis Server and PTS have
intelligent caching capabilities.
! MDX formula engine. Queries can be defined at the server or the client.
! Ability to create cubes. Analysis Server cubes are server-based, but PTS
cubes are considered local cubes.
PTS Architecture
Topic Objective
To highlight the architecture
of PTS.
Client
Lead-in
(Excel 2000, Third-Party Applications)
When accessing cube data, ADO-MD / OLEDB for OLAP
you must first go through
PTS.
PivotTable Service
Offline
Cube OLAP
File Server
All clients accessing cube data must communicate through PivotTable Services.
When you use Analysis Manager to administer cubes and use its browser to
view cubes, Analysis Manager is communicating with PTS to view the data.
PTS is automatically installed on a computer when you install Analysis
Services (Server or Client Components). It is also automatically installed when
you install Office 2000.
Tip PTS can run on any Windows operating system beginning with Windows
95.
PTS is used to access cubes residing on the Analysis Server, as well as local
cubes created in Excel 2000.
Intelligent Caching
Topic Objective
To demonstrate how Query 1) January, February, and
Analysis Server and PTS March 2000 Sales
cache data.
Client
Lead-in Query 2) Quarter 1 2000 Sales 1) January, February, Client
Caching on both the server March 2000 Sales Calculates
2) Quarter 1 2000 Sales
and client is a key factor in
Analysis Server’s rapid 3) Quarter 1 1999 Sales
Query 3) Quarter 1 2000 Sales
query performance.
and Quarter 1 1999 Sales
Only Server
Quarter 1 1999
1) January, February, March 2000
Needed From Sales
Server
3) Quarter 1 1999 Sales
Intelligent caching on the server and client is a key factor in Analysis Server’s
Delivery Tip rapid query performance. It is performed by PTS on the client.
This slide builds and steps
you through a querying Following are examples of how intelligent caching works:
scenario that is described
on this page in detail. ! A user executes Query 1 for January 2000, February 2000, and March 2000
data. MDX executes by PTS to return the data. The data does not exist on
the client cache, so the query travels to the server cache.
! Since the data does not exist in the server cache either, the results must be
transported from the server disk to the server cache, then to the client cache,
and then to the user’s report
! The user executes Query 2, containing Quarter 1 2000, a summary of the
three months previously queried.
! Because the data for three months exists in the client cache, the values are
calculated by PTS on the client computer and presented in the user’s report.
The query does not access the server at any time.
! The user executes Query #3, which is Quarter 1 2000 and Quarter 1 1999.
! Only Quarter 1 1999 is brought from the server since Quarter 1 2000 values
already reside in the client cache.
Multidimensional Expressions
Topic Objective
To introduce and describe
MDX.
Lead-in ! Used as the Syntax for Modeling and Querying an OLAP
MDX is the syntax for Database
querying OLAP cubes.
! Supported by PTS
! Part of the OLE DB for OLAP API
! Used to Create Calculated Members
! Key to Advanced Analytical Capabilities of Analysis
Services
PivotTable Service is bundled with Office 2000. There are several OLAP
features in Office 2000 that depend on PTS.
Excel PivotTables
PivotTables, first introduced in Excel version 5.0, provided users with their first
exposure to OLAP functionality.
PivotTables were limited, however, by their inability to handle large data sets.
In Office 2000, PivotTables through PTS are able to analyze extremely large
data sets. In addition, PivotTables have gained new OLAP-aware charting
features.
Local Cubes
PTS supports the ability to create local cubes, which in turn can be queried in
the same manner that Analysis Server cubes are queried. Excel 2000 has an
interface for this feature.
Note Because local cubes can be created from relational sources, and because
PTS is bundled with Excel 2000, Analysis Services is not necessary when
performing client-side OLAP. Any Excel 2000 user can utilize these features.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Microsoft Data Warehousing Overview
Lead-in ! Analysis Services Components
The review questions cover
some of the key concepts ! Metadata Repository
taught in the module.
! Cube Storage Options
! Client Architecture
! Office 2000 OLAP Components
1. What is the component in SQL Server that moves and transforms data?
DTS communicates with Analysis Services and allows users to import,
export, and transform data from multiple heterogeneous data sources
into one or more databases.
5. Can one Analysis Server house more than one OLAP database?
Yes.
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
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.
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.
Instructor Notes
Presentation: Dimensions are the fundamental beginning point for building an online
60 Minutes analytical processing (OLAP) cube in Microsoft® SQL Server™ 2000 Analysis
Services. Cubes contain multiple dimensions, which may be either shared or
Labs: private, star or snowflake, regular or parent-child.
60 Minutes
In this module, students learn how to build dimensions by using the Dimension
Editor. You dissect the building 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 using the Dimension Editor and
two dimensions by using the Dimension 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.
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.
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 the module 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 the dimension 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 the dimension from the other system to the
source database. You must also be sure that the cube fact table contains
keys that map to the dimension 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 using the Dimension Wizard, it gives you the option to
select any column from the dimension 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 Dimension Editor 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, the dimensions in the
filter area default to a single member. This member is known as the
default member.
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 using the
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.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Understanding Dimension Basics
Lead-in ! Shared vs. Private Dimensions
In this module, you will learn
about the Dimension Editor ! Working with Standard Dimensions
and how to use it to create
and manage dimensions. ! Basic Level Properties
! Working with Parent-Child Dimensions
Review dimension level and Dimensions consist of members organized into levels. This organization gives
members. Quiz students on users access to data at different levels of detail. The above illustration shows a
the levels and members. 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.
Users and OLAP developers must be able to describe members and their
Delivery Tips
relationships to other members in dimensions. Analysis Services uses terms
Present this build slide by
introducing one familial term
such as parent, child, and sibling to describe relationships between members.
at a time. As each term Consider the following hierarchical structure:
appears, define the term
and describe how the term Region
applies to the members in Central
the example. IL
The dimension terms
MO
appear in the following
order: East
1. Dimension NY
2. Parents MA
3. Siblings
4. Children Following are definitions of relationships that apply to the above hierarchical
5. Ancestors of IL and MO structure:
6. Descendants of Region
! Dimension. The dimension in this example is Region.
7. Cousins
! Parents. A parent has at least one child member immediately below it.
Stress that members are Region is a parent of Central and East. Central is the parent of IL and
cousins only when they exist MO. East is the parent of NY and MA.
at the same relative position
below their parents. ! Siblings. A sibling is a member with the same parent as another child.
Central and East are siblings. In addition, IL and MO are siblings, and NY
Key Point and MA are siblings.
These familial terms are
used in most OLAP ! Children. A child is a member that has a parent immediately above it.
database tools, and not only Central and East are children of Region. The states are children of their
in Analysis Services. region parents.
! Ancestors. The ancestors of a member include its parent, grandparent, and
so on, continuing up the branch until the topmost member of the dimension
is reached. The ancestors of MO are Central and Region.
Dimensions are defined as either shared or private at the time they are created.
Understanding the difference between the two dimension types is crucial to
The goal of this section is to building practical and well-designed OLAP database models.
explain the differences
between shared and private This section describes the characteristics of shared and private dimensions and
dimensions, and for explains when to use each type when you design the cube dimensions.
students to understand
when to use one dimension
type versus the other.
Note You can copy and paste shared dimensions to other databases,
assuming the new databases contain the dimension source table or tables.
! Once you define a dimension as shared, you cannot change it to private, and
vice versa.
! You maintain shared dimensions in the Dimension Editor, where you can
apply various dimension properties and actions.
! You modify shared dimensions in one place—the Shared Dimension folder
in Analysis Manager.
! When you rebuild a shared dimension, all cubes containing the dimension
become unavailable to clients. You must then reprocess the cubes before
users can continue to access cube data.
Private dimensions are dimensions used by only one cube. You use private
Key Point dimensions when only one cube requires that particular view or dimension.
Define the dimensions as
private if it is unacceptable The following are characteristics of private dimensions:
for the cube to be
unavailable to the users due ! You create and use private dimensions within a single cube.
to another user group
rebuilding a common shared ! When maintaining private dimensions, you access the dimension properties
dimension. in the Cube Editor, not the Dimension Editor.
! After you define a dimension as private, you cannot change it to shared, and
Be sure to summarize vice versa.
shared and private
! You rebuild private dimensions automatically when the cube is processed.
dimensions at this point in
the lecture. Processing private dimensions does not affect other cubes.
You create dimensions quickly and easily by using the Dimension Wizard.
Delivery Tip While the Dimension Wizard is a useful tool for many situations, the
The steps for this
demonstration are included
Dimension Editor and the Cube Editor are the primary tools for defining and
in the Instructor Notes. modifying dimensions.
In this demonstration, you will learn how to create a standard star schema
Lab A, Creating a Standard
Dimension, repeats the
dimension by using the Dimension Editor instead of the Dimension Wizard.
demonstration steps. If
students follow along with
you in your demonstration,
let them know that they can
skip some of the procedures
in lab A.
Tell students that they will Many properties exist to design and enhance dimensions. A few of the
get hands-on experience properties can be set in the Dimension Wizard as you initially create
with these properties in the dimensions. However, the Dimension Editor contains all properties available
first two labs. for dimensions and their levels.
Because the full range of capabilities are available, application designers spend
a significant amount of time in the Dimension Editor, as opposed to the
Dimension Wizard, working with these properties.
This section describes a few commonly used properties:
! Member Key and Member Name Columns
! Member Keys Unique and Member Names Unique properties
! Expressions used in the Member Key and Member Name Columns
! The Hide Member If property that is used to create ragged dimensions
! Snowflake dimensions
! The All Level property
! The Default Member property
You can find these properties in the Dimension Editor and use them to enhance
dimensions and levels.
When you select dimension levels in the Dimension Editor and Dimension
Delivery Tips Wizard, Analysis Services keeps track of the columns used to define the levels.
Describe the Member Key
Column and Member
The Member Key Column and the Member Name Column define each
Name Column by going to dimension level. The two columns determine the population of levels with
the Dimension Editor and members and the appearance of members to users.
showing students the
properties and how to Defining the Member Key Column
update them.
On the Basic tab of the Properties pane, the Member Key Column identifies
Consider introducing these the members of a level by specifying where the key comes from in the source
topics in the previous relational database management system (RDBMS).
demonstration as you build
the State dimension. If you Characteristics of the Member Key Column include the following:
choose to deliver these
! The Member Key Column determines the members included in a level.
concepts in the previous
demonstration, use this slide ! The Member Key Column usually specifies an RDBMS column containing
to review the terms, asking member keys in table.column format.
students for their definitions.
! The Member Key Column can be any valid SQL expression involving one
or more columns from the same table. The expression must be understood
by the source RDBMS.
! When populating the children of a parent with members, the Analysis
Key Point Server uses the SQL command SELECT DISTINCT on the Member Key
When populating the
Column. Therefore, you do not see duplicate member values below the
children of a parent with
members, the Analysis
parents—you only see the distinct members.
Server uses the SQL ! For optimization reasons, the Member Key Column of the lowest level
command SELECT should be the dimension primary key—the numeric key that uniquely
DISTINCT on the Member defines each member in the dimension table. This key also acts as the
Key Column. Therefore, foreign key in the source fact table.
you do not see duplicate
member values below the
parents—you see only the
distinct members.
By default, the setting of Order By is Name, which means that member names
determine the sort order of members in a level.
Tip If you build the dimension by using the Dimension Wizard, it gives you
the option to select any column from the dimension table to define the sort
order, and then the wizard automatically creates the member property for you.
As a rule, two member keys that roll up to one parent must be distinct. Direct
siblings require unique keys. If you have a two-level hierarchy consisting of
city and country, you cannot have two Cairo children below Egypt.
However, member keys do not need to be unique across an entire level of a
dimension. For example, we may have two cities named Cairo, but they each
roll up to a unique county. For example, the level can contain Cairo, Egypt and
Cairo, USA.
The Advanced tab of the Properties pane contains two properties that work
with the Member Key Column and the Member Name Column
respectively—Member Keys Unique and Member Names Unique.
! Analysis Server will not trap the mistake in the Dimension Editor unless
you browse the dimension. Therefore, it is recommended that you browse
the dimension when setting levels as unique to verify that the dimension is
valid.
Important Having members with the same name can lead to confusion for
users. For example, if a user looks at a January report, and there are January
members in the years 2000, 2001, and 2002, the user does not know the year in
which January exists.
In many situations, the source RDBMS database does not format data perfectly
Delivery Tips for the dimensions or levels that you want to build in the cube. By creating
Focus on the rules
associated with creating
members from expressions, you can address shortcomings in the RDBMS data.
expressions for members. The following characteristics describe expressions used to create members:
Mention to students that the ! The creation of members from expressions adds flexibility to the design.
boxes in which you type
expressions are not user ! You create expressions from one or more columns in a single dimension
friendly. Use an editor, such table.
as Microsoft® Notepad, to ! You create expressions by typing them directly into the Member Key
create the expressions
Column and the Member Name Column boxes in the Dimension Editor.
before copying and pasting
them into the boxes in the The Dimension Editor does not provide an interface to graphically build
Dimension and Cube expressions. No interface exists in the Dimension Wizard to define a
Editors. dimension level from anything other than a single column.
Caution If you are changing an expression and a syntax error occurs, the
last valid Member Key Column or Member Name Column value
reappears, erasing the invalid expression.
Many dimensions do not have the same number of levels at each dimension
Delivery Tip branch. One reason for the varying depths of levels is that some branches may
Ask students if they can
think of other dimension
not have members that exist at all levels.
situations in which For example, the State dimension has the following levels:
hierarchies are ragged.
! Country
Point out that it is the
asymmetrical appearance of ! State
a dimension that makes it ! City
ragged, not the storage of a
dimension on the server. USA contains two states, California and Illinois, with the cities of the two
states existing at the City level. Alternatively, Israel does not contain any states
and only contains two cities, Tel Aviv and Haifa. In this example, the State
dimension is ragged because no states are found below Israel or above Tel
Aviv and Haifa.
A ragged dimension contains at least one member whose parent belongs to a
hierarchy that is more than one level above the child. Ragged dimensions
therefore contain branches with varying depths.
The property Hide Member If works in standard dimensions to give
dimensions a ragged appearance to users.
Key Point Members can be hidden if any of the following are true:
A ragged dimension
contains at least one ! The member is an only child with no name.
member whose logical ! The member is an only child with its parent’s name.
parent does not exist in the
level immediately above the ! The member has no name.
member. Ragged ! The member has its parent’s name.
dimensions therefore
contain branches with
varying depths.
Fact Table
In Analysis Services, you have a special dimension level called the All level
Delivery Tip that is available in every dimension. The All level, when included as part of a
You may want to switch to
the Dimension Editor to
dimension’s definition, is the highest level.
illustrate the use of the All The following are characteristics of the All level:
level.
! The All level summarizes all members in the top level of the dimension, but
the Dimension Editor dimension tree does not display the All level in its list
of levels.
! The All level is included by default when you create a new dimension—that
is, the All Level property for the dimension is set to Yes.
! The default caption is All DimensionName. For example, in the Product
dimension, the All level is named All Product by default.
! You turn off the All level in the Dimension Editor if the summarized data
does not make sense. You may not want to use the All level when dealing
with scenario or time dimensions.
For example, Actual and Budget values should not be summarized to an All
level because these scenarios are discrete data sets that are not logically
added to one another.
! The Member Key Column and Member Name Column properties do not
apply to the All level of a dimension.
! The name for the All level member does not originate from the relational
data warehouse. However, you can change the name of the All level
member by using the All Caption property.
Exercise 1
Creating the State Dimension
In this exercise, you will create the State dimension, update the State level
Member Key Column, and sort the level based upon the Member Key
Column. In addition, you will add levels and important level properties found
in the Dimension Editor.
Note Dropping a column onto the dimension name adds the column as the
lowest level of the dimension. Dropping a column onto an existing level
name adds the column as a new level immediately above the existing level.
6. Click the Data tab, and then expand all nodes of the State dimension tree.
Objectives
Explain the lab objectives. After completing this lab, you will be able to:
! Create a snowflake dimension.
! Add levels to a snowflake dimension.
! Understand how the Member Key Column builds levels.
! Use an expression to define a level.
! Define the default member.
Lab Setup
To complete this lab, you must first:
! Complete lab A, Creating a Standard Dimension, found earlier in the
module.
Exercise 1
Creating the Product Dimension
In this exercise, you will create a snowflake dimension through the Dimension
Editor. You will define multiple tables to build the dimension and will define
the levels for the Product dimension. In addition, you will use an expression to
define member names and will update the All Caption and the Default
Member properties.
Tip When specifying the first table for a snowflake dimension, select either
the table for the lowest level or the table for the highest level. If you select a
table in the middle of the hierarchy, the Dimension Editor might not create
joins properly as you add tables. The Product table defines the lowest level
of the Product dimension.
Tip The Dimension Editor does not automatically resize tables to fit table
and column names. You may need to resize the tables to determine the
names.
4. Drag the Category column from the Product Category table onto the
Subcategory level.
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
30 Module 4: Building Dimensions Using the Dimension Editor
5. At the bottom of the Schema pane, click the Data tab to preview the
dimension. Expand All Product, Bread, and Muffins.
6. Notice the Product level member names.
Are the names informative to users? You will update the Member Name
Column to make the member names more meaningful to users.
Tip If the expression you type contains incorrect syntax, the Dimension
Editor erases the syntax and the Member Name Column reverts to the
original expression. Therefore, before pressing ENTER, copy the new
expression to the clipboard or to Windows® Notepad.
You receive an error in the Data pane indicating a problem with data types.
The problem with the expression is that you cannot concatenate an integer
data type to a character data type. However, you can add a conversion
function to the expression, to convert both columns to character data.
3. Update the expression in the Member Name Column so that it contains the
following expression:
convert(char, "dbo"."Product"."Product_ID") + ' - ' +
"dbo"."Product"."Product_Name"
Here you surround Product_ID with the convert SQL Server function,
which converts the integer data to character data.
You can use SQL Server functions in the Member Name Column because
the data source of the cube is a SQL Server database.
4. Browse the Product dimension in the Dimension Members pane.
You do not receive an error. However, converting Product_ID to a
character data type added spaces to the end of Product_ID. You will update
the expression, adding a function to remove the empty spaces.
5. Update the expression in the Member Name Column so that it contains the
following expression:
rtrim(convert(char, "dbo"."Product"."Product_ID")) + ' - '
+ "dbo"."Product"."Product_Name"
Here you surround the entire Product_ID expression with the rtrim SQL
Server function, which removes empty spaces from the right side of
Product_ID.
6. Expand the dimension to all descendants in the Dimension Members pane to
see the unique product names.
Note If a child member does not have a corresponding parent member, the
child member is placed at the top of the dimension hierarchy.
The Skipped Levels Column property allows you to create ragged hierarchies
in parent-child dimensions. As defined earlier in the module, a ragged
dimension contains at least one member whose parent belongs to a hierarchy
that is more than one level above the child. Ragged dimensions therefore
contain branches with varying depths.
When using the Skipped Levels Column, you define a column in the
dimension table that indicates the number of levels to skip between each
member and its parent. In a ragged parent-child dimension, extra levels are
added to a branch in the place of one or more parents in the dimension
hierarchy. This differs from ragged standard dimensions, where a parent is
hidden and members are removed from the dimension hierarchy.
You access the Skipped Levels Column property from the Advanced tab of
the Properties pane in the Dimension Editor or the Cube Editor.
Objectives
Explain the lab objectives. After completing this lab, you will be able to:
! Create a parent-child dimension.
! Apply advanced properties to parent-child dimensions.
! Update the structure of a parent-child dimension table.
Prerequisites
Before working on this lab, you must first:
! Complete lab A, Creating a Standard Dimension, found earlier in the
module.
! Complete lab B, Creating a Snowflake Dimension, found earlier in the
module.
Exercise 1
Creating the Employee Dimension
In this exercise, you will create the Employee dimension, and will update
advanced settings by using the Cube Editor.
4. Clear the Data Member Caption template property, and then press
ENTER.
The managers’ data members now look very similar to those of the other
members.
5. Click Process Cube, click Yes to save the cube, click No to design storage,
and then click OK to fully process the cube.
6. When processing completes, close the Process window, click the All
Product member in the Product dimension, and then expand all levels of
the Employee dimension.
You can now easily compare Sheri Nowmer’s individual sales with those
of her entire group and with those of other managers and employees.
Note Be sure that you expand the dimension by double-clicking the level
headings, and not the members in the dimension. The cube browser does not
allow you to see Darren Stanz and Brenda Blumberg if you double-click
their parents; you must double-click the level headings from CEO down to
Supervisor.
3. Notice that Darren and Brenda now appear in the Individual Contributor
level, even though they report directly to their level managers.
In a parent-child dimension, skipping levels creates a ragged hierarchy.
4. Close the Cube Editor.
Exercise 2
Updating a Parent-Child Table
In this exercise, you will update a table in the Module 04 database to include
correct parent-child level mappings.
2. In the following table, fill in the Parent_ID column with the appropriate
Product IDs based upon the hierarchy in the preceding illustration.
You want to map each product to its parent, referencing the Product_ID of
the parent in the Parent_ID column. Use the above hierarchy to identify the
parent of each product.
320 Cola
73 Sliced Turkey
2 Beverages
60 Whole Milk
400 Honey Roasted
30 Deli Meats
1 Food
80 Milk
90 Muffins
279 Blueberry Muffins
56 2% Milk
310 Diet Cola
85 Cola
72 Corned Beef
425 Cajun
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Understanding Dimension Basics
Lead-in ! Shared vs. Private Dimensions
The review questions cover
some of the key concepts ! Working with Standard Dimensions
taught in the module.
! Basic Level Properties
! Working with Parent-Child Dimensions
4. What is the All level? Describe a situation in which you would not use it.
The All level is the top summarization level of dimensions, which exists
by default. Turn off the All level when you do not want the first level
data summarized, as in the case of a Time dimension or a Scenario
dimension.
Overview 1
Working with Levels and Hierarchies 2
Working with Time Dimensions 10
Lab A: Creating Time Dimensions 18
Lab B: Creating Hierarchies from Single
Columns 22
Creating Custom Rollups 29
Lab C: Creating a Custom Rollup 34
Introducing Member Properties 37
Lab D: Creating Member Properties 42
Understanding Virtual Dimensions 44
Lab E: Creating Virtual Dimensions 50
Review 54
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.
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.
Instructor Notes
Presentation: There are several types of dimensions that can be created by using Microsoft®
50 Minutes SQL Server™ 2000 Analysis Services. In this module, you lead students through
a solutions-oriented discussion of various advanced dimension settings and
Labs: methods used to develop online analytical processing (OLAP) dimensions and
70 Minutes cubes. This module contains labs that give students hands-on experience with
various types of real-world dimensions.
After completing this module, students will be able to:
! Work with dimension levels and hierarchies.
! Understand and work with time dimensions.
! Create custom rollup dimensions.
! Define member properties at dimension levels.
! Create virtual dimensions from member properties and member levels.
Required Materials
To teach this module, you need Microsoft PowerPoint® file 2074A_05.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.
The following demonstration procedures provide information that will not fit in
the margin notes or is not appropriate for student notes.
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 the module but are not specifically addressed in the
content of the student notes.
1. Why do you need to disable the counting of members when creating
dimensions?
Some dimensions are so large that Analysis Manager cannot
successfully count the members at all the levels. Analysis Manager can
close down while attempting to count millions of members. Therefore,
in some instances you need to manually enter the member counts due to
the technical restriction in Analysis Manager when working with
extremely large dimensions.
2. How do front-end applications display dimensions containing multiple
hierarchies?
The front-end applications that developers use most often to browse
cubes, namely Microsoft Excel 2000 and the Cube Browser, do not
display multiple hierarchies in the same way that most third-party
applications display them. Excel 2000 and the Cube Browser treat each
hierarchy as a separate, independent dimension. However, most third-
party applications direct the user to select one hierarchy per dimension
at any one time to browse cube data. Therefore, the users never view
multiple hierarchies together on the same report.
3. How much detail do you typically define in a Time dimension?
All Time dimensions vary in the level of detail that they store. OLAP
systems tend to store data at a more summarized level than operational
systems. Therefore, a common hierarchical structure in Time
dimensions includes Year, Quarter, and Month. However, many
companies track daily sales in OLAP cubes and therefore store data
down to the Day level. Manufacturing systems exist that define Time
down to the Minute level. The levels defined in a Time dimension
depend on the reporting and processing requirements of the cube.
4. How slow are queries that use virtual dimensions?
Query performance depends on a variety of factors, including cube
complexity, the number of members in a virtual dimension, the amount
of data accessed by the query, and even network traffic. Therefore, you
must test the performance of queries that incorporate virtual
dimensions to ensure that the response times are not excessively slow.
Virtual dimensions in Analysis Services have improved since their
initial release in SQL Server [version 7.0] OLAP Services. Nevertheless,
you should always test performance before releasing cubes to users.
Module Strategy
Use the following strategy to present this module:
! Working with Levels and Hierarchies
Explain the importance of levels in the hierarchical structure of a dimension.
Define the various level settings and describe how these settings enhance
levels and hierarchies. Define the hierarchies and describe how to create
multiple hierarchies in a single dimension. Describe the ways to create
grouping levels in dimensions containing large amounts of members.
! Working with Time Dimensions
Explain the importance of Time dimensions in OLAP cubes. Describe the
characteristics of Time dimensions and explain how to create them. Discuss
various Time dimension properties and why they are used. Explain what a
fiscal date hierarchy is and when it used. Finally, describe how to use a
string to define a Time dimension.
! Creating Custom Rollups
Define custom rollups and describe how they are used to model hierarchical
calculations in dimensions. Introduce the use of unary operators, and
describe the different operators and their behaviors. Finish the section by
describing how to employ custom rollups in a dimension and the restrictions
related to creating them in cubes.
! Introducing Member Properties
Introduce the use of member properties in dimensions. Describe the
characteristics of member properties and explain the steps of creating and
previewing a new member property.
! Understanding Virtual Cube Dimensions
Begin the section by defining virtual dimensions. Explain when they are
used and how they are created. Compare virtual dimensions to regular
dimensions and discuss when each type of dimension should be used.
Overview
Topic Objective
To provide an overview of
the module topics and ! Working with Levels and Hierarchies
objectives.
Lead-in ! Working with Time Dimensions
In this module, you will learn ! Creating Custom Rollups
about advanced dimension
types and settings. ! Introducing Member Properties
! Understanding Virtual Dimensions
There are several types of dimensions that can be created by using Microsoft®
SQL Server™ 2000 Analysis Services. This module consists of a solutions-
oriented discussion of various advanced dimension settings and methods used
to develop online analytical processing (OLAP) dimensions and cubes. This
module contains labs that give you hands-on experience with various types of
real-world dimensions.
After completing this module, you will be able to:
! Work with dimension levels and hierarchies.
! Understand and work with time dimensions.
! Create custom rollup dimensions.
! Define member properties at dimension levels.
! Create virtual dimensions from member properties and member levels.
Level Type
The Level Type property is set for each level in a dimension and describes the
type of each level. Most of the available settings for the Level Type property
apply to Time dimensions. By default, the Level Type of a level is set to
Regular.
Some examples of level types are the following:
! Years
! Quarters
! Months
! Organizational Unit
! Country
The Level Type property does not affect how the levels of a dimension are
stored or processed. However, some front-end applications use the Level Type
property in presenting levels. In addition, some multidimensional expressions
(MDX) functions use the Time level type when performing calculations such as
year to date and quarter to date totals.
Visible
The Visible property indicates whether a level is visible or not to users as they
browse the cube. By default, the property is True. When the Visible property of
a level is False, users cannot see the level, but MDX statements can access the
level and members of the level.
Change the Visible property of a level to False in the following scenarios:
! You want to use a level in calculations but you do not want users to browse
the level in front-end applications.
! You want to temporarily remove a level of a dimension. You can set the
Visible property to False, and can then change it back to True without
removing the level entirely.
! You want to hide a level created with the Grouping property to overcome
the 64,000 children limitation. In this case, the level exists to overcome the
limitation, and you do not want users to see the fabricated level.
Defining a Hierarchy
Topic Objective
To define the term
hierarchy.
! A Hierarchy Is a Set of Members and Levels within a
Lead-in Dimension
The term hierarchy refers to
the set of members in a ! By Default, a Dimension Contains One Hierarchy
dimension and the levels to
which the members belong. ! Analysis Services Supports a Variety of Hierarchies
$ Regular hierarchies, which are balanced
$ Parent-child hierarchies, which are unbalanced
$ Ragged hierarchies, which can occur in both regular and
parent-child hierarchies
! A Dimension Can Contain Multiple Hierarchies
Lead-in Region 1
Department A
Creating multiple hierarchies Department B
in a dimension is very
straightforward in Analysis Region 2 Two Hierarchies
Department C
Services. Department D
Department.Management
Manager 1
Department A
Department C
Department D
Manager 2
Department B
Explain how the Creating multiple hierarchies in a dimension is very straightforward in Analysis
Department dimension Services. If you have the skills to create multiple dimensions in an OLAP
summarizes the leaf-level database, you have the skills to create multiple hierarchies in a dimension.
members in two
independent ways. To create multiple hierarchies in one dimension, perform the following steps in
the Dimension Wizard:
Ask students if they can
think of a use for multiple 1. For each hierarchy, create a new dimension.
hierarchies in their own 2. At the final step of the wizard, name each dimension and select the Create a
companies.
hierarchy of a dimension check box. Type the hierarchy name and click
Finish. The final name format is DimensionName.HierarchyName.
Note You can create a hierarchy by using the Dimension Editor. Simply
name the dimension with the format DimensionName.HierarchyName.
3. Add the two hierarchies to the cube as if they were separate dimensions.
4. View the hierarchies in the cube. The way the front end displays the
hierarchies depends on the front-end application and how it handles multiple
hierarchies in a dimension.
Note If you create a dimension name without a period, the dimension has one
unnamed hierarchy.
O–Z
C
Castillo
D
Derry
De Carlo
Dumin
H
Hance
Hunt
M
Masters
Mehlert
If your customer table does not contain a column with the first letter of the
customer name, but it does contain the column Customer_Name, you can
create the two-level hierarchy by performing the following steps:
1. Add two levels to the dimension, both based on the Customer_Name
column.
2. In the top level, update the Member Key Column and the Member Name
Column so that they contain the following expression:
Left("Customer"."Customer_Name", 1)
Note The syntax of the expression may vary, depending on the data source
of the dimension.
3. The bottom level uses the Customer_Name column to define the Member
Key Column.
4. When users drill down into the dimension, they see a top level containing
first letters of customer names, and the bottom level containing customers
below each associated letter.
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
10 Module 5: Using Advanced Dimension Settings
Nearly every OLAP database has a Time dimension. Often, a Time dimension
contains months as the lowest level of detail—aggregated into quarters and
years. Sometimes, a Time dimension contains days at the lowest level of detail.
On occasion, particularly if you are monitoring a manufacturing operation, a
Time dimension has minutes or even seconds as the lowest level of detail.
Whatever the level of detail, a Time dimension has certain unique qualities. In
this section, you will learn about the characteristics of Time dimensions and
how to create them in OLAP cubes.
The following specific topics are covered:
! Creating dates by using the Dimension Wizard.
! Using a separate dimension table for dates.
! Setting Time dimension properties.
! Creating a fiscal date hierarchy.
! Building a hierarchy from a string.
If it is possible with your required Time levels, the best practice is to create a
Key Point new Time dimension by using the Dimension Wizard instead of the Dimension
When you create a new
Time dimension, the best
Editor. The Dimension Wizard constructs an entire hierarchy from a single
practice is to create it by Date/Time column and uses built-in intelligence to define the levels.
using the Dimension Wizard
Any valid SQL statement can be used for the Member Key Column and the
instead of the Dimension
Editor.
Member Name Column. The Dimension Wizard automatically uses
appropriate data source functions in the Member Key and Member Name
Columns to create the levels.
The following table contains expressions that are automatically created for a
SQL Server 2000 data source by using the Dimension Wizard.
Year DatePart(year,"dbo"."TimeMonth"."Month")
Quarter DatePart(quarter,"dbo"."TimeMonth"."Month")
Month DatePart(month,"dbo"."TimeMonth"."Month")
After you create a Time dimension in the Dimension Wizard, you can modify it
by using the Dimension Editor. For example, if you want to see the day name as
Month – Day, you can concatenate the month and day expressions in the
Member Name Column of the day level.
The DatePart function used in the preceding example is not a standard
relational database function—it is a function supported by SQL Server and
Microsoft Access. When working with other supported RDBMS sources, the
Dimension Wizard generates a correct expression for that RDBMS.
When you design a data warehouse to use with Analysis Services, it is generally
a best practice to create a separate dimension table for dates rather than use a
Date/Time column in the fact table.
As with other dimension tables, you use an integer key to join the date
dimension table with the fact table. Creating a separate date dimension table has
certain advantages over storing a Date/Time column in the fact table.
Note For more information about virtual cubes, see module 12, “Working with
Virtual Cubes,” in course 2074A, Designing and Implementing OLAP Solutions
with Microsoft SQL Server 2000.
In addition to the Time dimension type, the following types are available for
levels in Time dimensions:
! Years
! Half-Years
! Quarters
! Months
! Weeks
! Days
! Hours
! Minutes
! Seconds
! Time-Undefined
The Type property of a dimension and the Level Type property of a level are
significant only when dealing with a Time dimension. Even in a Time
dimension, these properties are not critical.
Note The Type property of a dimension or a level has no direct effect on the
Analysis Server. The Type property is available for a client application to
inspect and for certain MDX functions. However, the server does not behave
differently when a dimension or level has a Time value for the Type property.
You can change the Type property of a Time dimension to Standard or that of
a Product dimension to Time. It does not matter to the server.
One irregularity that frequently arises when dealing with time is that many
Delivery Tips organizations use a fiscal year in which the starting day of the year is not
Tell students that they will
be creating a fiscal
January 1.
hierarchy in the lab. Sometimes, a company uses a fiscal year for internal reporting purposes but
must still use a calendar year when communicating with customers. The same
Ask students if they use
multiple time hierarchies in
lowest level data—for example, March 1, 2000—could be the first month of a
their own reporting systems. fiscal year and the third month of the calendar year.
To choose which way to display that lowest level date, you must use two
different hierarchies. Analysis Services allows you to define separate
hierarchies when you create the dimension. Because you cannot rename an
existing shared dimension, you must plan for multiple hierarchies before
creating the dimension.
You do not always have control over the source RDBMS that defines the
Delivery Tips dimensions and cubes. Often, you are provided with the data warehouse and
For more information about
using expressions to define
you must work with it without having the flexibility of creating new tables to
dimensions, see module 4, define dimensions and cubes.
“Building Dimensions Using
When building a Time hierarchy from a Date/Time column, you can use
the Dimension Editor,” in
course 2074A, Designing
Analysis Manager’s built-in date intelligence to define Time dimension levels
and Implementing OLAP and members. However, in many systems, dates are stored as strings and no
Solutions with Microsoft Date/Time columns exist from which to define Time dimension levels.
SQL Server 2000.
When you only have string columns to build Time dimensions, you can use
Tell students that they will expressions in the Member Key Column and Member Name Column to
be creating a Time define the levels and members. In addition, you can update the dimension and
dimension by using level Type properties to specify the Time dimensions.
expressions in the lab.
Objectives
Explain the lab objectives. After completing this lab, you will be able to:
! Create a Time dimension by using the Dimension Wizard.
! Add a hierarchy to an existing dimension.
Prerequisites
Before working on this lab, you must have:
! Experience working with the Dimension Editor.
! An understanding of dimension, level, and member properties.
Exercise 1
Creating the Time.Calendar Dimension
In this exercise, you will create a calendar Time dimension hierarchy by using
the Dimension Wizard to define levels. You will also see how the Dimension
Wizard uses expressions in the Member Name Column and Member Key
Column properties to create a hierarchy from a single date value.
6. Click the Calendar Month level, and compare the values of the Member
Key Column and the Member Name Column properties.
The expression for the Member Key Column is:
DatePart(month,"dbo"."TimeMonth"."Month")
7. Click the Calendar Quarter level, and look at the expression for the
Member Name Column.
'Quarter ' + convert(CHAR,
DatePart(quarter,"dbo"."TimeMonth"."Month"))
8. Change the expression in the Member Name Column to display only Qtr
as a prefix instead of Quarter. Press ENTER, and then browse the dimension
to see the revised member names.
9. Click Save, and then close the Dimension Editor.
Exercise 2
Creating the Time.Fiscal Dimension
In this exercise, you will create a fiscal year hierarchy by using the Dimension
Wizard to define the levels and members. This hierarchy, when added to a cube
containing the Time.Calendar hierarchy, will give you another way to
summarize monthly data. You will perform the same steps in as in Exercise 1,
but will give this hierarchy the name required to include the hierarchy in the
existing Time dimension.
Objectives
Explain the lab objectives. After completing this lab, you will be able to:
! Create a Time dimension by using the Dimension Editor and expressions.
! Creating a level by using the Grouping property.
Prerequisites
Before working on this lab, you must have:
! Experience working with the Dimension Editor.
! An understanding of dimension, level, and member properties.
Lab Setup
To complete this lab, you must first complete lab A, Creating Time
Dimensions, found earlier in the module.
Exercise 1
Creating the TextTime Dimension
In this exercise, you will create a Time dimension by using the Dimension
Editor to create the hierarchy of levels. By using a text column instead of a
Date/Time column, you will define three time levels. You will update the
Member Key Column and the Member Name Column and will use various
SQL Server string functions. Finally, you will update the appropriate dimension
and level properties, defining the dimension as a Time dimension.
2. Press ENTER. Notice the error you receive when attempting to browse the
dimension in the Data pane.
Why is the expression causing an error in the dimension?
The Year level is created from the Member Key Column. After the
Member Key Column builds the level, the Member Name Column
attempts to name every member in the level. When the Member Key
Column is defined as "dbo"."TextTime"."Date", the Year level
contains 24 members, because the Date table contains 24 distinct records.
Twelve of the members are periods found in 2000 and the other twelve
members are periods found in 2001.
When the Member Name Column attempts to name the 24 members by
using the expression Left("dbo"."TextTime"."Date", 4), it extracts
the first four characters of each member. The characters are either 2000 or
2001, depending on the year of the period. Because the Year level members
have one parent, All TextTime, all members must be unique at the level.
Therefore, applying the expression to the Member Name Column causes
you to receive the uniqueness error, due to the level containing twelve 2000
members and twelve 2001 members.
3. Change the Member Name Column to the original value,
“dbo”.”TextTime”.”Date”, by copying and pasting the expression from
the Member Key Column.
4. Preview the dimension in the Dimension Members pane. Notice the 24
members in the Year level.
5. Update the Member Key Column of the Year level with the following
expression:
Left("dbo"."TextTime"."Date", 4)
6. Preview the dimension. Notice the two members and their member names.
The level contains two members—one beginning with 2000 and the other
beginning with 2001. However, the member names do not reflect the new
expression. Why is the member name incorrect?
The Member Name Column is still basing the member name directly from
the Date column. Therefore, you must update the Member Name Column
value also.
7. Update the Member Name Column with the expression
Left("dbo"."TextTime"."Date", 4) by copying and pasting the
expression from the Member Key Column.
8. Preview the dimension and notice the correct member names.
Tip The Right string function returns the part of a character string starting
a specified number of characters from the right. The format of the Right
string function is Right (character_expression, integer_expression).
Right("dbo"."TextTime"."Date", 2)
____________________________________________________________
3. Update the Member Key Column and Member Name Column, and then
preview the dimension to verify that the member names are correct at the
Quarter level.
You should see Q1, Q2, Q3, and Q4 beneath the Year members 2000 and
2001.
2. In the Dimension Members pane, preview the dimension and expand the
dimension to the Period level. Notice the member names, 01 through 12, in
both years.
For example, the Quarter level Member Name Column will use the
following expression:
Left("dbo"."TextTime"."Date", 4) + ' - ' +
Right("dbo"."TextTime"."Date", 2)
3. Change the Member Names Unique properties to True for the Quarter
and Period levels.
4. Preview the dimension in the Dimension Members pane, expanding the
dimension to the Period level.
5. Change the dimension Type property from Standard to Time.
6. Change the Year, Quarter, and Period Level Type properties to Years,
Quarters, and Months, respectively.
7. Change the dimension All Level property value to No.
8. Preview the dimension in the Dimension Members pane.
9. Save the dimension and then close the Dimension Editor.
Exercise 2
Creating the Grouping_Customer Dimension
In this exercise, you will create a dimension with two levels from one column,
Customer_Name. You will create a cube that uses a single table as both the
fact table and the dimension table. The table contains sales dollars and sales
units for customers, but does not contain any means for classifying those
customers. To make the customer dimension simple to navigate, you will use
the Grouping property to create a grouping level.
The following table lists unary operators and their behaviors with siblings.
Operator Behavior
Plus (+) The member value is added to the total value of the above siblings.
Minus (-) The member value is subtracted from the total value of the above
siblings.
Asterisk (*) The member value is multiplied by the total value of the above
siblings.
Slash (/) The total value of the above siblings is divided by the member
value.
Tilde (~) The member value is ignored for aggregation purposes.
When you create dimensions that contain custom rollups, you apply a variety of
Key Point settings to enable the rollups and to conform to special conditions. The settings
Write-enabled dimensions
are parent-child dimensions
are as follows:
that allow users to update ! You set the level property Unary Operators to True to enable custom
the contents of a dimension
rollups in a dimension. You can find this property on the Advanced tab of
and see immediate results
in their cubes. For more
the Properties pane in the Dimension Editor. The property is also available
information on write-enabled in the Dimension Wizard when you create a parent-child dimension.
dimensions, see SQL ! After setting the Unary Operators property to True, you define the column
Server Books Online. where the Custom Rollup Operators are found. Either the Unary Operator
column already exists in the dimension table, or you create a new column
that acts as the Unary Operator column.
If the column is created in Analysis Manager, you must have write-access to
the dimension table in the source data warehouse.
! The order of the unary calculations is based on the order of members in the
specified level. Therefore, it is important that you determine not only the
correct unary operators for each member, but also the order that the
calculations perform in the dimension level. Order the members
accordingly.
! The Unary Operator column must contain the appropriate custom rollup
operators. You define the operators either through the Dimension Editor if
the dimension is write-enabled, or through updating the column outside of
Analysis Manager if the dimension is not write-enabled.
Prerequisites
Before working on this lab, you must have:
! Experience working with the Dimension Wizard and the Dimension Editor.
! Knowledge about parent-child dimensions.
Lab Setup
To complete this lab, you must first complete:
! Lab A, Creating Time Dimensions, found earlier in the module.
! Lab B, Creating Hierarchies from Single Columns, found earlier in the
module.
Exercise 1
Creating the Account Dimension
In this exercise, you will create a parent-child dimension that contains a custom
member rollup. You will begin by creating the dimension in the Dimension
Wizard and then finish by updating properties in the Dimension Editor.
Note The dimension type has no effect on the Analysis Server, but a client
application may take advantage of the information when it presents the
dimension to users.
6. In the Dimension tree, expand the Account dimension, and then click the
Account Id level. Change the level’s Order By property to Key and then
press ENTER.
7. Browse the dimension in the Dimension Members pane. Notice the member
order, which is now sorted by Account Id.
Member properties are associated with dimension levels, and you create them in
the Dimension and Cube Editors. The interfaces for creating member properties
are simple and straightforward.
Lab Setup
To complete this lab, you must first complete:
! Lab A, Creating Time Dimensions, found earlier in the module.
! Lab B, Creating Hierarchies from Single Columns, found earlier in the
module.
! Lab C, Creating a Custom Rollup, found earlier in the module.
Exercise 1
Creating Product Dimension Member Properties
In this exercise, you will create two member properties, Price and Category
Manager. They exist at separate levels in the Product dimension. You will
create and preview the member properties in the Dimension Editor.
Note You can create a member property at any level. A member property
applies to the single level. If products and families also had managers, you
would need to create a separate member property for each level.
When deciding on dimension types for the cubes, you must understand the
benefits of using virtual dimensions versus regular dimensions. The following
are characteristics of virtual dimensions:
! Virtual dimensions are based on member properties and levels of physical
dimensions.
! From the user’s point of view, a virtual dimension is no different from a
physical dimension. Users view and manipulate virtual dimensions just like
any other dimension.
! Virtual dimensions can contain multiple levels defined in their structure.
! Virtual dimensions can contain member properties associated with their
levels.
! Analysis Services does not create aggregations for virtual dimensions.
! Virtual dimensions do not affect cube storage or cube processing time.
! Virtual dimensions increase query times for queries that reference them.
This is because aggregations are not created for virtual dimension members
at cube processing time. However, virtual dimensions do not affect queries
that do not reference them.
Virtual dimensions are very useful, but may not always provide the best
Delivery Tip solution for the users. You must determine the most optimal situations in which
Use this slide to summarize
the discussion of virtual
to use virtual dimensions in cubes.
dimensions. Students
should understand when to When to Create a Virtual Dimension
use and when not to use
The following list describes situations in which you create a new virtual
virtual dimensions in a cube.
dimension for the cube:
! Cube Processing Times Are a Problem. You can reduce cube processing
times by using virtual dimensions instead of regular dimensions. No data or
aggregations are produced for virtual dimensions and therefore cube-
processing times are not impacted by the addition of virtual dimensions to
the schema of a cube.
! Cube Storage Is a Problem. Virtual dimensions do not add data or
aggregations to a cube. Therefore, the addition of a virtual dimension to the
cube schema does not affect cube size.
! A Minority of Users Require a Dimension. If only a few users need to see
information by a particular variable—for example, customer data by
gender—then that variable is a good candidate for a virtual dimension.
Virtual dimensions can cause slow queries, depending on the number of
members found in the virtual dimension and on the number of members in the
source dimension. However, the only queries impacted by virtual dimensions
are those queries that include the virtual dimension.
In the above gender example, gender reports may be slow for the few users
accessing them, but no reports for the other users are impacted.
Delivery Tips To place a virtual dimension in a cube, you must perform the following steps:
The steps for this 1. Create the source member property, if the virtual dimension is based on a
demonstration are included
member property,
in the Instructor Notes.
2. Create a new virtual dimension.
Tell students that they will
be performing the same
3. Add the virtual dimension to the cube.
exercise themselves in the 4. Process the cube.
next lab. Therefore, if they
follow along with your In this demonstration, you will learn how to create a virtual dimension and how
demonstration, they can
to add it to a cube.
skip the repeated
procedures in the lab.
Objectives
Explain the lab objectives. After completing this lab, you will be able to:
! Create a virtual dimension based on a member property.
! Create a virtual dimension based on a level in a dimension.
Lab Setup
To complete this lab, you must first complete:
! Lab A, Creating Time Dimensions, found earlier in the module.
! Lab B, Creating Hierarchies from Single Columns, found earlier in the
module.
! Lab C, Creating a Custom Rollup, found earlier in the module.
! Lab D, Creating Member Properties, found earlier in the module.
Exercise 1
Creating the Gender Dimension
In this exercise, you will create a virtual dimension based on a member property
defined in the Customer dimension. You will create a new member property,
Gender, and will create a new virtual dimension from Gender. Finally, you
will create a new cube and will add the Customer and Gender dimensions to
its schema.
Exercise 2
Creating the Quarter Dimension
In this exercise, you will create a virtual dimension based on a level in the
BrandTime dimension. You will then add the virtual dimension to the Brand
cube to see how you can split a dimension across separate axes in a report by
using virtual dimensions.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Working with Levels and Hierarchies
Lead-in ! Working with Time Dimensions
The review questions cover
some of the key concepts ! Creating Custom Rollups
taught in the module.
! Introducing Member Properties
! Understanding Virtual Dimensions
2. Describe some reasons to create a separate date dimension table in the data
warehouse source.
A separate date dimension table can contain time-related properties to
enhance analysis. In addition, using a separate table reduces overall
storage space. Finally, a separate date dimension table facilitates the
creation of a shared date dimension used in multiple cubes.
Contents
Overview 1
Introduction to Cubes 2
Working with Cubes 5
Introduction to Measures 11
Lab A: Creating Cubes with the Cube Editor 15
Working with Measures 19
Defining Cube Properties 28
Using the Disabled Property 30
Lab B: Using Properties in the Cube Editor 32
Review 35
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, your 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.
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.
Instructor Notes
Presentation: Other modules in this course review the mechanics for creating different types
60 Minutes of dimensions and how to solve common online analytical processing (OLAP)
design issues. Though dimensions are fundamental to multidimensional
Labs: reporting, the database cube combines dimensions with measures to answer
30 Minutes complex business questions. In this module, students use the Cube Editor in
Microsoft® SQL Server™ 2000 Analysis Services to create and manipulate
cubes, add measures and dimensions, and assign properties to improve cubes.
After completing this module, students will be able to:
! Define the required components of cubes.
! Create cubes by using the Cube Editor.
! Describe the characteristics of measures.
! Assign properties to measures.
! Modify cube properties by using the Cube Editor.
! Disable levels of shared dimensions.
Required Materials
To teach this module, you need Microsoft PowerPoint® file 2074A_06.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all of the student materials.
! Read the instructor notes and margin notes.
! Practice the lecture presentation and demonstration.
! Complete the lab.
! 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.
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 the module but are not specifically addressed in the
content of the student notes.
1. Will the Validate Cube Structure tool in the Cube Editor find most
problems with a cube?
The Validate Cube Structure tool does not find most problems
associated with a cube. It notifies you if a cube does not contain at least
one measure and at least one dimension. In addition, it notifies you if
not all tables in the cube schema are joined to at least one other table.
However, most errors in a cube are found in the underlying data in the
fact table and dimension tables. Therefore, the only method of ensuring
that the cube is complete and error-free is to process the cube, to watch
for errors in the Process dialog box, and to verify correct data values
within a cube browser.
2. How can you move easily from the Cube Editor to the Dimension Editor to
update shared dimensions?
There is no way to easily move from the Cube Editor to the Dimension
Editor. You must first close the Cube Editor and then open the
Dimension Editor for that dimension. In addition, you cannot minimize
the Cube Editor or any windows in Analysis Manager.
3. How do you add a measure to a cube when the measure is not in the fact
table?
All measures must be found in the fact table defined in the cube
schema. If your cube requires a measure from another fact table, you
can create a view in the relational database management system
(RDBMS) and build a cube directly from the view. You can also create
another cube with the same dimensions and then create a virtual cube
that combines the measures of the two cubes and their shared
dimensions.
4. How do you model measures that require a hierarchy, such as a chart of
accounts?
Because the measures dimension is flat, you cannot create a hierarchy
by defining the accounts as measures. However, you can model the
accounts as a parent-child dimension. If you are defining typical
measures as members in a dimension, you can create a single measure,
Amount, because cubes require at least one measure. Then, you use a
custom roll-up to assign various aggregations to each of the accounts in
the parent-child dimension.
Module Strategy
Use the following strategy to present this module:
! Introduction to Cubes
Explain the characteristics of cubes. Discuss the programmatic limitations
associated with cubes and measures.
! Working with Cubes
Describe the Cube Editor interface and give an informal demonstration of
each of the Cube Editor areas. Explain the steps involved in creating a new
cube by using the Cube Editor. Describe the differences between defining
private and shared dimensions in a cube.
! Introduction to Measures
Define the characteristics of measures. Explain the process of adding new
members to a cube, deleting measures from a cube, and modifying measures
in the Cube Editor. Finish the discussion with lab A, in which students
create simple cubes, add dimensions and measures, and view properties in
the Cube Editor.
! Working with Measures
Describe each of the measure properties found in the Cube Editor. Explain
each of the Aggregate Function properties and give examples of when to
use Sum, Count, Min, Max, and Distinct Count. Define derived measures
and discuss their limitations in creating calculations.
! Defining Cube Properties
Explain each of the cube properties available in the Cube Editor. Discuss the
real-world application of each property.
! Using the Disabled Property
Explain the Disabled property used in the Cube Editor to disable dimension
levels. Finish the module with lab B, which highlights several measure,
dimension, and cube properties.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Introduction to Cubes
Lead-in ! Working with Cubes
In this module, you will learn
about the Cube Editor and ! Introduction to Measures
how it can be used to create
and manipulate cubes, add ! Working with Measures
measures and dimensions,
and assign properties to ! Defining Cube Properties
improve cubes.
! Using the Disabled Property
# Introduction to Cubes
Topic Objective
To introduce the concept of
cubes.
Lead-in ! Characteristics of Cubes
In this section, you learn the ! Analysis Services Limitations
characteristics of cubes and
the limitations associated
with cubes and measures.
Characteristics of Cubes
Topic Objective
To describe the fundamental
characteristics of cubes.
Lead-in ! Combine Dimensions and Measures
Now let us discuss the ! Provide the Mechanism for Uniform and Rapid Query
fundamental characteristics
of cubes.
Response
! Are Subsets of Data from a Data Warehouse that Are
Converted to Multidimensional Structures
! Contain Precalculated Summaries of Data Called
Aggregations
! Contain up to 128 Dimensions
When designing cubes and measures, you need to know the programmable
Delivery Tips limits of Analysis Services. In most cases, the limits far exceed real-world
Review each of the limits,
using the slide to illustrate
requirements. However, cube and measure requirements sometimes require
the discussion. changes because of the limitations.
The following table lists some published limits of Analysis Services.
Ask students whether any
limit might be a problem for Item Limit
them when they design
cubes for their business Dimensions per cube 128
needs.
Levels per cube 256
Measures per cube 1,024
Calculated members per cube 65,535
Record size for cube’s source database 64 kilobytes
table
The Cube Editor is one of the primary interfaces for refining and changing
cubes and dimensions. In this section, you explore the basic elements of the
Cube Editor and learn how to use it to create and edit cubes.
You can quickly build a cube by using the Cube Wizard. However, many of the
properties available in the Cube Editor are not available in the Cube Wizard. If
you create a cube by using the Cube Wizard, you will probably use the Cube
Editor later to refine the cube and measures.
If you are familiar with the Dimension Editor, the Cube Editor is a very
Delivery Tip straightforward interface for working with cubes and measures.
Open the Cube Editor for a
cube in Analysis Manager
and demonstrate the Accessing the Cube Editor
interface described on this Analysis Manager is an easily navigated interface. Because of the context-
page.
sensitive menus, you typically right-click the object you want to modify or
define and then choose the proper menu option. You can access the Cube Editor
in three ways:
! The Cube Editor automatically opens after the last step of the Cube Wizard.
! In Analysis Manager, right-click the Cubes folder, click New Cube, and
then click Editor.
! In Analysis Manager, right-click the cube, and then click Edit.
The Cube Wizard provides you with a systematic interface for creating new
Key Point cubes. Creating cubes through the Cube Editor is also very straightforward. The
The Validate Cube
Structure tool confirms that
following steps take you through the process of creating a new cube by using
the cube contains at least the Cube Editor:
one measure and at least
1. Right-click the Cubes folder, click New Cube, and then click Editor.
one dimension, and that all
tables included in the cube 2. Choose a fact table from the data source.
schema have legitimate
joins.
3. Select the measures for the cube from the fact table in one of three ways:
• Drag the selected numeric fields from the fact table to the Measures
folder in the tree pane.
• On the Insert menu, click Measure, and then select each measure
individually.
• Click Insert Measure, and then select each measure individually.
4. Insert the shared dimensions into the cube:
• Either right-click the Dimensions folder, and then click Existing
Dimensions, or click Insert Dimension.
• Add the shared dimensions to the cube by moving them from the
Shared dimensions list to the Cube dimensions list.
Note The Cube Editor adds any tables used to build a shared dimension to
the cube schema when you insert an existing shared dimension. If the
dimension key found in the dimension table has the same name as the
dimension key found in the fact table, a join is created automatically. If the
Cube Editor does not create the join automatically, you can create a join
manually by dragging the key from the dimension table to the key in the fact
table.
6. On the Tools menu, click Validate Cube Structure to verify that all joins
and measures are accurate.
Note The Validate Cube Structure tool confirms that the cube contains at
least one measure and at least one dimension, and that all tables included in
the cube schema are joined to at least one other table.
You set dimension properties in the Dimension Editor or the Cube Editor. The
editor you use depends on whether the dimension is private or shared.
Note For more information about optimizing cube processing by updating the
Member Key Column, see module 9, “Processing Dimensions and Cubes,” in
course 2074A, Designing and Implementing OLAP Solutions with Microsoft
SQL Server 2000.
# Introduction to Measures
Topic Objective
To introduce the concept of
measures.
Lead-in ! Defining Measures
Measures are the numeric ! Adding, Deleting, and Modifying Measures
data of primary interest to
the users of a cube.
Understanding the
characteristics and
mechanics of measures is
fundamental to working with
cubes
Measures are the numeric data of primary interest to the users of a cube.
Understanding the characteristics and mechanics of measures is fundamental to
working with cubes.
Defining Measures
Topic Objective
To define several
characteristics of measures
and the measures ! Measures ! The Measures Dimension
dimension.
$ Must be numeric $ Is flat
Lead-in
$ Must originate from the fact $ Is limited to 1,024 members
All cubes by definition
table
contain a measures $ Is always private
dimension. The measures $ Force the redesign of
dimension is different from aggregations when added,
other dimensions in several deleted, or modified
respects.
$ Are aggregated across all
dimensions
$ Consume disk space
! Measures are stored in the cube and consume disk space after the cube is
processed.
The Cube Wizard walks you through the steps required to create a cube. Once a
Key Point cube is defined, however, the only way to add, delete, or modify a measure is
Adding, deleting, or
modifying measures in a
by using the Cube Editor.
production cube is a major
procedure. In doing so, you Adding a Measure to a Cube
must redesign cube storage,
To add a measure to a cube by using the Cube Editor, perform the following
redesign aggregations, and
reprocess the cube.
steps:
1. In the Cube Editor, right-click the Measures folder, and then click New
Measure.
2. Select a column from the fact table.
Prerequisites
Before working on this lab, you must have:
! Experience working with dimensions.
! An understanding of dimensions, cubes, and measures.
Exercise 1
Creating a Simple Cube
In this exercise, you will create a basic cube, adding a single measure and one
private dimension by using the Cube Editor. You also will create a valid cube
and browse the resulting data.
Exercise 2
Creating the Sales Cube
In this exercise, you will create another cube—Sales. In this cube, you will add
dimensions already defined in the Module 06 database. You finish by
processing and browsing the cube to test for correct data.
When you create a measure in a cube, you must determine the basic properties
and the Aggregate Function property to assign the measure. In addition, you
can update the Source Column of the measure to create a derived measure in
specific circumstances.
In this section, you will learn about:
! Defining measure properties.
! Aggregating measures.
! Working with derived measures.
When you add new measures to a cube, the Cube Editor sets the properties of
Delivery Tip the measure to a default setting. In most instances, you do not change the
Open the Cube Editor and
review each property as you
default setting of a measure.
describe it. The properties of a measure provide a wide range of functions. For example,
you can change the aggregation method and the display format of a measure.
Measure properties include the following.
You change the name from the default name by clicking the measure you want
to update, and then by typing the new name in the Name property on the
Properties pane.
By default, the Description property is blank. Updating the description field
adds descriptive information accessible by front-end applications.
Source Column
The Source Column on the Basic tab of the Properties pane identifies the
column that provides the measure from the source RDBMS fact table.
The following items are characteristics of the Source Column property:
! The property typically specifies an RDBMS column containing source
columns in “Fact table”.“Column” format.
! Source Column must originate from a numeric data type, except when the
Count or the Distinct Count aggregation methods are used. If the Count or
the Distinct Count methods are used, the source column can be a string.
Point out that the situations ! Source Column can consist of any valid SQL expression involving one or
in which you use more columns from the fact table, similar to the Member Key Column and
expressions for the source the Member Name Column for dimension levels. However, because of
column of a measure are aggregation behavior and the handling of null values in the RDBMS, you
discussed later in this use expressions for the source column of a measure only in very specific
module. situations.
Formatting Measures
The Display Format property on the Advanced tab of the Properties pane is
used to change the format for displaying a measure.
There are two ways to enter a format for displaying a measure:
! A format can be selected from the Display Format property list.
! If the required format is not in the list, it can be typed in manually. If the
client application recognizes the entered format, the measure appears in the
applied format. For example, to display data for a measure rounded to the
nearest thousandth, type #,#.000 in the Display Format property. Some
client interfaces recognize this format and display the measure correctly.
Visible Measures
By default, measures you create in a cube are visible. However, Analysis
Services allows you to designate a measure as invisible. An invisible measure is
not available to client software. You designate a measure as invisible by setting
the Visible property to False. For example, you may want to use the measure
Count as an intermediate value for creating a calculated measure, Average
Units, but you do not want Count to appear in the list of available measures in
a client application. In this situation, set the Visible property of Count to False.
The Visible property is set on the Advanced tab in the Properties pane. When
this property is set to False, the measure is hidden from clients, including
custom applications.
Data Type
The Data Type property is available from the Advanced tab of the Properties
pane. Because measures are numeric, all available Data Type fields are
numeric.
The following characteristics are true of the Data Type property:
! When you create a measure, Analysis Manager attempts to set the Data
Type property according to the data type of the column in the data source.
! When specifying the data type for a measure, be certain that the data type
can accommodate the measure at its aggregated level. The cube editor will
not warn you if this data type is too small for the measure.
! If the data type is too small, an error will occur during processing of the
cube.
Aggregating Measures
Topic Objective
To describe the five
Aggregate Function
property settings applied to ! Sum—The Summation of a Measure
measures.
! Count—The Number of Measures
Lead-in
Whether precalculated or ! Min—The Minimum Value of a Measure
calculated at query time, five
types of Aggregate ! Max—The Maximum Value of a Measure
Functions exist for
measures. They are Sum, ! Distinct Count—The Number of Unique Measures
Count, Min, Max, and
Distinct Count.
When you browse a cube and drill up the levels in a dimension, the cube
Delivery Tips browser displays values aggregated to each of the levels. By default, the
Discuss real-world
examples of when you use
measures are summed, which means that lower-level values are summed
each Aggregate Function together to obtain higher-level values. Measures that are summed have the
setting. Aggregate Function of Sum.
Tip Use the Count Aggregate Function to create a calculation that computes
an average. For example, to calculate the average price of products, divide the
total price by the count of the number of products in the fact table.
Tip Virtual cubes can contain multiple Distinct Count measures and can
Note For more information about virtual cubes, see module 12, “Working
with Virtual Cubes,” in course 2074A, Designing and Implementing OLAP
Solutions with Microsoft SQL Server 2000.
Similar to using expressions in the Member Key Column and Member Name
Column to create a dimension, you can create a derived measure from one or
more fact table columns by using an SQL expression. Derived measures are
stored and treated like other measures, but they originate from an expression
performed before the data is loaded and stored in the OLAP cube.
The expression entered in the Source Column passes through to the RDBMS
as part of an SQL SELECT statement. The expression must be valid for the
RDBMS used as the source database of the cube.
Key Point Because of calculation and aggregation behavior, it is recommended that you
It is recommended that you use derived measures only with a multiplication or division expression that uses
use derived measures only the Min or Max Aggregate Function.
with a multiplication or The following reasons explain why a derived measure can produce incorrect
division expression that
results:
uses the Min or Max
Aggregate Function. ! Because of the RDBMS null behavior, expressions that add or subtract fact
table columns can produce incorrect results. Consider a situation when you
define a measure, Total Expenses, as a derived measure that adds two fact
table columns, Coop Expenses and House Expenses. If either Coop
Expenses or House Expenses is null, the value for Total Expenses is null,
even if the other expense contains a value.
! The null behavior does not produce errors in multiplication or division
expressions. For example, if you multiply or divide a null by a value, the
result is null, which is the behavior produced by a derived measure.
However, derived measures calculate before cube aggregations, and
therefore the values at summarized levels are incorrect if you use the Sum
Aggregate Function.
Each cube contains a variety of properties that can be set to define its storage,
Key Points appearance, and how users interact with its data. You access the properties of a
Analysis Services uses the
Fact Table Size to design
cube by clicking on the cube in the tree pane, and then clicking the Properties
aggregations in the cube. pane of the Cube Editor. The following properties are useful when designing,
creating, and modifying cubes in the Cube Editor.
For the cube property
Aggregation Prefix to work Fact Table Size
properly, you must first
update your partition The Fact Table Size property records the number of records found in the fact
Aggregation Prefix table defined in the schema of the cube. The property is set initially when you
property. To append the add the fact table to the cube schema. Analysis Manager asks if you want it to
cube Aggregation Prefix to count the records for you. The results of its count are placed in the Fact Table
cube aggregation tables, the Size property.
partition Aggregation
Prefix must begin with a Analysis Services uses the Fact Table Size to design aggregations in the cube.
plus sign (+). If you decline to count the number of records when you define your cube,
ensure that you update the Fact Table Size with an accurate value before
designing aggregations for your cube.
Aggregation Prefix
The Aggregation Prefix property determines the string prefix added to the
beginning of aggregation tables in ROLAP cubes. For example, in a ROLAP
cube with an Aggregation Prefix of Sales_Agg, all aggregation tables created
in the ROLAP cube RDBMS will have names that begin with Sales_Agg.
The purpose of using the Aggregation Prefix is to help database administrators
track aggregation tables in the RDBMS.
Tip For the cube property Aggregation Prefix to work properly, you first must
update your partition Aggregation Prefix property. To append the cube
Aggregation Prefix to cube aggregation tables, the partition Aggregation
Prefix must begin with a plus sign (+). For more information about partitions,
see module 10, “Managing Partitions,” in course 2074A, Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000.
Visible Property
The Visible property determines if the cube is visible or not to users logging in
to the Analysis Server. By default, the Visible property is True.
When you set the Visible property of a cube to False, users cannot access the
cube in front-end applications. However, OLAP administrators can still access
the cube and the cube data in Analysis Manager.
Setting the Visible property to False is a simple way to limit user access to
cubes without having to update security. This is useful in a development or
testing environment, or when the cube administrator makes changes to the cube
structure.
Note The Visible property of a cube does not affect virtual cubes sourced from
the cube. Therefore, if you set the Visible property of a cube to False, users can
still access virtual cubes created from the invisible cube.
Default Measure
The Default Measure property defines the measure retrieved by the cube if no
measure is explicitly defined in a cube query. The Default Measure property is
similar to the Default Member property defined for each dimension.
The Disabled level property differs from the Visible level property in two
ways:
! Levels that are disabled do not store data in the cube and are not visible to
users. Levels with Visible properties set to False do store data in the cube,
but their data is not visible to users.
! Disabling a level completely removes the disabled level and all levels below
it from the dimension in the cube. However, you can set the Visible
property of a level to False and the levels below the changed level remain
visible to clients. Therefore, you can use the Visible property to skip
dimension levels for users in client applications.
Note For more information on the Visible level property, see module 5,
“Using Advanced Dimension Settings,” in course 2074A, Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000.
Lab Setup
To complete this lab, you need to have successfully completed lab A, Creating
Cubes with the Cube Editor, in this module.
Exercise 1
Updating the Sales Cube
In this exercise, you will update the Sales cube created in lab A, Creating Cubes
with the Cube Editor. You will add new measures, create derived measures, and
apply various properties to measures and dimension levels.
5. Click the Advanced tab of the Properties pane and verify that the Data
Type and Display Format properties are set to Currency.
6. After saving the cube, process the cube, do not design aggregations, and
browse the cube in the Data pane.
7. Notice the value of Bad Price for North American Bread.
It should be $2.11. However, the value of Bad Price is $4,914.29.
Because the Aggregate Function setting for Bad Price is Sum, the lowest
level Bad Price values are being summarized at all levels of all dimensions.
This highlights the problem with creating derived measures that use the
Sum Aggregate Function.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Introduction to Cubes
Lead-in ! Working with Cubes
The review questions cover
some of the key concepts ! Introduction to Measures
taught in the module.
! Working with Measures
! Defining Cube Properties
! Using the Disabled Property
2. What are three reasons that the structure of a cube produces errors when you
validate the cube?
You receive errors if the cube does not contain at least one measure, if
the cube does not contain at least one dimension, and if problems exist
with joins between the fact table and dimension tables in the cube
schema.
Overview 1
Building the Store Expense Cube 2
Lab A: Building the Store Expense Cube 7
Updating the Store Expense Cube 12
Lab B: Modifying the Store Expense Cube 13
Review 20
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, your 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.
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.
Instructor Notes
Presentation: In this module, students apply concepts they have learned in modules 1 through
30 Minutes 6 in course 2074A, Designing and Implementing OLAP Solutions Using
Microsoft SQL Server 2000. Students will use various cube and dimension
Labs: techniques to build an online analytical processing (OLAP) cube for store
60 Minutes expenses by using Microsoft® SQL Server™ 2000 Analysis Services. In the
labs, students are given high-level procedures and must recall the specific steps
and actions for creating various dimension and cube structures. Students create
a preliminary cube, and then must make changes to the cube by applying
dimension and level properties.
After completing this module, students will be able to:
! Create a cube based on user requirements.
! Update dimensions and add new dimensions to a cube.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_07.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all of the student materials.
! Read the instructor notes and margin notes.
! Complete all of the demonstrations.
! Practice the lecture presentation and demonstrations.
! 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.
10 Minutes The following demonstration procedures provide information that will not fit in
the margin notes or are not appropriate for student notes.
Scenario Shared
Time Private
Store Shared
Store Manager Private
Account Shared
Department Shared
Demonstration: The following demonstration procedures provide information that will not fit in
the margin notes or are not appropriate for student notes.
10 Minutes
! To restore a new database and define a data source
1. In Analysis Manager, right-click the server, click Restore Database, click
the Look in list, find and click the file
C:\Moc\2074A\Labfiles\L07\Answers\Module 07B.CAB, click Open, and
then click Restore.
2. Expand the Module 07B database, double-click the Data Sources folder,
right-click the Module 07 data source, and then click Edit.
3. Verify that localhost is selected in step 1 and that Module 07 is selected in
step 3. Click OK.
Scenario Shared
Time Private
Store Shared
Store Manager Private
Account Shared
Department Shared
Store Type Virtual
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 the module but are not specifically addressed in the
content of the student notes.
1. Where in Analysis Manager do you make changes to existing dimensions?
Where you update existing dimensions depends on the type of
dimension that requires modification. You modify shared dimensions in
the Dimension Editor. You modify private dimensions in the Cube
Editor.
2. Why do you want a dimension to be balanced in structure?
When a dimension is balanced, you take advantage of precalculations
for cube aggregations. Therefore, user queries execute faster than if the
queries were made against dimensions without precalculated
aggregations.
Balanced dimensions contain the same number of levels in each
dimension branch. You create a balanced dimension by defining a
standard dimension (not a parent-child dimension) when you create it
in the Dimension Wizard or the Dimension Editor.
Unbalanced dimensions must be defined as parent-child dimensions,
and do not have the same number of levels in each dimension branch.
Parent-child dimensions provide flexibility in dimension structure,
allowing for complex hierarchies such as charts of accounts and
organizational structures. However, query performance can be slower
when you use parent-child dimensions than when you use standard
dimensions, because aggregates are not stored for parent-child
dimensions.
3. In lab B, why do students process the Store dimension after updating the
Member Name Column of the Store Name level?
Students process and rebuild the Store dimension after the update of
the Member Name Column because change to the dimension structure
affects the processing of the cube. Without the rebuild, cube processing
fails in the Store Expense cube. The dimension does not force a rebuild
at cube processing time, which is why students rebuild the dimension in
the Dimension Editor.
If Store were a private dimension, the dimension processes
automatically at cube processing time. However, because Store is a
shared dimension, the students must explicitly process the dimension
themselves.
The students do not process the other shared dimensions, Scenario and
Account. Analysis Manager detects the changes made to the Scenario
and Account structures, and the dimensions process automatically
when the cube is processed.
4. When creating a level from an expression, why must both the Member Key
Column and the Member Name Column include the expression?
The Member Key Column includes the expression because it builds the
level and the members in the level based upon the expression.
The Member Name Column includes the expression because it names
each of the members based on the expression.
Module Strategy
Use the following strategy to present this module:
! Building the Store Expense Cube
Introduce the Store Expense data source schema. Briefly describe the
dimensions and levels that are created in lab A. Describe the use of the one
measure, Amount, in the Store Expense cube. After students complete lab
A, open the archived OLAP database and explain the Store Expense cube.
! Updating the Store Expense Cube
Explain to students that they will modify the Store Expense cube in lab B.
After students complete lab B, open the archived OLAP database and
explain the Store Expense cube.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Building the Store Expense Cube
Lead-in ! Updating the Store Expense Cube
In this module, you will
apply what you learned
about the topics covered in
modules 1 through 6 of
course 2074A, Designing
and Implementing OLAP
Solutions Using Microsoft
SQL Server 2000 by
creating a cube and several
dimensions from start to
finish.
In this module, you will apply what you learned about the topics covered in
modules 1 through 6 in course 2074A, Designing and Implementing OLAP
Solutions with Microsoft SQL Server 2000, by creating an online analytical
processing (OLAP) cube and several dimensions from start to finish.
After completing this module, you will be able to:
! Create a cube based on user requirements.
! Update dimensions and add new dimensions to a cube.
Discuss the business You will build the Store Expense cube to analyze expenses for stores. The
reason for implementing the expenses exist for all stores in each of the store geographies. You will track
Store Expense cube. expenses by store managers to determine the amount that each manager spends.
In addition, you will determine expenses by store departments.
Expenses are stored in two years: 2000 and 2001. For now, all the data that
exists in the database corresponds to current year actual expenses. However, in
the future, the Store Expense cube will be used to create the expense budget.
Therefore, budget and forecast members exist in the Scenario dimension to
store the budgets.
In the future, Net Sales values will be used to calculate Net Income from Total
Expenses. However, the current database does not contain Net Sales values.
Therefore, the Net Income values will be negative.
In this section, you will learn about the schema of the database used to create
the Store Expense cube by using Microsoft® SQL Server™ 2000 Analysis
Services. In addition, you will learn about the dimensions and measures that
you will create in the Store Expense cube.
The Module 07 SQL Server 2000 database contains tables that you will use to
Delivery Tip create the Store Expense cube.
Deliver this page either by
using the slide directly or by You will use the following tables to build the cube:
opening the diagram Store
Expense Schema in SQL ! expense_fact
Server Enterprise Manager.
! account
! scenario
! store
! position
! department
You will create six dimensions in the Store Expense cube. Before creating
Delivery Tips each dimension, you will determine the source table and the levels that are
For classes with more
experienced students,
required to build the dimension.
briefly highlight the fact that
they will be creating several Scenario
dimensions in lab A. Do not
Define the shared Scenario dimension by using the scenario table. The
cover the dimension
structures in detail.
Scenario dimension contains four members in one level. The member names
are:
For less advanced classes,
! Adjustment for Budget input
use this page as an
opportunity to prepare ! Current Year’s Actuals
students for the lab by
discussing each of the ! Current Year’s Budget
dimensions in detail. ! Forecast
Time
Define the private Time dimension by using the expense_fact table. The Time
dimension contains three levels:
! Year
! Quarter
! Month
Verify that the Time dimension levels are specified with the proper Level Type
properties.
Store
Define the shared Store dimension by using the store table. The Store
dimension contains four levels:
! Store Country
! Store State
! Store City
! Store Name
Store Manager
Define the private Store Manager dimension by using the store table. The
Store Manager dimension contains one level.
Account
Define the shared Account dimension by using the account table. The Account
dimension contains levels defined by the parent-child structure found in the
account table.
Department
Define the shared Department dimension by using the tables position and
department. The Department dimension contains three levels:
! Area
! Department
! Position
Use the descriptions of Department and Position to define the member names.
Measure
You will create one measure in the Store Expense cube named Amount. You
create only one measure because the Account dimension contains various
expense and revenue accounts that aggregate based on a rollup column.
The amount column in the expense_fact table is the source of the Amount
measure. You define the measure when you initially create the Store Expense
cube.
Prerequisites
Before working on this lab, you must have:
! Experience working with dimensions.
! An understanding of dimensions, cubes, and measures.
! Experience working with the Cube Editor and the Dimension Editor.
Exercise 1
Creating the Store Expense Cube
In this exercise, you will create a new cube, Store Expense, which contains six
dimensions with varying specifications, levels, and structures. You will process
the cube and confirm that the cube is correct by verifying cube values.
The lab provides high-level procedures for you to follow. If you do not
remember the specific steps for a procedure, refer to the modules outlined in the
For More Information section of the lab.
If you still cannot determine the proper steps for a single procedure, refer to the
corresponding answer files, which are located in:
C:\Moc\2074A\Labfiles\L07\Answers
Use the following table to create the dimensions with various dimension
specifications.
Dimension Name Dimension Type Levels/Members
Delivery Tips
The steps for this In this demonstration, you will view and discuss the solutions of lab A.
demonstration are included
in the Instructor Notes.
Encourage students to
follow along with the
demonstration by comparing
their Store Expense cube
to the archived version that
you demonstrate.
In lab B, you will make several modifications to the Store Expense cube. You
will make changes to the following dimensions:
! Scenario
! Time
! Store
! Store Manager
! Account
You will update each dimension in either the Dimension Editor or the Cube
Editor, depending on whether the dimension is shared or private. You will
determine the location for updating dimensions. In addition, you will determine
the appropriate properties to change to perform several of the dimension, level,
and member modifications.
Finally, you will create a new dimension, Store Type, which will be a virtual
dimension. You will need to recall the steps for creating virtual dimensions and
for adding virtual dimensions to a cube.
Prerequisites
Before working on this lab, you must have:
! Experience working with dimensions.
! An understanding of dimensions, cubes, and measures.
! Experience working with the Cube Editor and the Dimension Editor.
Lab Setup
To complete this lab, you need to first complete lab A, Building the Store
Expense Cube, found earlier in the module.
Exercise 1
Modifying the Store Expense Cube
In this exercise, you will update the Store Expense cube, adding a new
dimension, modifying existing dimensions, and verifying results.
The lab provides high-level procedures for you to follow. If you do not
remember the specific steps for a procedure, refer to the modules outlined in the
For More Information section of the lab.
If you still cannot determine the proper steps for a single procedure, refer to the
corresponding answer files, which are located in:
C:\Moc\2074A\Labfiles\L07\Answers
The Store dimension does not organize Mexico into states or provinces.
Therefore, the member Mexico repeats in the Store State level to verify that
the dimension is balanced.
Tip The Dimension Editor reflects the hiding of the member. However, to
see whether a member is hidden in the Cube Editor, you must perform a
specific browsing technique. To browse the Store dimension in the Cube
Editor to see if the second Mexico is suppressed, pivot the Store dimension
to the row area and double-click the level headings, not the individual
members.
4. In the Data pane, expand the Store dimension and notice the member names
at the Store Name level.
Currently, the member names at the Store Name level do not present
descriptive information. An analyst may not know that Store 9 is located in
Mexico City. You will update the member name to include the city name in
addition to the store name.
5. Update the Store Name level so that the member names include the city
name and the store name. The format of the member names should be:
CityName – StoreName
6. Click the Tools menu, and then click Process Dimension.
7. Save the dimension, rebuild the dimension structure, close the Process
dialog box, and then close the Dimension Editor.
2. After adding the new level, notice the members with no names at both levels
of the dimension.
3. Apply level settings to suppress the members with no names.
\
Delivery Tips In this demonstration, you will view and discuss the solutions of lab B.
The steps for this
demonstration are included
in the Instructor Notes.
Encourage students to
follow along with the
demonstration by comparing
their Store Expense cube
to the archived version that
you demonstrate.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Building the Store Expense Cube
Lead-in ! Updating the Store Expense Cube
The review questions cover
some of the key concepts
taught in the module.
2. What are the steps for creating a virtual dimension from a member property
and adding the virtual dimension to a cube?
You first add the member property to a dimension.
Next, you create the virtual dimension from the member property by
using the Dimension Wizard.
Finally, you add the virtual dimension to the cube in the Cube Editor.
Overview 1
Analysis Server Cube Storage 2
The Storage Design Wizard 10
Analysis Server Aggregations 17
Lab A: Designing Storage for Sales 23
Usage-Based Optimization 28
Lab B: Implementing Usage-Based
Optimization 35
Optimization Tuning 39
Review 41
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, your 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.
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.
Instructor Notes
Presentation: This module provides students with a comprehensive understanding of
70 Minutes Microsoft® SQL Server™ Analysis Services storage options and optimization
techniques for online analytical processing (OLAP) cubes. The characteristics
Labs: of the three storage modes—multidimensional OLAP (MOLAP), relational
20 Minutes OLAP (ROLAP), and hybrid OLAP (HOLAP)—are reviewed in detail
followed by an overview of aggregations. The module then takes students
through the Storage Design Wizard with discussion of specific aggregation
options and further discussion of the contents of aggregations and design
guidelines. The module concludes with a review of usage-based optimization
and general optimization tuning techniques.
There are two labs in the module. In lab A, students create a storage design and
process a cube by using the Storage Design Wizard. In lab B, students learn the
interfaces and mechanics of usage-based optimization.
After completing this module, students will be able to:
! Explain the advantages and disadvantages of the three data storage modes.
! Use the Storage Design Wizard to set storage design.
! Describe how aggregations work and design aggregations for cubes.
! Describe the concepts and mechanics of usage-based optimization.
! Override aggregation settings per dimension.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_08.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read all the instructor notes and margin notes.
! 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.
! To design aggregations
1. In the Set aggregation options step, click Performance gain reaches from
the Aggregation options pane.
2. Type 20 in the percent box for Performance gain reaches to reflect a 20-
percent aggregation target.
For the Sales cube, the default value of 50 is unnecessarily high.
3. Click Start to initiate the graphical simulation of Performance vs. Size on
the Set aggregation options step, and then click Next.
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 the module but are not specifically addressed in the
content of the student notes.
1. If ROLAP is slow to process and query, why would an organization use this
option?
ROLAP would be adopted if the organization needs a real-time OLAP
solution—that is, data is always updated with the current fact table
values.
In this scenario, an organization defines its cube as ROLAP with zero
aggregations. All detail and aggregate data are calculated as users
query the cube. While queries are slow, in some situations perfectly
updated data is more important than fast query times.
2. Do Analysis Services MOLAP cubes have the “data explosion” problem
common to OLAP solutions?
MOLAP database engines in competing products often create cubes
that grow exponentially from source files to fully calculated cubes. For
example, a five-megabyte (MB) source file has been known to grow into
a five-gigabyte (GB) cube after processing.
The data explosion problem when using MOLAP in Analysis Services
does not exist to the extent experienced with other OLAP products. In
many cases, the MOLAP cube may be smaller than the data source.
The following are the principal reasons for the MOLAP storage
efficiency:
• Analysis Services MOLAP cubes are completely dense in their data
storage—that is, no null values are stored.
• The Analysis Services query engine is highly optimized, calculating
commonly accessed aggregations as the cube is queried so that fewer
aggregations need to be precalculated and stored.
• The Analysis Services data compression algorithms are highly
efficient.
Some multidimensional products presumably solve the data explosion
problem by not using an OLAP engine, instead accessing data directly
from a relational database.
Such products classify themselves as ROLAP solutions because they
access relational databases directly and give users a multidimensional
view of the data, but do not create cubes that consume large amounts of
storage. Such ROLAP solutions typically suffer in query performance
compared to MOLAP solutions.
3. MOLAP cubes duplicate the detail data already stored in relational tables.
How can MOLAP storage be more efficient than ROLAP cube storage?
How can MOLAP be faster to process than ROLAP if Analysis Services
brings all the detail data to the Analysis Server?
Multidimensional structures and data are extremely compressed and
optimized compared to the two-dimensional tables in relational
databases. In addition, when defining ROLAP cubes, indexes are
automatically created in the relational database management system
(RDBMS).
Even though MOLAP cubes carry over the detail data, they can still be
smaller than their ROLAP cube counterparts. The exception is a
ROLAP cube that has few or no aggregations.
From a processing standpoint, it may be faster to create a
multidimensional structure than to create, insert, and update data in
relational tables. It also may take a long time to build the indexes that
are automatically created in ROLAP cubes. Again, the exception is
when the ROLAP cube has few or no aggregations defined.
4. If processing time and disk space are not constraints, should aggregations be
set to 100 percent for Performance gains reaches?
If Performance gains reaches is set to 100 percent, all a cube’s possible
aggregations will not necessarily be computed. The setting simply
targets that query performance will be potentially increased by 100
percent.
As a cube defines more aggregations, query performance improvements
reach a point of diminishing returns. Some cubes may slow in their
query performance if the aggregation percentage is set too high.
5. How does one estimate the size of a cube based on fact table size?
You can estimate the data storage for MOLAP data on disk in bytes,
assuming zero aggregations, by using the following formula:
(((2 * total number of levels) + (4 * number of measures)) * number of
records) / 3
6. Analysis Services has intelligent algorithms for determining the most
optimized aggregation design. Why would you choose to override the
dimension level aggregations?
In most cases, you use the Storage Design Wizard and the Usage-Based
Optimization Wizard to define aggregations. However, there may be
exceptional situations in which you might want to exercise control,
overriding wizard algorithms.
For example, you might not want your cube to contain aggregations for
the lowest level of the Product dimension, because users will not be
accessing data at that level. Therefore, you have the ability to turn off
aggregations for this level.
Module Strategy
Use the following strategy to present this module:
! Analysis Server Cube Storage
Deliver an overview discussion of general server storage issues and then
talk through the characteristics of each of the three storage modes—
MOLAP, ROLAP, and HOLAP. This discussion leads into a basic
introduction to the concept of aggregations.
! The Storage Design Wizard
The materials in this section can be delivered as lecture by using the slides
or integrated with the demonstration Design Storage for the Sales Cube.
Because the demonstration essentially duplicates the materials in the student
notes, it is recommended to integrate lecture and demonstration.
The following table is a mapping of lecture topics to demonstration steps.
Lecture Topic Demonstration Procedure
There will be substantial interest and questions from students about the
storage size and performance implications of choosing from each of the
three storage methods. Do not rush through these materials or limit
discussion and questions. Review the questions and answers in the previous
Difficult Questions section.
Be prepared to discuss elements of aggregation again, including the specific
functioning of the three aggregation options—Estimated storage reaches,
Performance gain reaches, and Until I click stop. These three choices
represent different conceptual approaches and specific underlying
algorithms for implementing aggregations.
! Analysis Server Aggregations
The subject of aggregation is explored in more detail, including review of
aggregation tables, general characteristics of aggregations, and details about
ROLAP aggregations. Because students must thoroughly understand the
concepts and wizard implementation of aggregations, the subject is
approached repeatedly in this module at increasing levels of detail and
sophistication.
Lab A follows the aggregation details section. Students now have an
opportunity to create storage designs of their own based on MOLAP and
ROLAP storage modes. The lab essentially replicates the steps performed in
the demonstration.
! Usage-Based Optimization
This section presents an important feature set of Analysis Services—usage-
based optimization. Your lecture, following the materials in the student
notes, takes students through the simple Usage-Based Optimization Wizard.
Be prepared to answer detailed questions about how each of the five query
options work by themselves and in conjunction with each other.
The section is followed by lab B, Implementing Usage-Based Optimization,
which can be conducted as a hands-on exercise with students following your
demonstration. The lab allows students to perform their own usage-based
optimizations.
! Optimization Tuning
You complete the module with a discussion of specific optimization tuning
methods, including how to override dimension and level settings. No
exercises or labs are included in this section. However, you should switch to
Analysis Manager to show the settings and to briefly explain their functions.
Overview
Topic Objective
To provide an overview of
the module topics and ! Analysis Server Cube Storage
objectives.
Lead-in ! The Storage Design Wizard
In this module, you will learn
about aggregation design
! Analysis Server Aggregations
and storage modes, which ! Usage-Based Optimization
are the key factors in
enabling fast query ! Optimization Tuning
response times.
Note For more information about partitions, see module 10, “Managing
Partitions,” in course 2074A, Designing and Implementing OLAP Solutions
with Microsoft SQL Server 2000.
! Analysis Server does not allocate storage for missing values. For example, if
no bikinis are sold in Antarctica, no space is allocated to that missing value.
Because missing values take up no storage, cubes are 100 percent dense—
that is, all storage is efficiently used. This characteristic of Analysis Server
helps avoid the data explosion problems of other OLAP products.
Topic Objective
To describe the
characteristics of MOLAP
storage.
Lead-in
In MOLAP cubes, detailed
data and aggregations are
stored in a multidimensional
format on the Analysis ! Details and Aggregations Stored in Multidimensional
Server. Format
! Fastest Storage Option for Queries
! Often the Most Efficient in Terms of Disk Storage, Due
to Compression
Delivery Tips ! Detailed data and aggregations are stored in a multidimensional format on
Tell students that you the Analysis Server.
design cubes as MOLAP the • Because the detail data from the fact table is brought into Analysis
vast majority of the time
because of the fast query
Server for storage, data is duplicated.
times, processing times, and • The level of detail imported into a cube is based on the grain of the
efficient storage of MOLAP cube’s dimensions. For example, if the fact table contains daily data
cubes. records, but the grain of the cube time dimension is month, the cube will
contain data at a month level. The fact table daily records are combined
Point out that Aggs stands
for aggregations in the
at cube processing time.
preceding illustration. • After a MOLAP cube is processed, all data necessary for querying is
located on the Analysis Server. The source relational database
management system (RDBMS) is not accessed other than at processing
time.
! MOLAP cubes have the fastest query performance for users.
! MOLAP is a very economical mode in terms of disk storage, due to efficient
data compression algorithms.
Delivery Tip ! Under most circumstances, ROLAP cubes are much slower in query
Point out that Aggs stands performance than MOLAP cube equivalents.
for aggregations in the ! ROLAP cubes are usually the slowest to process, unless the ROLAP cubes
preceding illustration. contain few aggregations.
! When assigning the ROLAP storage mode to cubes that have data sources
defined in SQL Server 2000 databases, the Analysis Server attempts to
create indexed views instead of tables, assuming certain criteria are met in
the data source.
! You use the ROLAP storage mode when the data source is too large to be
stored and processed effectively in MOLAP or HOLAP.
! You use the ROLAP storage mode when you require a real-time OLAP
solution.
Real-Time Criteria
ROLAP cubes must meet certain criteria before they can behave as real-time
cubes:
! Cubes must contain zero aggregations or must store aggregations in SQL
Server 2000 indexed views.
! Cube partitions cannot be defined as real-time partitions if they are remote
partitions.
Topic Objective
To describe the
characteristics of HOLAP
storage.
Lead-in
The following are
characteristics of HOLAP
storage.
Cube Aggregations
Topic Objective
To explain aggregation ! Full Aggregation Not Necessary
topics.
! Effects on Cube Size and Processing Time
Lead-in
Aggregations are $ Cube size and processing times increase as
precalculated summaries of aggregations are added to a cube
detailed data that enable
Analysis Server to answer ! Tools for Implementing Aggregations
queries quickly.
$ Storage Design Wizard
$ Usage-Based Optimization Wizard
$ Dimension and level aggregation properties
Topic Objective
To introduce the steps
involved in using the ! Choosing a Storage Mode
Storage Design Wizard.
! Setting Aggregation Options
Lead-in
The Storage Design Wizard ! Determining the Level of Aggregation
is the interface that lets you
specify the storage mode ! Finishing Up
and aggregation design.
The Storage Design Wizard is the interface that lets you specify the storage
Delivery Tip mode and aggregation design. The next section introduces the steps involved in
Integrate this content into
the demonstration
using the Storage Design Wizard to design storage modes and aggregations:
Designing Storage for the ! Choosing a storage mode
Sales Cube as an effective
method of presenting the ! Setting aggregation options
material.
! Determining the level of aggregation
! Finishing up
There are two entry points into the Storage Design Wizard:
! After building or modifying a cube, you are prompted to set storage options.
You start the wizard by clicking Yes.
! Right-click a cube or a partition in a cube, and then click Design Storage.
The user interface of the Storage Design Wizard differs depending on:
! Whether storage has been designed previously for the cube.
! Whether the cube contains partitions.
Topic Objective
To review storage options.
Lead-in
At the first real step of the
wizard, you must specify the
storage type.
At the first step of the wizard, you must specify the storage type: MOLAP,
ROLAP, or HOLAP. The selected storage mode determines query performance,
processing performance, and cube storage. Therefore, you must determine the
appropriate storage mode before starting the Storage Design Wizard.
Topic Objective
To show the aggregation
design step of the Storage
Design Wizard.
Lead-in
The next step of the Storage
Design Wizard allows you to
design aggregations for the
cube or partition.
The next step of the Storage Design Wizard allows you to design aggregations
Key Points for the cube or partition. Three design options are available as radio button
The Performance Gain choices. The design options are as follows:
Reaches option is the most
helpful method for designing ! Estimated storage reaches
aggregations.
! Performance gain reaches
No one specific percentage ! Until I click Stop
works best for all cubes.
Every cube is different and The following characteristics apply to all three options:
requires testing to find the
optimal aggregation ! Regardless of aggregation option, the dimensional hierarchies are navigated
percentage. The best and aggregations are built where the greatest performance benefits will be
method of determining the realized based on the number of members at a given level.
optimal percentage is to test
various settings for their ! Aggregations are calculated when the cube is processed or refreshed and
effects on the query and when incremental data is added to the cube—not during the aggregation
cube processing times. design.
! Aggregation design is per partition. A single cube can consist of multiple
partitions, and each partition can have a different aggregation design.
Note At the stage in which you design aggregations in the Storage Design
Wizard, aggregations are designed, not calculated. The aggregation design is
stored in the metadata repository. Only when the cube is processed are actual
aggregations built.
Note The more aggregations a cube contains, the greater the amount of time
required to process the cube. Excessive aggregation of a large cube can lead to
unacceptable processing times.
Note The Until I click Stop and Estimated storage reaches options are not
very helpful and potentially misleading when designing aggregations. Use the
Performance gain reaches option for the best results.
Finishing Up
Topic Objective
To show the options offered
at the last step of the
Storage Design Wizard.
Lead-in
At the last step of the
Storage Design Wizard, you
have four options.
You have four options at the last step of the Storage Design Wizard:
! Process now. Writes the aggregation metadata to the repository, and then
processes the cube.
! Save, but don’t process now. Writes the aggregation metadata to the
repository, but does not process the cube or build the actual aggregations.
! Cancel. Discards all inputs to the Storage Design Wizard.
! Back. Allows you to go back to previous steps to change inputs.
Topic Objective
To introduce the topic of
server aggregations. ! Contents of an Aggregation
Lead-in ! Aggregation Generalities
Now let us define the term
aggregation in greater
detail.
Contents of an Aggregation
Topic Objective
To show an example of one
aggregation.
Lead-in
ROLAP aggregation tables
give us the opportunity to
visualize exactly what is
contained in a single
aggregation.
ROLAP is the one storage option that stores aggregations in the source
RDBMS. Therefore, it is useful to look at ROLAP aggregation tables to learn
For Your Information about the structure of Analysis Server aggregations.
Students create and view
ROLAP aggregations in lab Aggregation Table Example
A: Designing Storage.
You can examine ROLAP aggregations created for a cube. The preceding
illustration is an aggregation table created by Analysis Server for the Sales
cube. It represents one aggregation.
There are three reasons for you to view a ROLAP aggregation table:
! The table provides insight into ROLAP structures.
! The table provides a general understanding of Analysis Server aggregations.
! You cannot easily view MOLAP aggregation schemas.
You access aggregation tables by searching in the cube data source for new
tables that have the name format of cubename_partitionname_N, where N is a
set of alphanumeric characters meaningful to the Analysis Server.
Aggregation Generalities
! General Characteristics of Aggregations
Topic Objective
To explain general $ Are created when a cube is processed
characteristics of
aggregations. $ Include all measures
Lead-in $ Cannot generally be designed for specific members
Let us go over some
characteristics of $ Can be designed on a partition-by-partition basis
aggregations.
$ Are built and maintained automatically
! Characteristics of ROLAP Aggregations
$ Are automatically indexed
$ Require write permission to the RDBMS
$ Increase query performance
Topic Objective
To demonstrate the design
of a cube’s storage mode so
that students become
familiar with the interface.
Lead-in
Let us see an example of
storage design by using the
Sales cube.
In this demonstration, you will learn how to create a storage design by using the
Delivery Tips Storage Design Wizard.
Deliver this demonstration
integrating the previous
lecture materials, which
cover details of the Storage
Wizard.
Topic Objective
To introduce the lab.
Lead-in
In this lab, you will design
storage and aggregations
for the Sales cube.
Prerequisites
Before working on this lab, you must have:
! Experience working with cubes.
Exercise 1
Designing Storage for the Sales Cube
In this exercise, you will design storage for the Sales cube by using the
MOLAP storage option. Next, you will process the cube and view the cube
metadata.
! To design aggregations
1. In the Set aggregation options step, click Performance gain reaches from
the Aggregation options pane.
2. Type 20 in the percent box for Performance gain reaches, reflecting a 20-
percent aggregation target.
For the Sales cube, the default value of 50 is unnecessarily high.
3. Click Start to initiate the graphical simulation of Performance versus Size
in the Set aggregation options step, and then click Next.
Exercise 2
Modifying the Storage of the Sales Cube
In this exercise, you will update the storage design for the Sales cube. You will
apply the ROLAP storage mode and redesign aggregations. In addition, you
will open SQL Server 2000 Enterprise Manager to view the aggregation tables
created by the cube process.
! To design aggregations
1. In the Set aggregation options step, click Performance gain reaches from
the Aggregation options pane.
2. Type 30 in the percent box for Performance gain reaches, reflecting a 30-
percent aggregation target.
Because you are changing the storage mode to ROLAP, you will add 10
percent to Performance gain reaches to compensate for the slower query
performance of ROLAP cubes.
3. Click Start to initiate the graphical simulation of Performance vs. Size, and
then click Next.
Note You will notice that you receive an error at the creation of the first
aggregation table. Receiving the error is normal. Analysis Services cannot
create indexed views for the Sales cube aggregations in the Module 08
database. Therefore, Analysis Services creates new tables in the Module 08
database. The error simply notifies you of this situation.
# Usage-Based Optimization
Topic Objective
To introduce the concept of
usage-based optimization. ! Working with the Usage-Based Optimization Wizard
Lead-in ! Using the Query Log
A very important feature of
Analysis Server is usage- ! Factoring the Server Cache
based optimization.
Algorithms in the Storage Design Wizard are sophisticated, but results are
based solely on structural factors, such as the number of rows in a fact table or
the number of members in different levels of a dimension.
The Storage Design Wizard cannot take into account the way that users perform
a particular query or the frequency of data access. However, Analysis Services
provides a separate tool for doing just that—usage-based optimization.
Usage-based optimization allows aggregations to be built based on patterns
established from actual queries submitted to the server. Query performance is
optimized to reflect the usage patterns of real world users.
The next section introduces the following topics:
! Working with the Usage-Based Optimization Wizard
! Using the query log
! Factoring the server cache
Topic Objective
To describe the Usage-
Based Optimization Wizard.
Lead-in
The Usage-Based
Optimization Wizard
simplifies the optimization of
queries.
When selecting from these query options, you may choose a single criterion or
multiple criteria. If you choose multiple criteria, only those queries that satisfy
all the specified criteria are optimized.
Usage patterns are captured in a query log. The query log is a Microsoft Access
Delivery Tip database named msmdqlog.mdb located in the folder containing the Analysis
Access the query log in
Analysis Manager through
Services executable files.
Usage Analysis.
Populating the Usage Log
By default, the server logs one out of each ten queries. You may want to change
this sampling rate.
To change the server log setting, perform the following steps:
1. Right-click the server in Analysis Manager and click Properties.
2. On the Logging tab, update the box with the new sampling rate.
Note Changes made to server properties take effect only when the server is
stopped and restarted.
Queries that can be answered by the client cache are not recorded on the server
and thus are not logged. To clear the client cache, you must disconnect from the
database.
Topic Objective
To describe the use of The
server cache check box. ! Queries to the Server Cache
Lead-in ! Query Caching Example
Consider selecting The
server cache check box
when performing usage-
based optimization.
The query you execute most frequently may not be the query that is most in
Key Point
need of aggregations. The reason is that data values needed for frequently
By selecting The server
cache check box, you accessed queries are kept in the server and client caches. Any summary values
ensure that frequently already calculated for queries exist in caches and no aggregations must be
accessed queries are accessed at query time.
optimized for users, even
when the queries are not Note Both PivotTable® Service and the Analysis Server maintain caches on
found in client or server the client and on the server, respectively.
caches and therefore data is
retrieved from the server.
Queries to the Server Cache
Selecting The server cache check box, part of the Queries To pane in the
Usage-Based Optimization Wizard, ensures that any queries found in the server
cache will be included during usage-based optimization. By selecting this check
box, you ensure that frequently accessed queries are optimized for users.
Topic Objective
To perform usage-based
optimization.
Lead-in
In this lab, you will design
and optimize storage and
create usage analysis
reports.
Prerequisites
To complete this lab, you need to complete of lab A, Designing Storage for
Sales, found earlier in this module.
Exercise 1
Changing Sampling Frequency
In this exercise, you will change the query log sampling frequency and restart
the server.
Delivery Tip Analysis Server writes queries to a query log. The query log is the basis for
You may want to execute usage-based optimization. By default, one out of ten queries are written to the
this exercise and the
log. There is a server property that controls this sampling frequency. You are
following two exercises as
an instructor-led going to change the setting now, so that the log will be populated when you
demonstration with students perform Usage Based Optimization.
following on their own
computers. ! To change the sampling frequency
1. In the Analysis Manager tree pane, right-click the local server icon, and then
click Properties.
2. Click the Logging tab, type 1 in the Write to log once per box, and then
click OK.
3. Click OK when warned that the change will not take place until you stop
and restart the server.
Exercise 2
Creating Usage Analysis Reports
You cannot perform usage-based optimization without recording usage
activities. In this exercise, you will populate the usage log, and will then view
usage analysis reports.
Exercise 3
Implementing Usage-Based Optimization
In this exercise, you will adjust usage-based optimization for the Sales cube in
the Module 08 database and add new aggregations.
Optimization Tuning
Topic Objective
To discuss the available
dimension and level ! Accessing Aggregation Usage
aggregation options.
! Overriding a Dimension
Lead-in
Analysis Services gives you ! Overriding Levels
additional dimension and
level settings for fine-tuning ! Changing Aggregation Properties
aggregations.
Overriding a Dimension
To override the aggregation for a dimension or level, you must first change the
Aggregation Usage property for the dimension. To set the property, choose
from a list containing the choices that are described in the following table.
Setting Result
Overriding Levels
In order to set overrides for specific levels in a dimension other than Top Level
Only or Bottom Level Only, you must set the Aggregation Usage property for
the parent dimension to Custom. This enables the Enable Aggregations
property for the levels.
When the Aggregation Usage property of the parent dimension is set to
Custom, the Enable Aggregations property for all the levels is set to No. You
can then choose which levels should be set to Yes.
Review
Topic Objective
To reinforce module
objectives by reviewing key ! Analysis Server Cube Storage
points
! The Storage Design Wizard
Lead-in
The review questions cover ! Analysis Server Aggregations
some of the key concepts
taught in the module. ! Usage-Based Optimization
! Optimization Tuning
2. List the three storage modes in order of most to least efficient in data
storage and disk space utilization. Relate the architecture of each to its
storage efficiency.
HOLAP, MOLAP, and ROLAP, in this order.
HOLAP is the most efficient because there is no redundancy of data
storage—that is, detail is stored in the RDBMS and aggregations are
stored in a cube. In addition, HOLAP cubes store aggregations with
multidimensional structures.
MOLAP is the second most efficient because the multidimensional
structures are space-efficient compared to relational tables.
While ROLAP does not require that detail data be duplicated, ROLAP
is less efficient than both HOLAP and MOLAP because it does not take
advantage of the efficient multidimensional structures and relies
exclusively on the RDBMS tables.
Contents
Overview 1
Introducing Dimension and Cube Processing 2
Processing Dimensions 5
Processing Cubes 15
Lab A: Processing Dimensions and Cubes 27
Lab B: Updating Dimension Data 30
Lab C: Incrementally Updating Cubes 36
Optimizing Cube Processing 41
Troubleshooting Cube Processing 49
Review 54
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, your 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.
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.
Instructor Notes
Presentation: Multidimensional online analytical processing (OLAP) databases include
75 Minutes schema and data, both of which change and need updating from the relational
database management system (RDBMS) on a regular basis. In this module,
Lab: students learn to manage dimension and cube processing with Microsoft® SQL
75 Minutes Server™ 2000 Analysis Services.
After completing this module, students will be able to:
! Understand the difference between OLAP schema and data.
! Process dimensions.
! Perform the three types of cube processes.
! Optimize cube processing.
! Troubleshoot cube processing.
Required Materials
! To teach this module, you need Microsoft PowerPoint® file 2074A_09.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read the instructor notes and margin notes.
! Complete all the demonstrations.
! Practice the lecture presentation and demonstration.
! Complete the lab.
! 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.
4. Close the View Trace Line window, and then click Close.
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 the module but are not specifically addressed in the
content of the student notes.
1. How are incremental updates useful if the Analysis Server is unaware of
data warehouse loads and it therefore does not know what data to load from
a table?
You can create a column in the fact table that has an identifying record,
such as a time stamp or a batch number. You can include the unique
record in the WHERE clause of the associated partition definition and
filter records based on that identifier.
2. Are multiple partitions of a cube processed sequentially, even if they reside
on different computers?
Yes, unless you specify that you want certain partitions to be built in
parallel. You can do this by using Decision Support Objects (DSO).
Module Strategy
Use the following strategy to present this module:
! Introducing Dimension and Cube Processing
Define the term processing and explain that Analysis Server creates SQL
statements to extract information from the data source. Next, define the
terms schema and data as they are used in Analysis Services.
! Processing Dimensions
Explain to students that dimensions must be processed when they are first
designed and whenever there are changes or updates in the source
dimension tables. Describe the interface and the steps to follow to process a
shared dimension. Explain that there are two ways to process a shared
dimension—a rebuild or an incremental update. Describe when to use each
type of processing and the implications of doing so. Explain that private
dimensions are created and manipulated in single cubes, and that to process
a private dimension, the entire cube must be processed. Finally, define
relational OLAP (ROLAP) dimensions and changing dimensions and
explain when to use them.
! Processing Cubes
Begin with an explanation of when to process a cube and how to get to the
Process a Cube dialog box. Describe the three options available in the
dialog box—full process, refresh, and incremental update. Describe when to
use each option and the implications of doing so. Introduce the Incremental
Update Wizard and the steps involved in performing an incremental
update—specifying the data source and specifying the filter expression.
Explain what happens behind the scenes when using a filter. Discuss
available properties that affect cube and dimension processing.
! Optimizing Cube Processing
Explain to students that, while query performance is obviously a high
priority when using OLAP cubes, processing time is also important.
Describe several ways to improve cube processing performance—
optimizing the data source, optimizing the cube schema, optimizing cube
design, and optimizing Analysis Server. Explain how to perform each of
these types of optimization.
! Troubleshooting Cube Processing
Describe the three most common cube problems related to processing—
missing data, processing errors, and insufficient memory and disk space.
Give tips and techniques for solving each type of problem.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives.
! Introducing Dimension and Cube Processing
Lead-in
In this module, you will learn ! Processing Dimensions
about dimension and cube
processing and the various ! Processing Cubes
ways to perform processes.
! Optimizing Cube Processing
! Troubleshooting Cube Processing
In this section, you are introduced to dimension and cube processing, and will
learn the difference between OLAP schema and OLAP data.
Definition of Processing
Topic Objective
To define the term
processing, as used in
Analysis Services. ! Processing Must Occur Prior to Users Querying the
Lead-in Cube
Before users can access
data from a cube, some
! Dimension Processing Loads Dimension Data
form of processing must ! Cube Processing Loads Cube Data and Creates
occur in the cube.
Aggregations
! Processing Uses SQL Queries to Populate Dimension
and Cube Data
Before users can access data from an OLAP cube, some form of processing
must occur in the cube. In Analysis Services, the term processing means
loading dimensions and cube data from the RDBMS data source.
When you process dimensions and cubes, Analysis Server creates SQL
statements to extract the necessary information from the data warehouse
dimension and fact tables. In addition, Analysis Server creates any aggregations
in the cube that were designed previously.
OLAP Schema
Unlike relational databases, where member names are considered data, member
names in Analysis Services are considered part of the schema.
The following is true of OLAP schema:
! The schema consists of the dimensional hierarchies and the members that
populate these hierarchies.
! OLAP schema comes from the dimension tables in the source RDBMS.
! Member names, for example Quarter 1, Canada, and Bread, are
commonly referred to as OLAP metadata in multidimensional databases.
OLAP Data
The data in Analysis Services is the numeric information, such as units sold,
prices, inventory levels, or dollar revenues.
The following is true of OLAP data:
! This numeric information, or data, is commonly referred to as the measures.
! OLAP data comes from the fact table in the source RDBMS.
Understanding the distinction between schema and data is important for
database administrators and OLAP architects.
# Processing Dimensions
Topic Objective
To introduce dimension
processing.
Lead-in ! Dimension Processing Overview
In this section, you will learn ! Rebuilding Dimensions
about dimension processing
and the various ways of ! Incrementally Updating a Dimension
processing dimensions.
! Processing Private Dimensions
! Understanding ROLAP and Changing Dimensions
Before data can be loaded into a cube, you must first create and process the
Key Point dimensions of the cube. Once you process the dimensions, the Analysis Server
Analysis Server creates
multidimensional OLAP
can load data from the fact table into the cube and can create aggregations.
(MOLAP) dimension
structures in the Data folder Purpose of Dimension Processing
located on the server,
You process a dimension when you first create it, when you modify its
except in those cases when
you use ROLAP
structure, and when data updates occur in the source data dimension tables.
dimensions. Non-ROLAP After the initial dimension process, you must maintain dimensions on an
dimensional structures are
ongoing basis to reflect changes in the underlying dimension tables—for
created on the server for
cubes that use the MOLAP,
example, new products are added to the product line, sales representatives
hybrid OLAP (HOLAP), and change sales regions, and so on. Dimensions must reflect the changes in the
relational OLAP (ROLAP) business structure.
storage modes.
Two methods are available to the Analysis Server developer for processing
shared dimensions:
Do not spend too much time ! Rebuild the dimension structure completely rebuilds and constructs a
here describing dimension dimensional structure.
rebuilds and incremental
updates because they are
! Incremental update imports new members into an existing dimensional
discussed in detail later in structure.
this section. Analysis Server creates multidimensional OLAP (MOLAP) dimension
structures in the Data folder located on the server, except in those cases when
you use ROLAP dimensions. Non-ROLAP dimensional structures are created
on the server for cubes that use the MOLAP, hybrid OLAP (HOLAP), and
relational OLAP (ROLAP) storage modes.
Rebuilding Dimensions
Topic Objective
To describe the process of ! Situations in which to Rebuild a Dimension
rebuilding a dimension.
$ A level is added or deleted
Lead-in
The Rebuild the $ A member is deleted
dimension structure option
entirely recreates the
$ A member is renamed
dimension structure. It is the $ A child is moved from one parent to another
most comprehensive
method for processing ! Implications of Rebuilding a Dimension
dimensions.
$ Dimensional structure is rebuilt
$ Cubes become unavailable to clients until the cubes are
reprocessed
$ Rebuilding takes time
Note When you process a cube, you have the option to incrementally update
all shared dimensions found in the cube. You do this by selecting the
Incrementally update the shared dimensions used in this cube check box
found in the Process a Cube dialog box.
You create and manipulate private dimensions in single cubes. Because they
exist in single cubes, you do not affect other cubes by processing private
dimensions. Therefore, you can isolate cube-processing needs by defining
dimensions as private.
You cannot process private dimensions without also processing the cubes in
which they reside, and no options or commands exist that process private
dimensions independently.
There are two methods of processing private dimensions:
! Perform an incremental update or a refresh of a cube. An incremental
update or a refresh of a cube performs an incremental update of all private
dimensions in the cube. In other words, an incremental update or a refresh
of a cube adds new members and member properties in private dimensions
in the cube.
! Perform a full process of a cube. A full process of a cube performs a rebuild
of all private dimensions in the cube. In other words, a full process of a cube
updates the structure and all members in private dimensions in the cube.
Note For more information on cube refreshes and full processes, refer to the
next section in this module, Processing Cubes.
ROLAP Dimensions
A ROLAP dimension’s data is stored in the dimension table or tables.
Therefore, there is no need to build the multidimensional dimension structures
that MOLAP dimensions create on the Analysis Server.
By defining a dimension as ROLAP, you can maintain a dimension with tens of
millions of members. If you attempt to store tens of millions of members in a
MOLAP dimension, you receive errors when you process the dimension.
Because of the query performance degradation you receive when using ROLAP
dimensions, you usually define a dimension as ROLAP only if the dimension
contains millions of members.
When you add a ROLAP dimension to a cube, the cube must use the ROLAP
option for its cube storage mode. You are not given the option to define the
cube as MOLAP or HOLAP in the Storage Design Wizard.
ROLAP dimensions require SQL Server 2000 Enterprise Edition.
All dimensions that use the ROLAP storage mode are also considered to be
changing dimensions.
Changing Dimensions
A changing dimension is optimized for frequent changes. It allows certain types
of changes to be made by using incremental updates instead of rebuilding the
dimension and fully processing the cube. Therefore, users can access the cubes
without interruption when making these changes.
The following types of dimensions are always changing dimensions:
! Virtual dimensions
! Parent-child dimensions
! ROLAP dimensions
You can define any dimension as changing by setting its Changing property to
True in the Properties pane of the Dimension Editor or Cube Editor.
In a changing dimension, because aggregations are not stored at intermediate
dimension levels, levels and members below the top level and above the bottom
level of the dimension can be added, moved, changed, or deleted, and an
incremental update applies the changes when you save the dimension. You do
not need to rebuild the dimension, a process that makes the cube unavailable to
clients during the rebuild process.
Changing dimensions provide for more flexibility in updating dimension
structures. However, queries that use changing dimensions are slower than
queries that use non-changing dimensions.
Note For more information on ROLAP and changing dimensions, see SQL
Server Books Online.
In this demonstration, you will learn how to rebuild the State dimension and
Delivery Tips will see the impacts to the Sales Units cube after the rebuild.
The steps for this
demonstration are included
in the Instructor Notes.
# Processing Cubes
Topic Objective
To introduce cube
processing.
Lead-in ! Cube Processing Overview
After you design a cube, you ! The Full Process
must process the cube to
populate it with data. ! Refreshing a Cube
! Incrementally Updating a Cube
! The Incremental Update Wizard
! Processing Options
The topics in this section are After you design a cube, you must process the cube to populate it with data.
very complex. If students MOLAP cubes, ROLAP cubes, and HOLAP cubes all require processing. There
are confused, tell them that are three different processes for cubes, the mechanics and logic of which are
the following labs contain described in the next section.
exercises that include each
of the processing types.
A full process is the most comprehensive cube process you can perform. To
initiate a process, click the third option in the Process a Cube dialog box. All
cube structures and cube data is rebuilt.
Refreshing a Cube
Topic Objective
To describe when to refresh ! Situations in which to Refresh a Cube
a cube and the implications
of doing so. $ Source data has changed
Lead-in $ Data has been duplicated
Refreshing a cube erases all
data and repopulates the
! Implications of Refreshing a Cube
cube by reading the data $ Data is erased and then replaced, in MOLAP cubes
from the RDBMS data
source. $ Aggregations are cleared and then recalculated
$ Shared dimension structures remain unchanged
$ Cube remains available
$ Virtual cubes remain available
$ The operation rolls back if an error occurs
Refreshing a cube erases all data and repopulates the cube by reading the data
from the RDBMS data source. The cube structure does not change when you
perform a cube refresh.
An incremental update is the process by which you add new data to a cube on a
Key Point periodic basis. It is the least time-consuming method of processing a cube
The Incremental Update
Wizard cannot determine
because it retains the existing data in the cube and adds only the data you select.
new fact table data. However, you must understand the mechanics of cube incremental updates to
Therefore, you must define avoid incorrectly duplicating data.
what is new in the data
source. If you incorrectly Situations in Which to Perform an Incremental Update
define new data, you risk
creating incorrect values in Incremental updates can occur if the following are true:
the cube.
! New data is added to the fact table.
! New data is needed temporarily from a different fact table.
Note To include data from a different fact table permanently, create a new
partition in the cube. For information on partitions, see module 10,
“Managing Partitions,” in course 2074A, Designing and Implementing
OLAP Solutions with Microsoft SQL Server 2000.
Important The Incremental Update Wizard does not have a method for
determining new fact table data. Therefore, you must define what is new in the
data source. By incorrectly defining new data, you risk creating incorrect values
in your cube.
Understanding Filters
This is what happens behind the scenes when you use a filter:
! The expression you enter becomes part of a WHERE clause.
! The WHERE clause in turn is part of an SQL SELECT statement.
! The SQL statement passes through to the particular relational database
without a syntax check by Analysis Server.
Processing Options
Topic Objective
To describe available cube
and dimension processing
properties. ! Source Table Filter
Lead-in ! Processing Optimization Mode
You have access to several
properties that affect cube ! Stop Processing on Key Errors
and dimension processing.
! Key Error Limit
! Key Error Log File
! Processing Log File
You have access to several properties that affect cube and dimension
Delivery Tip processing. In addition, you can enable log files that store processing
Switch to Analysis Manager,
and show students how to
information and errors. You set the properties and log files in Analysis
access each property as Manager.
you describe it.
Source Table Filter
In the Cube and Dimension Editors, you can set the Source Table Filter
property for cubes and dimensions. The Source Table Filter property contains
an expression included in the WHERE clause of the SQL query that filters the
data loaded into the cube or dimension. The expression that you add is an
expression used in the WHERE clause, without explicitly including the
command WHERE.
For example, to include only the Canada member and its descendants in a
dimension, type the following in the dimension’s Source Table Filter:
“store”.”store_country” = ‘Canada’
You set the Source Table Filter in the Advanced tab of the Properties pane in
the Cube Editor or the Dimension Editor. In the Cube Editor, the Source Table
Filter limits fact table records included in the cube. In the Dimension Editor,
the Source Table Filter limits members included in the dimension.
The Source Table Filter box does not check the syntax of the expression.
Caution Always verify that the syntax you enter to define the filter is correct
so that you do not produce duplicated data.
Prerequisites
Before working on this lab, you must have:
! Experience working with Analysis Manager.
! An understanding of dimensions and cubes.
Exercise 1
Processing State and Sales Units
In this exercise, you will rebuild the State dimension and perform a full process
of the Sales Units cube.
4. Close the View Trace Line window, and then click Close.
____________________________________________________________
Prerequisites
Before working on this lab, you must have:
! Experience working with Analysis Manager.
! An understanding of dimensions and cubes.
! An understanding of cube storage.
! Completed lab A, Processing Dimensions and Cubes, found earlier in the
module.
Exercise 1
Adding the Jalisco State
In this exercise, you will add the Mexican state Jalisco to the State dimension
table by using SQL Server Enterprise Manager. After you add the new state,
you will see how the update to the data source affects the State dimension and
the Sales Units cube.
22 7 1000
Exercise 2
Adding the Baja California State
In this exercise, you will add the Mexican state Baja California to the State
dimension table by using SQL Server Enterprise Manager. After you add the
new state, you will see how the update to the data source affects the State
dimension and the Sales Units ROLAP cube.
22 8 1000
Important Browse the Sales Units ROLAP cube, not the Sales Units cube
from the previous exercise.
2. Expand the State dimension below Mexico and verify that the new
members exist in the dimension.
You should see Baja California and Mexico North in the State dimension
hierarchy. Notice that no data exists for Sales Units at the Baja California
and Mexico North members.
3. In the Time dimension, click October 2001.
You previously loaded the Sales Units data for the Month_ID 22, which is
October 2001.
4. Notice the Sales Units values for Baja California and Mexico North.
How can you see the 1,000 units that you added to the Salesfact table when
you have not yet processed the cube?
The Sales Units ROLAP cube uses ROLAP cube storage. Therefore, the
cube retrieves the detail data from the SQL Server database directly.
However, the aggregation tables do not incorporate the new data
automatically. Therefore, you do not see Sales Units for Baja California
and Mexico North at the All Time member.
Currently, your detail cube data does not match your aggregated cube data.
To update the aggregation tables, you must perform a refresh of the Sales
Units ROLAP cube.
5. Close the Cube Browser dialog box.
6. Refresh the Sales Units ROLAP cube data, and browse the cube to verify
that the Baja California data exists at All Time.
7. Browse the Sales Units cube, and notice that the Baja California Sales
Units value does not exist in the Sales Units cube.
8. Refresh the Sales Units cube data, and browse the cube to verify that the
Baja California data exists.
Prerequisites
Before working on this lab, you must have:
! Experience working with Analysis Manager.
! An understanding of dimensions and cubes.
! An understanding of cube storage.
! Completed lab A, Processing Dimensions and Cubes, found earlier in the
module.
! Completed lab B, Updating Dimension Data, found earlier in the module.
Exercise 1
Incorrectly Duplicating Cube Data
In this exercise, you will learn the consequences of carelessly clicking through
the Incremental Update Wizard. You will incorrectly duplicate data in the Sales
Units cube.
Exercise 2
Adding Fact Table Data
In this exercise, you will perform an incremental update of the Sales Units
cube. You will select a different fact table, SalesFact_Incr1, which will be
added to the Sales Units cube data.
Exercise 3
Using an Incremental Update Filter
In this exercise, you will perform an incremental update of the Sales Units
cube. You will select a different fact table, SalesFact_Incr2, which will be
added to the Sales Units cube data.
The SalesFact_Incr2 table contains data for November and December of
2001. In the previous exercise, you added the November data. Therefore, you
must be careful to not duplicate the November data. You will include only
December data by using a filter in the Incremental Update Wizard.
The Month column exists in the TimeMonth table. You can reference the
TimeMonth table, because it is included in the cube schema and is included
in the cube processing SQL statement.
The incremental update will only add data for dates after November 30,
2001. Therefore, because the table contains only data from November and
December of 2001, you will load the correct values.
Important The Incremental Update Wizard does not check the syntax of the
filter. Therefore, verify that you type the correct expression, paying close
attention to punctuation.
7. Open the SQL line to view the finished WHERE clause and then close the
Process dialog box.
8. Browse the Sales Units cube, and verify that the December 2001 data exists
in the cube.
9. View the November 2001 data also, and verify that the North America
Sales Units value equals your recorded value from the previous exercise.
10. Close the Cube Browser dialog box.
Cube processing is dependent on the data source defined for a cube. Therefore,
you can make changes and apply various database designs to the data source to
improve cube processing performance.
When you process a cube, Analysis Server executes an SQL query that retrieves
Delivery Tip necessary cube data from the data source. Therefore, a very important method
Realize that this topic is
difficult to understand,
of optimizing cube performance is to optimize the executed SQL query. A
especially for students common way to optimize SQL queries is to eliminate unnecessary joins. You
without a relational can do this in Analysis Manager for cube processes by using the Optimize
database background. The Schema command.
following demonstration
should clear up confusion When you perform the Optimize Schema command in the Cube Editor,
associated with the Analysis Manager attempts to modify the cube schema and eliminate
Optimize Schema unnecessary joins between the fact table and dimension tables. Analysis
command. Manager attempts to replace the lowest level dimension keys with the
dimension foreign keys found in the fact table. If your lowest level keys are
optimized in this way, the Analysis Server does not need to join to dimension
tables at cube processing times.
Note You can manually perform the same steps performed by the Optimize
Schema command. In the Cube Editor, change the lowest level Member Key
Columns of your dimensions so that they use the dimension foreign keys from
the fact table.
In order for Analysis Manager to optimize the cube schema, you must follow
these four guidelines when designing dimensions:
! Use shared dimensions to optimize the cube schema. Private dimensions are
always processed at cube processing times, and Analysis Manager must join
to the dimension tables to build the dimensions. Shared dimensions,
however, can be processed before cube processing, and Analysis Manager
does not need to access the dimension tables at cube processing time if the
schema is optimized.
! When defining the lowest level of your dimensions, use the same key
referenced in the fact table. Therefore, at cube processing time, all required
key information exists in the fact table, and you do not need to join to the
dimension table for the key information.
! Use unique keys to identify the lowest level dimension members. Set the
Unique Members property to Yes for the lowest level of those dimensions.
! Do not assign the Disabled property to the lowest level of a dimension.
Tip If you do not want to include the level in the cube, set the Visible
property of the level to False.
To optimize the schema in the Cube Editor, click the Tools menu, and then
click Optimize Schema. If it can do so, Analysis Manager updates the
Member Key Column in the lowest levels of dimensions that follow the
preceding four guidelines. If the Optimize Schema command successfully
updates a dimension, notice that the Member Key Column in the lowest level
of the dimension points to the dimension foreign key in the fact table.
Important Do not optimize the schema of a cube if you depend on the inner
joins of the SQL query to exclude fact table rows that contain dimension keys
not found in your dimension tables. The entire fact table is loaded if all
dimension table joins are eliminated by the Optimize Schema command.
Be aware that, if the dimension table members and fact table members are not
identical, errors may occur when you load data into a cube with an optimized
schema.
Partitioning
Instead of storing data in only one partition in your cube, the default condition,
separate the data into multiple partitions.
The following is an illustrative example:
! A company’s sales cube is updated and loaded with data on a monthly basis.
An efficient method for handling monthly processing is to create multiple
partitions, one for each month.
! With this data segregated into partitions, you focus monthly processing on
one small subset of the data, processing only one month’s information, as
opposed to processing one very large partition that contains all months.
You can have an unlimited number of partitions in a cube. Therefore, there is
no programmed limitation in using this optimization technique.
Problems can occur when performing the various Analysis Server processing
operations. This section includes tips and techniques for solving the most
common problems.
Missing Data
You have processed a cube. You browse the cube, and there is no data, or there
appears to be missing data. Often, the problem is caused by the source
relational database, for the following reasons:
! Analysis Server does not verify the referential integrity of the underlying
relational database.
! If the fact table contains foreign keys that are missing from the joined
domain table, those fact rows are not processed—without an error message
or alert.
Following is a reliable methodology for tracking down missing data:
1. In Analysis Server’s processing window, locate and double-click the suspect
SQL statement. You will open the View Trace Line window that contains
the SQL statement passed to the RDBMS.
2. Copy the statement to your query tool of choice, make changes to the SQL
depending on your tool, and test the query without Analysis Server as part
of the equation.
Processing Errors
A problem can exist in a dimension definition in your cube. The only indication
of the error will be your cube’s inability to process.
If your cube cannot process and there is no specific error defining the problem,
perform the following task:
! Rebuild all shared dimensions that are included in your cube. Structural
changes made to shared dimensions can prevent a cube from processing.
! Remove dimensions from your cube, one by one, and try to process the cube
after each dimension’s removal. In this way, you can isolate the problem
dimension and can fix its definition.
! Verify that the measure data types defined in the Cube Editor are large
enough to store the aggregated cube values.
In this demonstration, you will learn how to optimize the schema of a cube.
Delivery Tip You will learn how to update the Member Key Columns of the lowest levels
Encourage students to
follow along with your
of dimensions in a cube and will see how the updates affect the processing of
demonstration. cubes.
5. Because the Member Key Columns of the lowest dimension levels are
defined from the dimension tables, the SQL statement must join to the
dimension tables during the cube process.
The cube builds the Time dimension from the fact table directly. Therefore,
there is no join to a Time dimension table.
6. Close the Process dialog box.
7. Notice that the join to the Employee table no longer exists in the SQL
statement.
By updating the Member Key Column of the Employee Name level, you
eliminated the need to join to the Employee table during cube processing.
8. Close the Process dialog box.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points.
Lead-in ! Introducing Dimension and Cube Processing
The review questions cover
some of the key concepts ! Processing Dimensions
taught in the module.
! Processing Cubes
! Optimizing Cube Processing
! Troubleshooting Cube Processing
6. How can you design your data source to potentially improve processing
performance?
Create indexes in the data source.
Use the native OLE DB driver to access your data source, if one is
available and stable.
If there are adequate resources, place the data source on the same
server computer as Analysis Services.
Contents
Overview 1
Introducing Partitions 2
Creating Partitions 7
Lab A: Creating a Partition in the Sales Cube15
Using Advanced Settings 19
Merging Partitions 24
Lab B: Applying Advanced Settings to
Partitions 26
Review 29
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, your 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.
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.
Instructor Notes
Presentation: For enterprise-scale online analytical processing (OLAP) cubes developed in
30 Minutes Microsoft® SQL Server™ 2000 Analysis Services, partitioning can improve
both processing and query performance. In this module, students learn how to
Labs: create partitions, how to define slices and filters, and the benefits of using
30 Minutes partitions in cubes to improve scalability.
After completing this module, students will be able to:
! Explain the benefits of partitioning.
! Describe the mechanics of the Partition Wizard.
! Explain when to define slices and when to define filters.
! Describe the purpose and mechanics of merging partitions.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_10.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read the instructor notes and margin notes.
! 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.
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 the module but are not specifically addressed in the
content of the student notes.
1. After defining multiple partitions, there are empty spaces in the cube even
though there is data in the fact tables to support the cells. What causes this?
Incomplete partitions can cause missing data. Incomplete partitions
result when a partition is misdefined (perhaps using a member from a
level that is too low for a slice) or not defined at all. Be careful—if a
partition is misdefined and another partition is added to fix the
problem, duplicate data can result.
2. What is the best way to split a partition into one or more different
partitions?
There is no direct way to do this. To split up an existing partition, you
must redefine the partition on a smaller slice or modify the WHERE
clause and then define new partitions.
3. If a different fact table than the one defined for the partition is used for an
incremental load of the partition, what happens when the cube is refreshed
or processed in the future?
The incremental data will not be included. Analysis Services refers to
only one fact table per cube partition.
Module Strategy
Use the following strategy to present this module:
! Introducing Partitions
Start with an explanation of why partitions are used. Emphasize the fact that
partitions are transparent—users and front-end applications see only cubes.
Explain that partitions in a cube may have different storage modes,
aggregation designs, and physical locations. Define remote partitions.
! Creating Partitions
Explain each step involved in creating a partition—choosing the fact table,
defining a data slice, assigning the partition location, and completing the
partition. Finish by describing how to access commands in Analysis
Manager.
! Using Advanced Settings
Introduce students to the Advanced settings dialog box. Describe the
settings available—specifying filters, enabling drillthrough options, and
setting the aggregation prefix—and explain when to use each.
! Merging Partitions
Explain to students why merging partitions can be beneficial. Use the
Current Year/Prior Year/History partition example. Describe the steps
involved in merging partitions. Emphasize the fact that, to be merged, two
partitions must have the same storage mode and aggregation design.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Introducing Partitions
Lead-in ! Creating Partitions
In this module, you will learn
about partitions and their ! Using Advanced Settings
use in OLAP cubes.
! Merging Partitions
# Introducing Partitions
Topic Objective
To introduce the concept of
partitions.
Lead-in ! Basic Architecture
In this section, you will learn ! Partitioning Design
about partition architecture
and design and the use of ! Remote Partitions
partitions in OLAP cubes.
You create partitions in cubes to help manage cube storage, process cubes, and
query cubes. In this section, you will learn about partition architecture and
design and the use of partitions in OLAP cubes.
Basic Architecture
Topic Objective
To describe the fundamental
characteristics of cube ! Act As Physical Storage Mediums for Cube Data
partitions.
! Improve Cube Performance
Lead-in
Partitions are the physical $ Cube processing performance
storage mediums for cube
data. $ Query performance
! Are Transparent to Users
! Require SQL Server 2000 Enterprise Edition
$ Analysis Server and Analysis Manager Computers
Partitions are the physical storage mediums for cube data. A cube may have one
or more partitions. Each partition may have a different storage mode with a
different aggregation design. In addition, each partition may be located on a
different server. All cubes initially have a single default partition.
When you design aggregations for a one-partition cube, you are actually
designing aggregations for the partition, not for the cube. When you process a
single-partition cube, you are also processing the partition, not the cube. If a
cube contains more than one partition, attempting to design storage for a cube
opens up a dialog box that requires you to select a single partition for designing
aggregations.
You create partitions to improve cube processing and query performance,
increasing the scalability of a cube. Partitions are processed either as part of a
full cube process or independent from other cube partitions. By processing
partitions independently, you isolate processing to a subset of cube data, and
therefore reduce the processing time. In addition, queries can focus on a single
partition and can perform faster data retrievals due to the smaller data set being
accessed.
Partitions are transparent. Users and application front-ends see only cubes—that
is, they query a cube and not a partition. The cube reflects the combined data
contained in all its partitions.
To create multiple partitions in a cube, you must have the Enterprise Edition of
SQL Server 2000 installed on the Analysis Server and on any computers
administering the server. To install the Enterprise Edition of SQL Server 2000,
the computer requires one of the following operating systems:
! Microsoft Windows NT® Server 4.0 with Service Pack 5
! Windows NT Server Enterprise Edition 4.0 with Service Pack 5
! Microsoft Windows 2000 Advanced Server
! Windows 2000 Data Center Server
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
4 Module 10: Managing Partitions
Partitioning Design
Topic Objective
To describe the use of
different aggregation and
storage designs in MOLAP
partitions.
Current Year 35% agg
Lead-in
Partitions separate cube
data into discrete storage
areas. Each partition in a MOLAP
cube may have different Prior Year 10% agg
storage modes, aggregation
designs, and physical
locations.
ROLAP
History 0% agg
Partitions separate cube data into discrete storage areas. Each partition in a cube
Delivery Tip may have different:
Point out that agg stands for
aggregation in the preceding ! Storage modes—multidimensional OLAP (MOLAP), relational OLAP
illustration. (ROLAP), or hybrid OLAP (HOLAP).
! Source fact tables—Salesfact2000 for one partition and Salesfact2001 for
another.
! Aggregation designs—35 percent aggregation in one MOLAP partition
versus 10 percent aggregation in a second MOLAP partition versus 0
percent aggregation in a third ROLAP partition.
! Storage locations—Server 1 in Pittsburgh, Server 2 in San Francisco, and so
forth.
Because of these factors, partitioning is the principal feature in Analysis
Services for increasing cube scalability and designing storage to reflect user
access and response time needs.
In the preceding illustration, three partitions exist in one cube. The data in the
partitions, representing the entire accounting history for a company, is
organized by current year, prior year, and historical data.
The aggregation design for each of the partitions reflects specific user access
needs and storage considerations. The partitions are designed as follows:
! Current Year
The current year partition design contains the highest aggregation
percentage using the MOLAP storage mode—the fastest storage method.
The design reflects the high number of users, the high frequency of the
access of each user, and the presumed performance requirements for the
reporting and analysis of current year data.
Note To further enhance response times, the current year partition might
also reside on a more robust server with large amounts of storage and
memory and a fast processor.
! Prior Year
The prior year partition design also uses MOLAP storage, but with a lower
aggregation level, thus conserving storage while sacrificing reporting
performance. Users access prior year data less frequently than they access
current year data, and data extraction is typically used for printed reports
rather than ad hoc analysis, so response times are less important.
! History
The history design uses ROLAP with zero aggregations, and is the slowest
of the three partitions in reporting performance—reflecting the low
frequency of access by users for this type of data. While reporting is slow,
ROLAP with no aggregations is the most storage efficient design—
reflecting the need for economical storage of large amounts of historical
data.
In summary, partitioning is an important tool for enhancing overall system
performance. Partitioning allows you to balance data load performance, run-
time reporting performance, and storage needs against user needs, production
cycle times, and hardware availability.
Remote Partitions
Topic Objective
To introduce the concept of ! Remote Partitions Are Stored on a Separate Server
remote partitions.
Lead-in $ Data stored separately
You have the ability to $ Processing performed separately
define cube partitions as
remote in Analysis Services. $ Querying performed separately, but funneled through
local Analysis Server
$ Metadata stored and maintained on local Analysis
Server
$ Administration performed on the local Analysis Server
! Transparent Setup and Maintenance
# Creating Partitions
Topic Objective
To introduce the mechanics
of creating partitions.
Lead-in ! Choosing the Fact Table
This section outlines the ! Defining a Data Slice
systematic procedures for
creating additional ! Assigning the Partition Location
partitions.
! Completing the Partition
! Accessing Commands
When you first create a cube, by default the cube contains one partition. You
Delivery Tip add additional partitions by using the Partition Wizard. This section outlines the
Present this entire section
as an informal
systematic procedure for creating additional partitions, which includes the
demonstration. Switch back following steps:
and forth between the slides
! Choosing the data source and the source fact table, if different from the
and the Partition Wizard,
showing students the actual
default source and fact table.
interfaces as you discuss ! Optionally defining a data slice to focus the data included in the partition.
the issues.
! Assigning the location of the partition.
! Completing the partition design by naming it and specifying an aggregation
design.
! Accessing partitioning commands to administer a partition after you have
created it.
When you create a new partition in a cube, the partition fact table is not
required to be from the same data source or fact table defined in the Cube
Editor. The first step in creating a partition is to choose a data source and fact
table for the partition. The fact table must contain the measures and dimension
keys found in the fact table defined in the Cube Editor.
To add a new partition to a cube, perform the following steps:
1. In Analysis Manager, expand the folder for the cube to which you want to
add a partition.
2. Right-click the Partitions folder, and then click New Partition.
The Partition Wizard opens.
3. Click Next to bypass the Welcome step of the Partition Wizard.
To confirm or change the fact table and database, perform the following steps:
1. From the Specify data source and the fact table step, note the data source
and fact table default entries.
The Partition Wizard defaults to the same data source and fact table that are
defined in the Cube Editor.
2. Click Change to specify a different fact table.
If you want to use the same data source and fact table as the default
partition, click Next to proceed to the Select the data slice (optional) step.
3. From the Choose a fact table step, select a fact table for the partition to use
from the Tables list, and then click OK.
The Tables list includes all the fact tables associated with available data
sources. The chosen fact table must have the same structure as the fact table
of the default partition. If it does not, Analysis Manager will display an alert
and will not allow you to proceed with the invalid choice.
If you want to define a different data source, in the Choose a fact table
step, click New Data Source.
4. Click Next.
The next step in designing a partition is determining the partition’s data slice.
Delivery Tip You define a data slice for a partition to define which data to include in the
Point out that defining a
data slice for a partition
partition. In addition, queries use data slices to determine which partitions to
ensures that queries access when retrieving data. Use data slices to prevent duplication of data and
achieve the full benefit of to optimize query performance.
multiple partitions.
Choosing the data slice on which to base a partition is an important design
decision, which must take into consideration user reporting and analysis needs,
load and processing cycle times, and server hardware availability.
While the step of defining a data slice is optional in the Partition Wizard, it is
important to specify a data slice if the partition derives from the same data
source and fact table as the default partition. If you do not otherwise specify a
data slice—or a filter, which is discussed in the next section—then the default
partition and the new partition will contain duplicate data, which defeats the
purpose of creating the additional partition.
If the partitions are derived from different fact tables, and the fact tables are
partitioned the same as the cube partitions, specifying a data slice is not
necessary. However, if you define a data slice, queries accessing partition data
do not waste time by searching through partitions that do not contain the
requested data.
Each partition can reside on a different server. The wizard allows you to specify
whether the partition should remain on the local server or be distributed to
another server.
Note If you want to define a remote partition for a cube, you must define the
remote partition on a computer running Analysis Services. In addition, you
must have a user name in the OLAP Administrator group on both computers.
Lastly, the logon account for the Analysis Server service must be a domain user
account before creating a remote partition.
In the last step of the wizard, you enter the name of the new partition and
specify how you want to design aggregations.
To name and define aggregations for the partition, perform the following steps:
1. In the Finish the Partition Wizard step, enter a descriptive name for the
partition in the Partition name box.
2. Click one of the three What do you want to do? radio buttons.
Following are the behaviors of each of the choices:
• If you click Design the aggregations for your partition now, the
Storage Design Wizard opens after you click Finish.
• If you click Design the aggregations later, when you click the Finish
button, the Partition Wizard closes and you return to the Analysis
Manager. Before processing the cube, you must return to the Storage
Design Wizard to design aggregations. To do so, you right-click the
partition, and then click Design Storage.
• If you click Copy the aggregation design from an existing partition,
you may choose an aggregation design from the list of designs that are
defined for other cube partitions.
3. Select the Process the partition when finished check box to initiate
processing of the partition after you click the Finish button.
4. Click Finish.
Accessing Commands
Topic Objective
To describe the process of ! Right-Click the Partitions Folder
updating, creating,
modifying, and processing $ New partition
partitions in Analysis
Manager. $ Process all partitions
Lead-in ! Right-Click a Specific Partition
The interface for creating,
modifying, and processing $ Edit
partitions in Analysis
Manager is very
$ Process
straightforward and intuitive. $ Design storage
$ Usage-based optimization
$ Merge
Objectives
Explain the lab objectives. After completing this lab, you will be able to:
! Create a new partition in a cube.
Prerequisites
Before working on this lab, you must have:
! Experience working with dimensions.
! An understanding of dimensions, cubes, and measures.
Exercise 1
Creating a Partition in the Sales Cube
In this exercise, you will add a second partition to the Sales cube and populate
it with data. You will partition the cube by defining a data slice from the Time
dimension. The existing default partition contains 2000 data. The new partition
will contain 2001 data.
You can take advantage of several advanced setting features from the
Delivery Tip Advanced settings dialog box, which is accessed from the Finish the Partition
Show the Advanced
settings dialog box during
Wizard step. These advanced settings include:
your lecture. ! Specifying filters for more complex partition definitions.
! Enabling drillthrough options for the partition.
! Setting the aggregation prefix to assign a common prefix for aggregation
tables.
Partition Filters
Topic Objective
To introduce partition filters
and their use when defining ! Used for Specifying Complex Partition Criteria
a partition.
Lead-in ! Accessed from the Advanced Button
In some cases, you might ! Defined by a WHERE Clause as an SQL Pass-Through
want to define a partition by
using more complex
Expression
variables than a single ! Can Refer to Any Column in a Fact Table or Dimension
member. You can create
such a partition by using a
Table
filter statement.
“time_table”.”year”
“time_table”.”year” << 1999
1999
Filters
FiltersAll
AllYears
YearsBefore
Before1999
1999totoDefine
Definethe
theHistory
HistoryPartition
Partition
The principal method for defining the special focus of a partition in a cube is to
specify a data slice as reviewed in the previous section. The important
characteristic of the data slice is that there is a mapping of the partition design
to just one single member from dimensions.
In some cases, however, you might want to define a partition by using more
complex variables than a single member. You can create such a partition by
using a filter statement.
In the preceding partitioning example, the Current Year and Prior Year
partitions were defined by using data slices, because the current and prior years
were specific members from the Time dimension. For the History partition,
however, no single member of the Time dimension was available to define all
other years of accounting history. Many Time members represent history—all
the years before the current and prior years.
Using a filter instead of a data slice can solve the problem of defining the data
for the History partition.
To create a filter for a particular partition, click Advanced in the Finish the
Partition Wizard step to access the Advanced Settings dialog box. You enter
SQL pass-through expressions in the Filter statement box to create the filter.
When the partition is processed, the filter statement is used as the WHERE
clause of the SQL statement that populates the partition.
Because dimension tables are inner-joined to the fact table, a filter typically
includes criteria applied against the fact table or any dimension table used by
dimensions in the partition.
To filter on dimension tables, you must include the fully qualified dimension
table name and column name in the Filter statement box.
For example, to include only the historical data in the History partition, use the
following syntax:
“time_table”.”year” < 1998
To filter on periods that are earlier than July 31, use the following expression.
“MyFactTable”.”Time.ID” < 731
Important Analysis Manager does not validate the expression entered in the
filter statement in the Partition Wizard. The statement is simply passed through
to the relational database management system (RDBMS) at processing time. If
the syntax is incorrect, an error will occur when you attempt to process.
A data slice must be based on a dimension member, but a filter SQL statement
can refer to any column in the fact table or a cube’s dimension table, even if the
column is not used in the cube. For example, a filter could be based on a Batch
Number column, which typically would not be a dimension in a cube.
Drillthrough Options
Topic Objective
To describe the process of
enabling drillthrough for a
partition of a cube. ! Provides Access to Source Data of a Cell
Lead-in ! Is Enabled When:
Analysis Services provides
a feature called drillthrough $ Users have security access
that provides users with
access to the details behind $ Client application supports drillthrough
individual cube data cells.
$ Cube is enabled for drillthrough
$ Cube cell is created directly from data source
! Is Set at the Cube or Partition Level
Analysis Services has a feature called drillthrough, with which users can gain
access to the details behind individual cube data cells. Users can retrieve
drillthrough data if they meet the following requirements:
! The Analysis Services user role has granted the user drillthrough access.
! The client application supports cube drillthrough operations.
! The cube is enabled with drillthrough support.
! The accessed cell is created by cube data directly, and is not the result of a
calculated member or custom member formula.
When you set drillthrough at the cube level, the settings apply to all partitions
in the cube. However, you can customize drillthrough access for each partition
by using the Advanced Settings dialog box in the Partition Wizard.
By using the Partition Drillthrough Options dialog box, you select the
columns that are retrieved when a user accesses drillthrough for a partition data
cell. In addition, you can define a filter that limits the data retrieved for a
particular drillthrough operation for a partition.
Note Before setting drillthrough options for a partition, you must enable the
cube containing the partition for drillthrough. For more information about cube
drillthrough, see module 14, “Using Actions, Drillthrough, and Write-Back,” in
course 2074A, Designing and Implementing OLAP Solutions with Microsoft
SQL Server 2000.
Aggregation Prefix
Topic Objective
To explain the aggregation
prefix option available in the
Advanced Settings dialog
box of the Partition Wizard.
Lead-in
You can select an
aggregation prefix for the
partition in the Advanced
Settings dialog box of the
Partition Wizard.
You can select an aggregation prefix for the partition in the Advanced Settings
dialog box of the Partition Wizard. Update the prefix to assign a prefix to all
aggregation table names when using the ROLAP storage mode.
Note If you are not using ROLAP storage, the aggregation prefix has no effect
on the partition.
Merging Partitions
Topic Objective
To discuss the process of
merging partitions and to
explain the reason for
merging existing partitions.
Lead-in
In Analysis Manager, you
can merge partitions into
other partitions to
consolidate cube data.
You can create multiple partitions from a cube with a single default partition. In
turn, multiple partitions can be merged to create a single partition.
In some situations, you can merge partitions to take advantage of optimized
query performance. Queries that access multiple partitions sometimes take
longer than queries accessing the same data stored in a single partition.
Therefore, you can determine user access and design partitions according to
projected query patterns.
For example, you can design monthly partitions that allow monthly feeds to
process a subset of the cube at a time. However, after the monthly data is
processed, you can merge the partitions so that annual reports containing all
monthly data access a single partition, instead of accessing twelve monthly
partitions.
Consider the Current Year/Prior Year/History partition example. At the end of
each accounting year, you update the three partitions. Starting with the new
accounting year, you reorganize the partitions to reflect new definitions of the
periods for current, prior, and history data:
! The year 2001 becomes the new Current Year.
! The year 2000—previously the Current Year—now becomes the Prior Year.
! The year 1999—previously the Prior Year—now goes into the History pool
of data.
Moving the year 1999 data into the History partition requires merging of the
previous Prior Year and History partitions.
The merging process begins immediately. The operation may take a long
time depending on the size of the merged data sets.
Merge Parameters
The two partitions to be merged must both have the same storage mode and
aggregation design. If this is not the case, you must edit the aggregation design
of the source partition to conform to the design of the target partition. At the
last step of the Partition Wizard, you can copy the aggregation design of the
target partition.
Lab Setup
To complete this lab, you need to complete lab A, Creating a Partition in the
Sales Cube, found earlier in the module.
Exercise 1
Updating the Sales Cube Partitions
In this exercise, you will add a third partition to the Sales cube and will observe
its behavior after creating a new data slice. You will create a partition filter to
address the issue, and will learn how to merge partitions.
! To browse Sales
• Browse the Sales cube and record the Sales Units value for USA for All
Time.
$32,374.00
____________________________________________________________
This value is incorrect. The data for 2000 USA Sales Units is being
duplicated, because two partitions contain the data. You will now learn to
create a filter to limit the data retrieved in a partition.
Important The Partition Wizard does not check the syntax of filters. Verify that
you type the expression with the correct table and column names, and that you
use the proper punctuation.
5. Click OK, copy the aggregation design from the Sales USA partition, and
then process the partition.
6. Close the Process dialog box, browse the Sales cube, and then record the
Sales Units value for USA for All Time.
$26,815.00
____________________________________________________________
Because you eliminated the USA data from the Sales partition, you do not
duplicate the USA data and you see the correct value. Now you will merge
the two partitions to see the behavior of merging partitions with filters.
! To merge partitions
1. In the Sales cube Partitions folder, right-click the Sales USA partition and
then click Merge.
The Merge Partitions dialog box opens.
2. Click the Sales partition in the Into this partition pane and then click Merge.
3. After the process, close the Process dialog box.
4. Browse the Sales cube and record the Sales Units value for USA for All
Time.
$26,815.00
____________________________________________________________
The value is different from when you browsed the cube before performing
the refresh.
8. Edit the Sales partition and notice the data slice and partition filter.
The filter is limiting the USA data. When you originally merged the
partitions, the wizard simply merged the existing data without applying the
filter to the data. However, after you process the cube, the filter is applied
and your data is incorrect.
9. Remove the USA filter from the Sales partition, reprocess the partition,
browse the cube, and verify that the Sales Units value for USA for All
Time is $26,815.00.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Introducing Partitions
Lead-in ! Creating Partitions
The review questions cover
some of the key concepts ! Using Advanced Settings
taught in the module.
! Merging Partitions
1. If you do not have the ability to create new partitions in Analysis Manager,
what is the cause?
Your version of Analysis Manager is not the SQL Server 2000
Enterprise Edition version.
4. If you merge partitions that use separate fact tables, what happens to the fact
tables?
Nothing. They must be merged manually.
Overview 1
Understanding Calculated Members 2
Building Calculated Members 6
Lab A: Creating Average Price 9
Lab B: Creating Sales Variance Calculations 14
Creating Non-Measure Calculated Members 17
Lab C: Creating a Non-Measure Dimension 20
Using Functions within Calculated Members 22
Lab D: Creating Calculated Members with
Functions 24
Understanding Other Calculation Methods 29
Introducing Solve Order 32
Review 34
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, your 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.
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.
Instructor Notes
Presentation: In addition to performance and the intuitive nature of the multidimensional
45 Minutes model, the ability to perform complex calculations is one of the key benefits of
online analytical processing (OLAP). In some respects, an OLAP database is
Lab: something in between a relational database and a spreadsheet. This is why
45 Minutes OLAP is a tool used extensively by analysts. Calculated members in Microsoft®
SQL Server™ 2000 Analysis Services play a vital role in cube functionality and
analysis. In this module, students will learn the rudiments of working with
calculated members and multidimensional expressions (MDX).
After completing this module, students will be able to:
! Describe how calculated members work.
! Explain the mechanics of the Calculated Member Builder and create
calculated members.
! Create calculated members in non-Measure dimensions.
! Understand the use of functions in calculated members.
! Understand other calculation methods in Analysis Services.
! Understand the importance of Solve Order to generate accurate results.
Required Materials
To teach this module, you need Microsoft PowerPoint® file 2074A_11.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read the instructor notes and margin notes.
! Complete all the demonstrations.
! 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.
4. What is the value for the All Product, All Time, North American Bad
Price?
$13,061.94
____________________________________________________________
5. The value is incorrect. What should the value be equal to for the All
Product, All Time, North American Bad Price?
$2.17
____________________________________________________________
3. Click the division sign button (/) below the Insert button.
Notice the Value expression box contains the following expression:
[Measures].[Sales Dollars]/
5. Click Check to verify that the expression is correct, and then click OK.
6. Remove the right bracket from Sales Units. Notice the red left bracket,
indicating that the measure name is not correct and requires a right bracket.
7. Add the right bracket to the Sales Units measure to finish the calculation
expression.
6. The value is correct, because the price calculation occurs after the
aggregation of the cube instead of before the aggregation.
7. Save the Sales cube.
The ampersand (&) before the member indicates the use of the key for the
member, and not the name.
3. Add the plus sign (+) to the Value expression box, adding it to the end of
Dairy.
4. Insert the Meat Product member.
The expression should be the following:
[Product].[Category].&[Dairy]+[Product].[Category].&[Meat]
____________________________________________________________
3. Notice the Product dimension and Dairy + Meat below the Meat member.
Dairy + Meat intersects with all measures in the Sales cube. It also
intersects all other members in all other dimensions.
4. Verify that the calculation is correct for Dairy + Meat.
5. Save the Sales cube.
The «Set» parameter indicates that the Avg function requires a Set as its
only parameter.
In the context of this exercise, a Set defines multiple members from the
same dimension.
Note Sets are important fundamental MDX constructs, and are defined
thoroughly in course 2093A, Implementing Business Logic with MDX in
Microsoft SQL Server 2000.
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 the module but are not specifically addressed in the
content of the student notes.
1. Where do calculated members process?
Calculated members process on both the server and client computers.
Analysis Services is designed for client-server environments, with
clients sharing a significant amount of the work in processing
calculations.
2. Can you force Analysis Services to process all calculations on the server
computer?
Yes. If you do not want the client computers processing calculations,
you can update the Analysis Server connection string in custom client
applications. An execute location property exists that can be set to force
calculations to process entirely on the server, therefore enabling a more
thin-client deployment.
3. Are there other MDX and calculated member resources?
Yes. The course 2093A, Implementing Business Logic with MDX in
Microsoft SQL Server 2000 is a very good resource for developing
calculations in Analysis Services cubes by using MDX.
4. Can calculated members affect query performance?
Yes. Calculated members with inefficient designs can severely affect
query times. It is important to understand the proper way in which to
design complex calculated members.
Module Strategy
Use the following strategy to present this module:
! Understanding Calculated Members
Teach students that a key mechanism for performing calculations with
Analysis Server is the use of calculated members. Explain that the
expressions used to define calculated members use a language called MDX,
which stands for multidimensional expressions.
! Building Calculated Members
Introduce the Calculated Member Builder and describe its components
that assist in creating calculated members. Introduce the interface for
building calculated members in Analysis Manager—the Calculated
Member Builder, which is a dialog box used for creating calculated
members in regular and virtual cubes.
! Creating Non-Measure Calculated Members
Introduce the concept of creating calculated members in non-Measure
dimensions. Tell students that a calculated member can belong to any
dimension.
! Using Functions within Calculated Members
Discuss functions and their use in calculated members. Show that the MDX
language has many functions that are available to create complex calculated
members.
! Understanding Other Calculation Methods
Explain to students that there are calculation methods other than the creation
of calculated members. Analysis Services provides a variety of methods for
defining calculations by using MDX.
! Introducing Solve Order
Discuss the importance of setting Solve Order for calculated members. The
Solve Order feature in Analysis Services allows you to specify the order in
which calculations execute.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Understanding Calculated Members
Lead-in ! Building Calculated Members
In this module, you will learn
about calculated members ! Creating Non-Measure Calculated Members
and how to use them in
OLAP cubes to enhance ! Using Functions within Calculated Members
analysis.
! Understanding Other Calculation Methods
! Introducing Solve Order
A key mechanism for performing calculations with Analysis Server is the use of
calculated members. A calculated member is a dimension member whose value
is based on an expression that is calculated at query time. You typically base
the calculation on existing cube data and other calculated members. You
construct calculated members from arithmetic operators, numeric constants, and
a rich set of built-in functions.
The expressions used to define calculated members employ a language called
multidimensional expressions (MDX). MDX is the query language used by
OLE DB for OLAP and thus Analysis Server. You define calculated members
by using a subset of MDX.
Note The Parent member does not determine the aggregation of the
calculated member, because calculated members do not aggregate. The Parent
member merely dictates the placement of the calculated member in the
dimension hierarchy.
! Member name. Defines the name of the calculated member. For example,
the calculated member in the preceding illustration is Average Selling
Price.
! Check. Validates the expression in the Value expression box.
! Value expression. Contains the expression used to define the calculated
member. You either type the expression into the Value expression box, or
drag dimension and function values to the box.
! Data. Defines the cube metadata containing dimension, hierarchy, level, and
member information. Add metadata to an expression by double-clicking the
object, clicking Insert, or dragging the object to the Value expression box.
! Functions. Contains the MDX functions available for creating calculated
members. Similar to the Data box, it allows you to double-click, click
Insert, or use a drag and drop operation to add functions to your
expressions. The MDX function library is included in the Function box,
plus any external function libraries that you registered in the Calculated
Member Builder.
! Insert. Inserts objects or functions from the Data or Functions box into the
Value expression box.
! Numbers and Operators. Gives you the ability to add numeric constants or
arithmetic operators to expressions without having to use the keyboard.
! Register. Allows you to register external function libraries.
You create calculated members to enhance analysis in cubes and virtual cubes.
Delivery Tips The Calculated Member Builder provides a simple interface for creating
The steps for this
demonstration are included
expressions and assists in developing calculated members.
in the Instructor Notes. In this demonstration, you will learn how to create a calculated member by
Encourage students to
using the Calculated Member Builder.
follow along with your
demonstration.
Prerequisites
Before working on this lab, you must have:
! Experience working with the Cube Editor.
! An understanding of dimensions, cubes, and measures.
Exercise 1
Creating Average Price
In this exercise, you will open the Calculated Member Builder and navigate
the Data box to view dimensions, levels, and members in the Sales cube. You
then will create a new calculated member, Average Price, and will browse the
results in the Cube Editor.
4. What is the value for the All Product, All Time, North American Bad
Price?
$13,061.94
____________________________________________________________
5. The value is incorrect. What should the value be equal to for the All
Product, All Time, North American Bad Price?
$2.17
____________________________________________________________
3. Click the division sign button (/) below the Insert button.
Notice the Value expression box contains the following expression:
[Measures].[Sales Dollars]/
5. Click Check to verify that the expression is correct and then click OK.
6. Remove the right bracket from Sales Units. Notice the red left bracket,
indicating that the measure name is not correct and requires a right bracket.
7. Add the right bracket to the Sales Units measure to finish the calculation
expression.
6. The value is correct, because the price calculation occurs after the
aggregation of the cube instead of before the aggregation.
7. Save the Sales cube.
Prerequisites
To complete this lab, you must first complete lab A, Creating Average Price,
found earlier in this module.
Exercise 1
Creating Sales Variance
In this exercise, you will create a new calculated member, Sales Variance, by
using the Calculated Member Builder.
Exercise 2
Creating Sales Variance %
In this exercise, you will create a new calculated member, Sales Variance %,
by using the Calculated Member Builder. You will learn how to reference a
calculated member in the expression of another calculated member.
Though you created all the calculated members in lab A, Creating Average
Price, and lab B, Creating Sales Variance Calculations, in the Measures
dimension, a calculated member can belong to any dimension.
Common Applications
A common application of calculated members outside the Measures dimension
is a calculated member that compares the performance of one member to
another. You can also create non-Measure calculated members to create rollups
outside the natural dimension hierarchy.
The following list contains examples of non-Measure calculated members:
! A time dimension contains members 2000 and 2001. You can create a
calculated member in the time dimension that calculates the difference, or
variance, between the two years.
! A sales representative dimension can contain a calculated member that
calculates the average performance for all sales representatives.
! A product dimension can contain a calculated member that sums products
outside their regular hierarchy aggregations.
Aggregation Behavior
Calculated members do not roll up in the parent dimension. Therefore,
calculated member values do not affect or add to cube aggregations.
Prerequisites
Before working on this lab, you must have:
! Experience working with the Cube Editor.
! An understanding of dimensions, cubes, and measures.
! Experience working with the Calculated Member Builder.
! Completed lab A, Creating Average Price, found earlier in this module.
! Completed lab B, Creating Sales Variance Calculations, found earlier in this
module.
Exercise 1
Creating Time Variance
In this exercise, you will create a non-Measure dimension calculated member.
The new calculated member, Time Variance, will calculate the difference
between years 2000 and 2001.
You have seen how to use simple arithmetic operators and members to define
calculated members. In addition to these simple expressions, the MDX
language contains a rich library of functions that are available to create complex
calculated members.
You create calculated members in the Calculated Member Builder. In the
Calculated Member Builder, the Functions list contains several folders. Each
folder contains MDX functions used to create calculated members.
When searching for functions in the Functions list, ask the question, “What
data or object type does the function return?” If the function returns a number,
you can find the function in the Numeric folder. If it returns a string, you can
find the function in the String folder.
Prerequisites
Before working on this lab, you must have:
! Experience working with the Cube Editor.
! An understanding of dimensions, cubes, and measures.
! Experience working with the Calculated Member Builder.
! Completed lab A, Creating Average Price.
! Completed lab B, Creating Sales Variance Calculations.
! Completed lab C, Creating a Non-Measure Dimension.
Exercise 1
Creating Average Product Category
In this exercise, you will create a non-Measure dimension calculated member
that uses the Avg function. The new calculated member, Average Product
Category, calculates the average of all Category level members.
The «Set» parameter indicates that the Avg function requires a Set as its
only parameter.
In the context of this exercise, a Set defines multiple members from the
same dimension.
Note Sets are important fundamental MDX constructs, and are defined
thoroughly in course 2093A, Implementing Business Logic with MDX in
Microsoft SQL Server 2000.
Exercise 2
Creating Total Quarter
In this exercise, you will create a calculated member in the Time.Calendar
dimension to test the value for the aggregated All Time member. You will use
the Sum function to add all members in the Quarter level.
Because Total Quarter calculates all measures, you do not need to specify
a numeric expression.
2. The Value expression box contains the following template:
Sum(«Set»)
3. In the Functions list, expand the Set folder and find the Members – Level
function.
4. Click the «Set» parameter in the Value expression box.
5. Drag Members – Level to the «Set» parameter.
There are calculation methods other than the creation of calculated members.
Delivery Tips Analysis Services provides a variety of methods for defining calculations by
Quickly describe each type
of calculation, but do not
using MDX.
spend too much time here.
The calculations are outside Note For more information on other calculation methods, refer to SQL Server
the scope of this course, Books Online or see course 2093A, Implementing Business Logic with MDX in
and you should therefore Microsoft SQL Server 2000.
refer students to course
2093A, Implementing
Business Logic with MDX in
Microsoft SQL Server 2000 Custom Rollup Formulas
and SQL Server Books You create custom rollup formulas in dimensions by using MDX expressions.
Online for more information. The following list describes custom rollup formulas:
Give students brief ! Custom rollup formulas override the Aggregate Function properties
examples of when they use defined for the cube measures across a dimension level.
each type of calculation.
! You use custom rollup formulas when you need members to aggregate
differently from the standard Aggregate Function properties defined for
measures.
For example, if you do not want Quarter member values to sum to the
Year level, you can create a custom rollup formula for the Year level,
defining its calculation as the following expression:
Time.CurrentMember.LastChild
Calculated Cells
Calculated cells are similar to calculated members, except that they supply data
for an existing range of cells, or even a single cell, instead of creating a single
member applied across all other dimensions. The following list describes
calculated cells:
! Calculated cells are calculations developed by using MDX that supply
values for cells in a specified range of existing cells.
! You create calculated cells when you require a calculation applied to a finite
number of cube cells and not to all cells across a single dimension.
For example, to apply a Budget Expense allocation calculation to only
those stores in Illinois that produce Sales in excess of $500,000, you can
create a calculated cell that focuses on those specific cells. You therefore
avoid creating a separate calculated member that calculates across all stores
for Budget and Actual values.
! The original cell values are not lost when you create calculated cells.
Therefore, you do not affect underlying data when adding calculated cells to
a cube.
! Calculated cell results are not stored, they evaluate at query time.
! You create calculated cells by first defining a calculation subcube, or a
range of cells in a cube.
! You must also define a calculation condition and a calculation formula.
• The calculation condition determines which cells perform the calculation
formula.
• The calculation formula is the MDX used to calculate the cells specified
by the calculation condition.
! You create calculated cells by using the Calculated Cells Wizard.
! If a cube cell contains a custom member formula and a calculated cell
formula, the calculated cell formula overrides the custom member formula.
The Solve Order property in Analysis Services allows you to specify the order
Delivery Tips in which calculations execute.
Present this build slide in
the following order: In the preceding illustration, two calculations exist in the cube—Average Sales
1. Explain that the two and Dairy + Meat. Average Sales equals Sales divided by Units, and Dairy +
spreadsheets demonstrate
Meat equals Dairy plus Meat.
two orders of calculation for
the same data values. Because the two calculations exist in separate dimensions, Measures and
2. Sequentially explain the Product, the calculations intersect. The two calculations define the intersection:
calculations in the top
spreadsheet, with Dairy + ! Dairy + Meat
Meat calculating first.
3. Next, sequentially explain ! Sales / Units
the calculations in the If the Dairy + Meat member calculates before the Average Sales member, the
bottom spreadsheet, with intersection result is equal to $2.67. The calculation steps are as follows:
Average Sales calculating
first. 1. Dairy + Meat for Sales = 400
4. Ask students which
calculation they prefer. They 2. Dairy + Meat for Units = 150
should say the top 3. (Dairy + Meat for Sales) / (Dairy + Meat for Units) = 400 / 150 = 2.67
calculation.
5. Finally, explain that you This is the expected result. However, if the Dairy + Meat member calculates
set the calculation order by after the Average Sales member, the result is equal to $5.33. Consider the
using the Solve Order calculation order:
property, and describe
where and how to define it 1. Sales / Units for Dairy = $1.33
in the Cube Editor.
2. Sales / Units for Meat = $4.00
3. (Sales / Units for Dairy) + (Sales / Units for Meat) = $1.33 + $4.00 =
$5.33
The two results are very different. You can define the order of the two
calculations by updating the Solve Order property. Managing Solve Order is
critical in a multidimensional environment when calculations intersect. It is
important that you understand Solve Order and update the property in specific
situations.
Set the Solve Order property in calculated members that exist in separate
dimensions, and therefore intersect at cells. If you do not set the Solve Order
property, Analysis Services sets the calculation order based on order
declarations, which could give you misleading results. Different calculation
types—for example calculated cells, custom member formulas, and calculated
members—use different solve orders. You can refer to SQL Server Books
Online for a listing of the default solve orders for each type of calculation.
Note Solve Order and Pass Order (the order of calculation stages) are very
complex concepts. For more information on both concepts, refer to SQL Server
Books Online or course 2093A, Implementing Business Logic with MDX in
Microsoft SQL Server 2000.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Understanding Calculated Members
Lead-in ! Building Calculated Members
The review questions cover
some of the key concepts ! Creating Non-Measure Calculated Members
taught in the module.
! Using Functions within Calculated Members
! Understanding Other Calculation Methods
! Introducing Solve Order
6. Where do you update the Solve Order property? Give an example of when
the solve order might be used.
You update the Solve Order property on the Advanced tab of the
Properties pane in the Cube Editor.
Use Solve Order when calculated members intersect, or when multiple
calculations depend on each other.
Contents
Overview 1
Understanding Virtual Cubes 2
Obtaining Logical Results 4
Building a Virtual Cube 5
Lab A: Creating Virtual Cubes 10
Creating Calculated Members 14
Lab B: Adding Calculated Members to a
Virtual Cube 16
Review 19
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, your 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.
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.
Instructor Notes
Presentation: A virtual cube is an online analytical processing (OLAP) cube that combines or
25 Minutes extracts data from one or more source cubes. These cubes are called virtual
because they consume no disk storage, other than metadata. In this module,
Labs: students learn when to use virtual cubes and the mechanics of how to build
20 Minutes them in Microsoft® SQL Server™ 2000 Analysis Services.
After completing this module, students will be able to:
! Understand when to use virtual cubes and know their benefits.
! Know the rules for constructing meaningful virtual cubes.
! Build virtual cubes by using the Virtual Cube Wizard.
! Define calculated members in virtual cubes by using the Calculated Member
Builder.
Required Materials
To teach this module, you need Microsoft PowerPoint® file 2074A_12.ppt.
Preparation Tasks
To prepare for this module, you should:
! Read all of the student materials for this module.
! Read the instructor notes and margin notes.
! 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.
Other Activities
Difficult Questions
Below are difficult questions that students may ask you during the delivery of
this module and answers to the questions. There materials delve into subjects
that are within the scope of the module but are not specifically addressed in the
content of the student notes.
1. How does the enabling or disabling of levels in the source cube affect the
enabling or disabling of levels in the virtual cube?
Enabling or disabling levels in the source cube does not affect the
enabling or disabling of levels in the virtual cube. Levels in the source
cube are completely separate from levels in the virtual cube, so that,
when users are using a virtual cube, they can access members for
querying or for creating calculations down to the lowest level in the
dimension, regardless of level enabling or disabling in the source cube.
2. Can you add a virtual dimension to a virtual cube without also adding the
dimension on which the virtual dimension depends?
No. When you add a virtual dimension to a virtual cube, the regular
dimension is added to the virtual cube automatically.
3. Can you base virtual cubes on linked cubes?
Yes.
4. When you process a source cube, are all virtual cubes that use the source
cube data automatically processed?
No.
5. Can a virtual cube combine source cubes that use multidimensional OLAP
(MOLAP), relational OLAP (ROLAP), and hybrid OLAP (HOLAP) storage
modes?
Yes.
Module Strategy
Use the following strategy to present this module:
! Understanding Virtual Cubes
Begin with a definition of virtual cubes and describe their characteristics.
Discuss virtual cube limitations and storage.
! Obtaining Logical Results
Explain that, when building a virtual cube from more than one source cube,
students must follow some simple rules to obtain logical results. Explain
that they need to use dimensions and measures that the source cubes have in
common—otherwise there is no analytical value in combining the cubes.
! Building a Virtual Cube
Introduce students to the Virtual Cube Wizard. While giving the lecture,
open the Virtual Cube Wizard on your computer and show students the
various interfaces. Describe the steps involved in creating a virtual cube—
choosing the source cube, choosing the measures, choosing the dimensions,
and finalizing the cube.
! Creating Calculated Members
Explain that calculated members can be added to virtual cubes by using the
Virtual Cube Editor. Describe the different ways to add calculated members
to virtual cubes—creating calculated members and importing them.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Understanding Virtual Cubes
Lead-in ! Obtaining Logical Results
In this module, you will learn
about virtual cubes and how ! Building a Virtual Cube
to create them.
! Creating Calculated Members
A virtual cube is a cube that combines or extracts data from one or more source
cubes. In many respects, a virtual cube is to Analysis Server what a view is to a
relational database management system (RDBMS)—it provides a different view
of the underlying data without storing any additional data except the metadata
that defines the virtual cube.
Note This module defines virtual cubes as being derived from source cubes.
Source cubes are the cubes from which a virtual cube is derived.
Note If a virtual cube is based on more than one source cube, when the
virtual cube is queried, it queries the source cubes in parallel.
Dimension Limitations
Following are limitations of virtual cubes:
! Virtual cubes cannot slice the dimensions of the source cubes. For example,
suppose a source cube contains the dimension Region. If Region is placed
in a virtual cube, the entire dimension is included. You cannot include only
the Western region.
! You cannot choose which levels of the dimension are included. For
example, you cannot include summary levels and exclude bottom-level
members. The entire dimension, with all levels, must be included.
The Measures dimension is an exception to these rules. You can pick the
specific measures that populate a virtual cube.
Virtual cubes automatically use aggregations from the source cubes. The
performance overhead imposed by the virtual cube on top of the source cubes is
negligible.
When building a virtual cube based on more than one source cube, you must
Delivery Tips follow some simple rules to obtain logical results.
Explain the preceding
illustration by comparing two Common dimensions and measures are required from source cubes:
cubes with different
dimensionality. Combining ! The source cubes should contain one or more shared dimensions that are the
them into a virtual cube same, and at least one of the common shared dimensions should be included
would produce nonsensical in the virtual cube.
results.
! Analysis Manager does not enforce this rule, but the result will be
nonsensical if it is not followed. This can be easily visualized from the
preceding spreadsheet illustration. The first cube contains region and time
dimensions. The second cube contains sales representatives and scenario
dimensions. Because the two cubes have nothing in common, it makes no
sense to base a virtual cube on them.
! Include at least one measure from each source cube in the virtual cube or
there is no reason to combine the cubes. Again, Analysis Manager will not
prevent you from doing this.
You build a virtual cube simply by using the Virtual Cube Wizard. To display
the wizard, right-click the Cubes folder and then click New Virtual Cube.
At the first step of the Virtual Cube Wizard, select the source cube or cubes
Delivery Tip from which the virtual cube will be derived.
Enhance your lecture by
opening the Virtual Cube
Wizard and showing Tip Remember that if you select multiple source cubes, these cubes should
students the corresponding have at least one shared dimension in common.
interfaces.
Encourage students to To select a source cube, either click a cube from the Available cubes box and
follow along with your then click the arrow (>), or double-click the cube. To select all the cubes, click
demonstration on their the double arrow (>>). The names of the selected cubes appear in the Virtual
computers. cube includes box. To remove a cube from this list, either click the cube and
then click the back arrow (<), or double click the cube in the Virtual cube
includes box.
The next step is to add measures to the virtual cube. The wizard displays the
Delivery Tip measures from the selected source cube or cubes in the Available measures
Encourage students to box.
follow along with your
informal demonstration on
their computers. Tip Remember to include at least one measure from each source cube. The
source cube name appears in the second column of the Available Measures
box.
To select a measure, either click a measure from the Available measures box
and then click the arrow (>), or double-click the measure. To select all the
measures, click the double arrow (>>). The names of the selected measures
appear in the Selected measures box. To remove a measure from this list,
either click the measure and then click the back arrow (<), or double click the
measure in the Selected measures box.
Next, choose the dimensions. The wizard displays the dimensions from the
Delivery Tip selected source cube or cubes in the Available dimensions box.
Encourage students to
follow along with your
informal demonstration on Tip If the virtual cube is based on more than one source cube, you must select
their computers. at least one shared dimension in common between the cubes to obtain a logical
result.
The last steps are to name the cube and process it. Because a virtual cube
Delivery Tip contains no data, it processes quickly. Type the name of the virtual cube in the
Encourage students to Virtual cube name box and then decide when to process the cube—now or
follow along with your later. Click the appropriate radio button and then click Finish.
informal demonstration on
their computers.
Note If the source cubes or dimensions are not available at the time of
processing a virtual cube, the Analysis Server processes the cubes and
dimensions automatically as part of the virtual cube process.
Prerequisites
Before working on this lab, you must have:
! Experience working with Analysis Manager.
! An understanding of virtual cubes.
Exercise 1
Creating the Basic Sales Virtual Cube
In this exercise, you will build a virtual cube, Basic Sales, that is a subset of the
Sales cube. This virtual cube does not contain certain sensitive data, such as
Sales by Employee. By giving users access to the Basic Sales virtual cube
instead of the Sales cube, you can limit their access to certain data.
Exercise 2
Creating the Actual and Forecast Cube
In this exercise, you will build a virtual cube combining the Sales and Sales
Forecast cubes. The Sales cube contains sales information and the Sales
Forecast cube contains forecast information. You will combine the two cubes
to compare forecast units with sales units.
You can create calculated members in virtual cubes. In addition, you can import
calculated members from the source cubes. The interface for managing
Delivery Tip calculated members in virtual cubes is very similar to the interface used in
Encourage students to regular cubes.
follow along with your
informal demonstration on Working with the Virtual Cube Editor
their computers.
After you create a virtual cube, it appears in the list of cubes below the Cubes
folder in Analysis Manager. If you need to edit a virtual cube, right-click the
cube and then click Edit. The Virtual Cube Editor opens.
The Virtual Cube Editor is similar to the Cube Editor that you use to manage
regular cubes.
! Like the Cube Editor, the Virtual Cube Editor contains the cube tree view
and the Properties pane.
! Whereas the Cube Editor has a schema and data pane, the Virtual Cube
Editor has only a data pane containing the Cube Browser.
! You can create new calculated members, calculated cells, actions, and
named sets in the Cube Editor and the Virtual Cube Editor.
! In addition to creating new calculated members, calculated cells, actions,
and named sets, you can import these objects into virtual cubes by using the
Virtual Cube Editor.
! As in the Cube Editor, when you create new calculated members in the
Virtual Cube Editor, you use the Calculated Member Builder to define and
edit the calculations.
Note In addition to calculated members, you can also import calculated cells,
actions, and named sets defined in the source cubes. For more information on
actions, see module 14, “Using Actions, Drillthrough, and Writeback,” in
course 2074A, Designing and Implementing OLAP Solutions with Microsoft
SQL Server 2000.
To import calculated members into a virtual cube by using the Virtual Cube
Editor, right-click the Calculated Members folder and click Import
Calculated Member. This opens the Import Calculated Members dialog box.
From this dialog box, you can select individual or all calculated members from
source cubes.
As you import a calculated member into a virtual cube, the Virtual Cube Editor
verifies that the syntax remains correct in the new cube definition. All
measures, dimensions, and members defined in the calculated member must
exist in the virtual cube for the calculated member to be valid.
If you receive an error when importing a calculated member, the Virtual Cube
Editor indicates the problem, but still imports the calculated member so that
you can edit the calculation if you choose.
If the syntax is incorrect, edit calculated members in the Virtual Cube Editor by
right-clicking the imported calculated member that requires editing and then
clicking Edit.
Prerequisites
Before working on this lab, you must have:
! Experience working with Analysis Manager.
! An understanding of virtual cubes.
! An understanding of calculated members.
! Experience working with the Calculated Member Builder.
Lab Setup
To complete this lab, you need the following:
! To have completed lab A, Creating Virtual Cubes, found earlier in the
module.
Exercise 1
Creating a Calculated Member
In this exercise, you will create a calculated member in a virtual cube. When
you create a virtual cube from multiple source cubes, include at least one
measure from each source cube. Often, it makes sense to create a calculated
member to compare the measures. In this case, you will create a calculated
member in the Actual and Forecast virtual cube that subtracts Sales Units
from Forecast Units.
Exercise 2
Importing a Calculated Member
In this exercise, you will import a calculated member from a source cube into a
virtual cube. The virtual cube must include any members used by the calculated
member. The Sales cube contains a calculated member called Average Units,
which uses the Sales Units and Count measures. In this exercise, you will
import the Average Units calculated member from the Sales cube into the
Actual and Forecast virtual cube.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Understanding Virtual Cubes
Lead-in ! Obtaining Logical Results
The review questions cover
some of the key concepts ! Building a Virtual Cube
taught in the module.
! Creating Calculated Members
2. Can you specify the levels in a shared dimension that display in a virtual
cube?
No. A shared dimension added to a virtual cube must include all
defined levels. You cannot include only some of the levels.
3. Is it possible to build a virtual cube when the source cubes do not contain a
dimension in common?
Yes, but it is not recommended.
Contents
Overview 1
Office 2000 OLAP Components 2
Using Excel PivotTables 4
Using PivotCharts 11
Lab A: Creating PivotTables and
PivotCharts 14
Working with Local Cubes 20
Creating OLAP-Enabled Web Pages 24
Lab B: Working with Local Cubes and Web
Pages 26
Review 29
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, your 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.
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.
Instructor Notes
Presentation: Microsoft® PivotTable® Service (PTS) is bundled with Microsoft Office 2000.
30 Minutes PTS works not only with Microsoft SQL Server™ 2000 Analysis Services, but
also with data sources such as relational databases.
Lab:
30 Minutes Microsoft Excel 2000, a major component of Office 2000, provides powerful
online analytical processing (OLAP) functionality to developers and users.
This module is an overview of Excel 2000 OLAP features. It gives students the
opportunity to create and manipulate the various Office 2000 OLAP interfaces.
After completing this module, students will be able to:
! Understand the various Microsoft Office 2000 OLAP features.
! Create a PivotTable from an OLAP cube.
! Create PivotCharts.
! Create local cube files.
! Create a Web page containing Pivot Web components.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_13.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 integrating the demonstrations with the lecture.
! 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.
6. The Choose Data Source dialog box appears again. Click OK.
7. Step 2 of the PivotTable Wizard appears again. Click Next and then click
Finish.
A skeletal PivotTable report appears on the worksheet, along with a
PivotTable toolbar that displays all the dimensions and measures in the
cube.
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 the module but are not specifically addressed in the
content of the student notes.
1. Can you export an Office PivotList back to an Excel PivotTable report?
Yes. To do so, click the Export To Excel toolbar button. Interestingly, if
you show only selected levels in a PivotTable list and then export that
list to Excel, the resulting PivotTable report will include only the
selected levels.
2. Can you update the subtotal labels in a PivotTable so that they match the
total of only the visible cells?
Unfortunately, you cannot make the subtotals match the total of only
visible cells. However, you can turn off subtotals for dimensions.
3. What happens if the PivotTable toolbar becomes small and does not include
all the dimensions and measures?
Click the PivotTable in the worksheet. The toolbar should return to its
original state.
4. How do you retrieve the PivotTable toolbar if you accidentally close it?
Right-click the Excel toolbar, and click PivotTable from the list of
possible toolbars.
5. Does an Office PivotList support events?
If you write Microsoft Visual Basic® code and are familiar with creating
event handlers to react to the behavior of users, you might be interested
to know that an Office PivotList supports events for numerous user
actions. In contrast, an Excel PivotTable report does not have any
events.
Module Strategy
Use the following strategy to present this module:
! Office 2000 OLAP Components
Begin by defining the Office 2000 OLAP components—PivotTable
Services, Excel 2000 PivotTables, Office Pivot Web control, and local
cubes—and describe how each component is used to access OLAP data.
! Using Excel PivotTables
In this section, you show how to create, manipulate, and format a
PivotTable based on an OLAP cube. Integrate your lecture with a
demonstration. First, show how to define the data source. Next, show how
to use the PivotTable toolbar and how to drill down and pivot in a
PivotTable. Describe how to use various methods that enhance PivotTable
reports, such as filtering and refreshing. Finish the section by describing
various formatting options for PivotTables.
! Using PivotCharts
Explain that Excel 2000 creates PivotChart® reports that are fully interactive
and integrated with PivotTable reports. Emphasize that a PivotChart is
always linked to a PivotTable. Describe the two methods of creating a
PivotChart and integrate your lecture with a demonstration showing students
how to create a PivotChart from an existing PivotTable report. Finish by
describing some unique characteristics of PivotCharts.
! Working with Local Cubes
Define local cubes as structurally complete OLAP cubes that reside on
client computers. Compare and contrast local cubes and server-based cubes.
Explain that you can create a local cube from either an OLAP source or a
relational source. Combine your lecture with a demonstration showing how
to create a local cube from an OLAP source.
! Creating OLAP Enabled-Web Pages
Explain to students that Office 2000 makes it easy to create Web pages from
Office documents. Describe and show how to create a Web page from a
PivotTable report, combining the lecture and demonstration. Next, describe
how to manipulate a PivotList—using the Field List, adding and removing
items, and filtering and pivoting.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Office 2000 OLAP Components
Lead-in ! Using Excel PivotTables
In this module, you will learn
about the OLAP ! Using PivotCharts
components available in
Office 2000. ! Working with Local Cubes
! Creating OLAP-Enabled Web Pages
Excel 2000 PivotTables are the focus of this module. Other important OLAP
Delivery Tips features exist, however, in Office 2000. This module reviews the various OLAP
Briefly describe each of the
components and define how
components of Office 2000.
they are used to access
OLAP data. PivotTable Service
PivotTable Service (PTS) is the mandatory client component for querying
Except for PTS, do not go
into detail, because each
Analysis Server.
component is covered later While PTS is a component of Analysis Services, it is also bundled with Office
in the module.
2000. PTS places OLAP functionality on every Office 2000 desktop, regardless
of whether users have access to an Analysis Server.
PTS has no built-in user interface. It is an invisible component that provides
OLAP functionality to Excel 2000, third-party applications, and custom
applications. PTS provides the OLE DB for OLAP and Microsoft ActiveX®
Data Objects (Multidimensional) (ADO MD) object interface.
Because PTS communicates with relational databases, PTS provides OLAP
functionality for organizations that do not use Analysis Server.
Tip You do not need to install PTS on every client computer. To provide
OLAP capability in a thin-client environment that does not require much
memory usage on client computers, you can install PTS on another computer
that acts as a middle tier and provides OLAP access for the client computers.
Note An Excel PivotTable is not the same object as PivotTable Service (PTS).
However, Excel uses PTS when manipulating PivotTables.
Local Cubes
PTS supports the ability to create local cubes derived from an Analysis Server
or from a relational source. This feature is available to users in two forms:
! Excel 2000 contains an interface for defining local cubes that is covered in
this module.
! Local cubes can be created programmatically.
The following are things you can do from the toolbar to arrange the layout of
the PivotTable:
! Drag one or more dimensions from the PivotTable toolbar to the Row Fields
area.
! Drag one or more dimensions to the Column Fields area.
! Drag one or more dimensions to the Page Fields area.
! Drag at least one measure to the Data Items area—a PivotTable must have
at least one data item.
You can place more than one dimension in the page, row, and column regions.
You can pivot page, row, and column data to the other axes by dragging the
dimension tiles.
The following are additional capabilities that enhance the ability to manage the
data and organization of a PivotTable report.
Refreshing a PivotTable
If the data in a cube changes, right-click any cell in the table and click Refresh
Data. Analysis Server is re-queried and the data is refreshed.
A pivot operation will also re-query the Analysis Server. There is no option to
turn off a data refresh on pivot operations.
A user might create a PivotTable, save it, and open it several weeks later but
forget to refresh the report. In this case, the user can unwittingly view old data.
To avoid this problem, you can automate the refresh process. Right-click any
cell in the PivotTable and then click Table Options. This displays the
PivotTable Options dialog box. Select the Refresh on Open check box. The
PivotTable then automatically refreshes when the workbook opens.
Formatting PivotTables
Topic Objective
To describe various
formatting options for
PivotTables.
Lead-in
A PivotTable report has
many formatting options.
You will learn about some of
the most useful ones.
You use the PivotTable Options dialog box to implement various formatting
Delivery Tips options. You can access this dialog box by right-clicking any cell in the
Continue with the informal
demonstration showing
PivotTable and then clicking Table Options.
various features from this There are other ways to apply formatting to PivotTables and PivotTable cells:
section.
! Applying AutoFormats
Encourage students to
follow along with your The easiest way to format a PivotTable is by using an AutoFormat. Right-
informal demonstration on click any cell in the PivotTable, and then click Format Report. The
their computers. AutoFormat dialog box opens. You then choose from a gallery of styles.
The AutoFormat persists, even as you manipulate the PivotTable.
In the lab that follows,
students will create
! Formatting cells
PivotTable reports on their You can format specific cells in a PivotTable by right-clicking the cell and
own. clicking Format Cells.
! Formatting Measures
Another method for formatting a measure is to right-click any single cell in
the given measure and click Field Settings. Next, click the Number button
to display Excel’s standard numerical formatting dialog.
The advantage of this technique is that the formatting is applied to the entire
measure, even if the cells are not contiguous, and the formatting persists
even as the measure is pivoted.
Using PivotCharts
Topic Objective
To demonstrate
PivotCharts.
Lead-in
Excel 2000 creates
PivotChart reports that are
fully interactive and
integrated with PivotTable
reports.
In Excel versions before Excel 2000, it was possible to create charts based on
Delivery Tips the data in a PivotTable. However, such charts were not entirely integrated with
Continue with the informal
demonstration showing
PivotTables—for example, the chart would not update properly to synchronize
students how to create a with changes in the PivotTable layout.
PivotChart.
Excel 2000 creates Microsoft PivotChart® reports that are fully interactive and
Encourage students to
integrated with PivotTable reports. A PivotChart is always linked to a
follow along with your PivotTable. For example:
informal demonstration on
! Changing a PivotTable report automatically updates a PivotChart.
their computers.
! Manipulating buttons on a PivotChart changes the layout of the PivotTable
In the lab that follows, report.
students will create
PivotCharts on their own. Because of this linkage, there is no way, for example, to create a chart that
shows dates as the X-axis labels if that chart is based on a PivotTable that
shows dates as column headings. Moving the dates to the X-axis of the chart
will move dates to the row axis of the PivotTable report.
If you want the layout of a PivotTable report to be independent of a PivotChart
report, you must copy the PivotTable report before creating the PivotChart.
Creating a PivotChart
There are two methods for creating a PivotChart:
! When creating a new PivotTable, at the first step of the PivotTable wizard,
click the PivotChart option.
! After you create a PivotTable, right-click any cell in the table, and then click
PivotChart.
Charting Characteristics
PivotCharts are similar to normal Excel charts in many respects, but they have
special characteristics:
! Dragging the dimension buttons can manipulate the chart and underlying
table. These buttons provide functionality similar to the PivotTable
counterparts.
! When the layout of the PivotTable is changed, the chart responds to the
change, and vice versa.
Note Changing the chart type entails the same techniques as with normal Excel
charts, and is outside the scope of this course. For more information, refer to the
Microsoft Excel Help.
In this demonstration, you will learn how to create a PivotTable that connects to
Delivery Tips OLAP cubes.
The steps for this
demonstration are included
in the Instructor Notes.
If you performed an
extensive demonstration
throughout your lecture, and
covered all topics found in
this demonstration, you may
want to skip this
demonstration, and have
students perform lab A now.
Objectives
Explain the lab objectives.
After completing this lab, you will be able to:
! Create a PivotTable.
! Create a PivotChart.
Exercise 1
Creating a PivotTable
In this exercise, you will create and manipulate a PivotTable by using the
Module 13 database.
6. Drag the State dimension button to the page axis of the PivotTable report,
which is cell A1 of the worksheet.
You can choose whether to display a dimension button on the page axis. If
you do not include a dimension on a PivotTable report, it behaves as if it
were on the page axis with the default member selected.
Tip Be sure that you drag the Employee dimension and not the Employee
Count measure.
Exercise 2
Creating a PivotChart
In this exercise, you will create and manipulate a PivotChart starting from the
PivotTable you created in Exercise 1.
! To create a PivotChart
1. Right-click any cell in the PivotTable, and then click PivotChart.
A new worksheet appears, containing a chart with product category labels
across the bottom, countries listed in the legend, and a Time button above
the chart. These are interactive PivotChart controls.
2. Click the drop-down arrow adjacent to the Time button.
3. Expand the tree, click Quarter 1 under 2001, and then click OK.
You use the PivotChart buttons just as you use the PivotTable report
buttons.
4. Click the Category button, and then on the PivotTable toolbar, click Show
Detail.
The chart changes to show columns for only the subcategories. The
PivotChart is intelligent enough not to show totals from the report; it
displays the Category labels under the appropriate Subcategory labels.
5. Click Country, and then click Show Detail.
6. Click Region, and then click Show Detail again.
Once again, the PivotChart shows the appropriate detail, by using the parent
levels of the hierarchy only as part of the labels.
7. On the PivotTable toolbar, click the PivotChart menu, and click Hide
PivotChart Field Buttons.
This removes the buttons, making the chart suitable for printing or for
displaying in a meeting.
8. Switch back to the PivotTable, and notice the changes made to the report
layout.
When you manipulate PivotCharts, the source PivotTables reflect the
changes.
9. Leave the workbook open to create local cubes in the next lab.
Office 2000 includes all the necessary components to create and use cubes
offline—that is, a structurally complete OLAP cube that resides on client
computers. Such offline cubes are called local cubes.
A local cube functions in much the same way as a server-based cube. It contains
dimensions complete with hierarchies, and it contains measures. You typically
store much less data in a local cube than in a server-based cube, and a local
cube does not include many of the capabilities of a server-based cube. For
example, a local cube does not include aggregations, member properties, shared
dimensions, virtual dimensions, virtual cubes, partitions, or write-back tables.
Any client application that can interact with a server-based cube can also
interact with a local cube, because the client application communicates with
PTS, and PTS can communicate either with the Analysis Server or with a local
cube. PTS is also the component that creates local cubes.
Office 2000 includes two different approaches for creating a local cube. With
either approach, PTS creates the local cube, but the steps to create the local
cube are different in each case.
One option for creating local cubes is to connect to an Analysis Server by using
an Excel PivotTable report, and then use the PivotTable report to create a local
cube that is a subset of the server-based cube. The other option is to use
Microsoft Query to define a local cube.
You can create a local cube from either an OLAP source or a relational
Delivery Tips database source.
Continue with the informal
demonstration showing
students how to create a Creating a Local Cube from an OLAP Source
local cube from a By using Excel 2000, you can create a local cube that uses an OLAP cube as its
PivotTable.
source. To create a local cube from an OLAP source, perform the following
Encourage students to
steps:
follow along with your 1. Create a PivotTable based off an OLAP cube.
informal demonstration on
their computers. 2. From the PivotTable toolbar, click the PivotTable menu, and then click
Client-Server Settings.
The PivotTable toolbar is the only place in Excel 2000 where the Client-
Server Settings command is located.
3. Click Create local data file.
4. Step through the Create Cube File Wizard, and specify the dimensions,
levels, and top-level members included in the local cube.
5. Name and save the local cube file.
Note You can also create a local cube from an OLAP source
programmatically.
Office 2000 makes it easy to create Web pages from Office documents. Excel
Delivery Tips 2000 facilitates the creation of OLAP Web pages that use the Office Pivot
Continue with the informal
demonstration, showing
component.
students how to create a The PivotTable converts to an ActiveX Web component. This page is viewable
Web page from a
by any user, though a license for Office 2000 is required even if Office 2000 is
PivotTable.
not installed on the computer.
Encourage students to
follow along with your Saving PivotTables as Web Pages
informal demonstration on
You create Web pages from existing PivotTable reports that access an Analysis
their computers.
Server cube or a local cube as the data source.
To create a Web page from an existing PivotTable report, perform the following
steps:
1. From the File menu in your PivotTable worksheet, click Save as Web
Page.
2. In the Save pane, click Selection:Sheet, and then select the Add
interactivity check box.
3. Click Publish, click PivotTable in the Item to publish list, select the Add
interactivity with check box, and then click PivotTable functionality in
the Viewing options pane.
4. Define the Web page name and file location in the File name box.
5. Select the Open published web page in browser check box, and then click
Publish.
The default browser opens and includes the Pivot Web component. From
here, you manipulate the Pivot Web component and interact with
dimensions, levels, and measures.
Microsoft calls the Pivot Web component a PivotList. PivotLists are similar in
many respects to Excel PivotTables.
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
Module 13: Using Excel as an OLAP Client 25
Prerequisites
! To complete this lab, you must first complete lab A, Creating PivotTables
and PivotCharts, found earlier in the module.
Exercise 1
Creating a Local Cube
In this exercise, you will create and manipulate a local cube by using the
Module 13 database.
Note The list of dimensions includes all dimensions in the source cube,
regardless of whether all the dimensions exist in the PivotTable.
7. At step 3 of the wizard, select the CEO check box, and then expand each of
the levels to determine the members that are included in the local cube.
Here you specify which members from the top level of each dimension will
be included in the cube. You do this by selecting the members in the top
levels you previously selected.
8. Click Next.
9. At step 4 of the wizard, save the Sales.cub cube file in
C:\Moc\2074A\Labfiles\L13, and then click Finish.
10. Click OK, and realize that your PivotTable connects to the Sales.cub local
cube file that you created.
11. Open Microsoft Windows® Explorer, and find the Sales.cub cube file in
C:\Moc\2074A\Labfiles\L13.
The file contains all data and structures necessary to connect to the local
cube.
12. Close Windows Explorer, and leave the Excel workbook open for the
following exercise.
Exercise 2
Creating a Web Page from a PivotTable
In this exercise, you will create a Web page from a PivotTable by using the
Module 13 database.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Office 2000 OLAP Components
Lead-in ! Using Excel PivotTables
The review questions cover
some of the key concepts ! Using PivotCharts
taught in the module.
! Working with Local Cubes
! Creating OLAP-Enabled Web Pages
1. When you define an OLAP data source for a PivotTable, is the definition
located on the Analysis Server or the client computer?
The definition is located on the client computer.
5. To browse a Web page that includes a PivotList, must the user have Office
2000 installed?
No. However, the user must have a valid Office 2000 license.
Overview 1
Creating Actions 2
Performing Drillthrough 16
Understanding Writeback 22
Review 27
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, your 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.
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.
Instructor Notes
Presentation: This module introduces three analysis features of Microsoft® SQL Server™
60 Minutes 2000 Analysis Services—actions, drillthrough, and writeback. All three of the
features add layers of analysis to online analytical processing (OLAP)
Lab: applications.
00 Minutes
In this module, students create an action that opens a Web page. Students learn
how to enable drillthrough to explore the underlying detailed data of a cell. In
addition, students learn the importance of writeback and how to implement
cube writeback.
After completing this module, students will be able to:
! Create and view actions.
! Implement and test drillthrough.
! Understand the applications for cube writeback.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_14.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read the instructor notes and margin notes.
! Complete all the demonstrations.
! Practice the lecture presentation and demonstration.
! 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.
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 the module but are not specifically addressed in the
content of the student notes.
1. Are actions, drillthrough, and writeback supported in Microsoft Excel 2000?
You have no built-in support for these features. To implement these
features in Excel 2000 you must write custom Microsoft Visual Basic®
for Applications code.
2. Is it possible for a custom application to support actions, drillthrough, and
writeback?
Yes. These features are exposed in the client object model.
3. Why would an action target a dimension object or level object instead of the
members of the dimension or level?
An action that targets a dimension object or a level object can be used
to display cube metadata. For example, you can display the date and
time of the most recent dimension process.
4. When you create a Data Set type action, why are you unable to test the
action in the Cube Browser?
The Cube Browser in Analysis Manager does not support Data Set
actions.
5. How do you implement what-if analysis in Analysis Services?
You can implement what-if analysis in Analysis Services by using cube
writeback to store temporary cube values in memory. This allows a
user, given a what-if-enabled application, to change cell values. The
changes are temporary—the cube values do not persist in the cube and
other users do not see the values until they are stored permanently in
the cube.
Module Strategy
Use the following strategy to present this module:
! Creating Actions
Teach students that an information system ultimately has no value unless the
information causes decisions to be made, or is otherwise acted on. The
action feature permits different types of actions to be designed into a cube,
and subsequently executed by users. Demonstrate how to create and test
actions.
! Performing Drillthrough
Teach students that the purpose of drillthrough is to provide users with an
added level of detailed data coming from the data warehouse. Show how to
implement and test drillthrough.
! Understanding Writeback
Teach students that when writeback is enabled for a given cube, cube cells
can be written to from a client application. Demonstrate that this is a key
feature for financial planning applications, such as budgeting and
forecasting. Teach the applications for cube writeback and implement cube
writeback.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Creating Actions
Lead-in ! Performing Drillthrough
In this module, you will learn
about three features in ! Understanding Writeback
Microsoft SQL Server 2000
Analysis Services—actions,
drillthrough, and writeback.
# Creating Actions
Topic Objective
To introduce the concept of
actions.
Lead-in ! Defining Actions
By building actions into a ! Selecting the Action Target
cube, users can act on the
information they are ! Choosing the Action Type
viewing.
! Defining the Action Syntax
! Creating Actions in Virtual Cubes
Defining Actions
Topic Objective
! Describing Actions
To define actions and show
when and how to create $ Are user-initiated operations related to cube objects
actions.
$ Pass cube objects as parameters to client or external applications
Lead-in
An action is a user-initiated $ Are defined on the Analysis Server
operation related to an $ Must be supported by client application
object in a cube.
! Examining Action Examples
$ View customer Web sites
$ Purchase a stock
$ Generate a related report
! Creating a New Action
$ Use the Action Wizard within Analysis Manager
Actions can be designed into a cube and executed by users. By using actions,
users can act on the information that they are viewing.
Describing Actions
The following are characteristics of actions:
! An action is a user-initiated operation related to an object in a cube.
! A selected object, such as a member or a cell, serves as a parameter used by
an action to initiate a specific operation defined in the action definition.
! Actions are defined on the Analysis Server, but are executed on the client
computer. An action can be acted on by a client application or an external
application, such as a Web browser.
! In order for a user to use actions, the client application, whether a third-
party OLAP client or a custom application, must support actions.
The target of an action is the portion of the cube to which the action relates. The
Delivery Tip target is the object that launches the action. The first step of the Action Wizard
Start the Action Wizard and,
with the wizard displayed,
prompts you to specify the target. Several types of targets that you can specify
select each of these options are described below.
as you discuss them. Point
out the interface elements This Cube
for each target type.
When you click This cube as the target, the action relates to the entire cube.
When you select this option, no further inputs are required to define the target.
In the client application, the action will be available for all cube objects—every
member, every cell, every dimension, and every level.
Note For more information on named sets, refer to SQL Server Books Online.
After you define the target, you specify the type of action you are defining.
Delivery Tip There are several different types of actions. The Action Wizard prompts for the
With the wizard displayed, action type, and displays sample syntax.
select each of these options
as you discuss them.
Command Line
A Command Line action executes an MS-DOS® command prompt. For
example, you can use the path C:\Winnt\Notepad.exe to start the Notepad
application in Microsoft Windows NT® 4.0 or Microsoft Windows® 2000.
HTML
An HTML action executes a Hypertext Markup Language (HTML) script in
client Web browsers. For example, you can create an action that displays
member properties in client Web browsers. A pre-existing Web page is not
needed. The entire page can be defined in the action.
URL
A uniform resource locator (URL) action displays a Web page in client Web
browsers. For example, suppose your cube contains a Customer dimension.
You can define an action that displays the Web site of a customer in users’ Web
browsers.
Data Set
A Data Set action executes a multidimensional expression (MDX) statement
that returns a multidimensional cell set. The Cube Browser does not support the
Data Set action type.
Rowset
A Rowset action executes an MDX or SQL statement that returns a tabular
rowset. For example, a Rowset action can execute an MDX query by using the
target object as a parameter.
The next step in creating an action is to define the action syntax. You construct
Delivery Tip the action syntax by using MDX. You reference the selected cube object
Demonstrate a Command
Line action by entering
dynamically with the MDX syntax. In this way, the action applies to the
explorer c:\ as the action selected cube object.
syntax. When executed, the
You enter the MDX directly into the Syntax box in the Action Wizard, or you
action displays the contents
of the c: drive in Windows
click MDX Builder to display the MDX Builder dialog box.
Explorer. Action syntax must adhere to the following guidelines:
! You enclose constant text in double quotes.
! You use the MDX CurrentMember function and other cube object
functions to provide cube object context sensitivity.
! You concatenate MDX functions with constant text by using the + sign.
The above rules apply to all types of actions regardless of the action type—
URL, HTML, and so on. Beyond these basic guidelines, each type of action
uses its own syntax based on its syntax requirements.
URL Example
Suppose a cube contains a Customer dimension. The members of the
Customer dimension are associated with a member property named
HomePage, which contains the URL for each customer’s home page. The
URLs do not include the “http://www.” prefix.
The following is a URL action that displays the home page for the current
member of the Customer dimension:
“http://www.” +
[Customer].[CurrentMember].Properties(“HomePage”)
! To select target
1. In the Target box, click A level in this cube.
2. In the Dimension box, click Store.
3. In the Levels box, click Store Name.
4. Click Members of the selected level, and then click Next.
Note When you define or edit an action, the cube must be saved for your
changes to take effect.
You have the ability to create actions in virtual cubes. To do so, perform one of
the following steps:
! Create a new action by using the same method that you use to create an
action in a regular cube.
! Import an existing action from in a regular cube into a virtual cube.
Note For more information on virtual cubes, see Module 12, "Working with
Virtual Cubes," in course 2074A Designing and Implementing OLAP Solutions
with Microsoft SQL Server 2000.
# Performing Drillthrough
Topic Objective
To introduce the concept of
drillthrough.
Lead-in ! Understanding Drillthrough Basics
Drillthrough is a mechanism ! Implementing Drillthrough
for providing an extra level
of detail data from the data
warehouse.
Users often require access to detailed data that is not contained in the OLAP
cube. Drillthrough is a mechanism for providing an extra level of detailed data
from the data warehouse.
Implementing Drillthrough
Topic Objective
To explain how to enable
drillthrough.
Lead-in ! Specifying Columns
You enable drillthrough in ! Specifying Additional Source Tables
the Cube Drillthrough
Options dialog box in the ! Adding a Filter
Cube Editor.
You enable drillthrough in the Cube Drillthrough Options dialog box in the
Cube Editor. To display the Cube Drillthrough Options dialog box, perform
Delivery Tip the following steps:
Display the Cube
Drillthrough Options 1. Open the Cube Editor.
dialog box as you discuss
the interface elements. 2. On the Tools menu, click Drillthrough Options.
Specifying Columns
To include a column in the drillthrough result set, select the check box for that
column. Click Select all to select all the columns, or Deselect all to deselect all
the columns.
Adding a Filter
The filter is a WHERE clause for the drillthrough SQL statement. To define a
filter, click the Filter tab on the Cube Drillthrough Options dialog box. Do
not type the WHERE keyword—type only the text that follows the WHERE
keyword.
If your drillthrough includes a table other than the fact table or a dimension
table, you must specify a filter. A filter creates a join to the added table.
The SQL WHERE clause, created by the filter expression, is a pass-through
expression. The Cube Drillthrough Options dialog box does not validate the
expression; the expression is not validated until the drillthrough executes. If the
expression contains a syntax error, you do not see an error message until you
attempt to perform the drillthrough.
Note After you define drillthrough for a cube, you must also set permissions
enabling users to execute drillthrough. For more information, see Module 15,
"Implementing Security," in course 2074A, Designing and Implementing OLAP
Solutions with Microsoft SQL Server 2000.
This demonstration shows how to enable drillthrough for the Warehouse cube
Delivery Tip by using the FoodMart 2000 database.
Encourage students to
follow along with your ! To display the Cube Drillthrough Options dialog box
demonstration on their
computers.
1. In Analysis Manager, expand the FoodMart 2000 database, and then open
the Cube Editor for the Warehouse cube.
2. Click the Tools menu, and then click Drillthrough Options.
! To select columns
1. In the Cube Drillthrough Options dialog box, select the Enable
drillthrough check box.
2. Select the “units_shipped” column check box in the
“inventory_fact_1997” table.
3. Select the “store_street_address” column check box in the “store” table.
4. Select the “store_city” column check box in the “store” table, and then
click OK.
5. Click OK when the Drillthrough Settings dialog box appears.
! To test drillthrough
1. In the Cube Editor, save the Warehouse cube.
Note When you enable drillthrough or edit drillthrough settings, you must
save the cube for your changes to take effect.
# Understanding Writeback
Topic Objective
To introduce the concept of
writeback.
Lead-in ! Writeback Architecture
Some applications demand ! Writeback Server Mechanics
a flexible data model and
the ability to view and enter
data from different
perspectives at different
levels of detail.
Writeback Architecture
Topic Objective
To introduce writeback
architectural components.
! Cube Cells Are Not Modified
Lead-in
When you enable a cube for $ Writeback data is stored in an incremental change table
writeback, a new table is
automatically created in the $ Writeback is transparent to users
same database that
contains the fact table. This ! Cubes Do Not Require Reprocessing
table is referred to as the $ When a query executes, cell values are adjusted at
writeback table. query time by using the writeback table
! Writeback Table Can Be Merged into the Cube
$ Converting the writeback table requires SQL Server
2000 Enterprise Edition
When you enable a cube for writeback, a new table is automatically created in
Delivery Tip the same database that contains the fact table. This table is referred to as the
Explain that performing writeback table.
writeback requires a client
application that is writeback- When users perform writeback, the users update the writeback table, and not the
enabled. Neither Excel 2000 actual cube cells. The updated data appends to the writeback table without users
nor the Cube Browser is realizing it—writeback is transparent to users.
enabled for writeback. For
Only incremental changes are recorded in the writeback table. For example, if a
this reason, this module
teaches students how to cell contains the number 100, and you writeback the number 105, the writeback
enable writeback on the table stores a +5 value for that cell.
server. However, students Cubes do not require reprocessing to view updated cells when you enable a
will not actually perform a cube for writeback. Incremental changes stored in the writeback table are
writeback operation. applied to query results at run time, as queries are executed. When a user
executes a query, cell values are adjusted at query time.
Writeback data can be merged into the cube, eliminating the incremental
change table. You merge the writeback table into a cube by converting the table
to a cube partition. Converting the writeback table to a partition is available
only if you use Analysis Services for SQL Server 2000 Enterprise Edition.
By default, users cannot write back cubes. You enable writeback for a cube in
Analysis Manager.
Note After a cube is enabled for writeback, you must grant users permission to
writeback cube data. For more information about security and permissions, see
Module 15, "Implementing Security," in course 2074A Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000.
Tip Because writeback data is stored in a relational table, you can use any
table-browsing tool to view the writeback data.
Note To convert writeback data to a partition, you must use SQL Server 2000
Enterprise Edition. For more information on partitions, see Module 10,
"Managing Partitions," in course 2074A Designing and Implementing OLAP
Solutions with Microsoft SQL Server 2000.
Disabling Writeback
Disabling writeback automatically removes writeback permissions and deletes
the writeback table. In some applications, disabling writeback is a standard
procedure, because the writeback data is used only as temporary cube values.
For example, a common objective of a budgeting application is the budget
report. The cube administrator deletes all budgeting inputs after printing and
distributing the final report.
To disable writeback, perform the following steps:
1. Right-click a cube, and then click Writeback Options.
2. Click Disable Writeback. Click Yes when the confirming dialog box
displays.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Creating Actions
Lead-in ! Performing Drillthrough
The review questions cover
some of the key concepts ! Understanding Writeback
taught in the module.
2. Is it possible to drill through to a data source other than the source database
for the cube?
No.
4. You implement drillthrough for a cube. Your users use a client application
that is enabled for drillthrough, yet they are unable to perform drillthrough.
What is the likely cause?
Users must be given drillthrough permission.
Contents
Overview 1
Introducing Analysis Services Security 2
Understanding Administrator Security 3
Securing User Authentication 5
Understanding Database Roles 6
Implementing Dimension Security 13
Managing Cube Roles 17
Lab A: Implementing Cube Security 27
Review 32
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, your 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.
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.
Instructor Notes
Presentation: In this module, students will gather the skills necessary to implement security in
60 Minutes Microsoft® SQL Server™ 2000 Analysis Services. Students will learn the
concepts and mechanics of administrative permissions, database roles, and cube
Lab: roles. In the lab, students create and test a role that uses dimension and cell
30 Minutes security.
After completing this module, students will be able to:
! Understand the use of security in Analysis Services.
! Explain administrator security.
! Describe authentication methods.
! Assign database roles.
! Apply dimension security.
! Manage cube roles.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_15.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read the instructor notes and margin notes.
! Complete all the demonstrations.
! Practice the lecture presentation and demonstration.
! Complete the lab.
! 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.
Module Strategy
Use the following strategy to present this module:
! Introducing Analysis Services Security
Explain that Analysis Services allows security to be defined at different
levels in online analytical processing (OLAP) databases and cubes—from
the server level down to the cell level.
! Understanding Administrator Security
Explain that to administer Analysis Services, you must be a member of the
Microsoft Windows® 2000 or Microsoft Windows NT® OLAP
Administrators group.
! Securing User Authentication
Introduce ways to connect to Analysis Server. Explain that user security is
controlled by authentication.
! Understanding Database Roles
Introduce roles by defining what they are and by giving some key
parameters. Introduce the Database Role Manager dialog box and describe
its use. Show how to define, delete, edit, and copy a new role. Define
database role properties and introduce the Create a Database Role dialog
box and how it allows you to define properties of a role. Display the dialog
box as you discuss the user interface elements.
! Implementing Dimension Security
Introduce dimension security. Explain that, with dimension security, you
can prevent users from viewing specified dimension members, and data
associated with those members. Show how dimension security is defined by
using the Custom Dimension Security dialog box. Display the dialog box
as you discuss the user interface elements.
! Managing Cube Roles
Introduce the Cube Role Manager, explain dimension and cell security,
describe advanced cell security permissions, and introduce administration
and custom options.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Introducing Analysis Services Security
Lead-in ! Understanding Administrator Security
In this module, you will learn
about Analysis Services ! Securing User Authentication
security.
! Understanding Database Roles
! Implementing Dimension Security
! Managing Cube Roles
Important Database security can be applied in Analysis Services only when the
Analysis Server is installed on an NTFS file system. Therefore, it is
recommended that Analysis Services always be installed on an NTFS partition.
Note Administrators maintain write access to only those cubes that are
write-enabled.
To give users access to Analysis Services databases and cubes, you must first
create roles to assign the access. To effectively manage roles, you need to
understand the use of roles in Analysis Services, and how to create roles by
using Analysis Manager.
In the next section, you will learn about the following security topics relating to
roles:
! Defining roles.
! Using the Database Role Manager.
! Defining database role properties.
Defining Roles
Topic Objective
To define Analysis Services
roles.
! Are Used to Grant Access to Analysis Services
Lead-in Databases and Cubes
You create roles to define
the access of users to cube ! Must Be Created—None Exist By Default
data or data mining models
while they connect to ! Cannot Be Shared Across Multiple Databases
Analysis Server through
client applications. ! Are Automatically Created at the Database Level if You
Create Roles at the Cube Level
! Are Managed in the Database Role Manager and the
Cube Role Manager
You create roles to define the access of users to cube data or data mining
models while they connect to Analysis Server through client applications. Each
role includes a list of user accounts and groups, and defines the access
permissions that these users share.
The following are key parameters regarding roles:
! You define roles for Analysis Services databases and for the cubes in the
databases.
! By default, OLAP databases and cubes have no roles. When no roles are
defined, only OLAP Administrators have access to the cubes.
! You cannot share roles across multiple databases.
! When you create a cube role, a database role of the same name is
automatically created.
• When you delete a cube role, the database role of the same name is not
deleted.
• Some properties of a database role are overridden by the corresponding
cube or virtual cube roles without changing the properties of the
database role.
Note Database roles cannot be overridden for a data mining model. For
more information on data mining, see Module 17, “Introduction to Data
Mining,” in course 2074A, Designing and Implementing OLAP Solutions
with Microsoft SQL Server 2000.
! There are two user interfaces for defining and managing roles—the
Database Role Manager dialog box and the Cube Role Manager dialog
box.
To display the Database Role Manager for a database, right-click the
database, and then click Manage Roles. To display the Cube Role
Manager for a cube, right-click the cube, and then click Manage Roles.
BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY
8 Module 15: Implementing Security
You use the Database Role Manager dialog box to define and administer roles
Delivery Tip for databases. Roles can be assigned to cubes, including virtual and linked
Display the Database Role
Manager dialog box as you
cubes, and data mining models.
discuss the user interface
elements. Defining a Role
To define a new role for a database, perform the following steps:
1. Right-click the database, and then click Manage Roles.
2. Click New in the Database Role Manager dialog box.
3. Define the role properties by using the Create a Database Role dialog box
that is discussed later in this section.
Deleting a Role
To delete a role in a database, perform the following steps:
1. Right-click the database, and then click Manage Roles.
2. In the Database Role Manager dialog box, click the role you want to
delete.
3. Click Delete.
Editing a Role
To edit a role in a database, perform the following steps:
1. In the Database Role Manager dialog box, click the role you want to edit.
2. Click Edit.
Copying a Role
To copy a role in a database, perform the following steps:
1. In the Database Role Manager dialog box, click the role you want to copy.
2. Click Duplicate.
3. Enter a name for the new role, and then click OK.
The Create a Database Role dialog box allows you to define the following
Delivery Tip properties of a role:
Display the Create a
Database Role dialog box ! The users and user groups that belong to the role
as you discuss the user
interface elements. ! The cubes to which the role is assigned
! The data mining models to which the role is assigned
! The shared dimensions for which you want to restrict user access
The Create a Database Role dialog box contains interface elements similar to
the Create a Cube Role dialog box. Both interfaces are straightforward to use
when defining database and cube security.
Role Name
The role name can be up to 50 characters long. After a role is defined, the role
name cannot be changed.
Enforce On
Roles can be enforced on either the client or the server. By default, roles are
enforced on the client. Client enforcement provides superior performance, but
increases the risk of unauthorized access. Server enforcement is more secure,
but may affect performance.
Note Cell security, discussed later, requires that security be enforced on the
client.
Membership
On the Membership tab, you specify which users or user groups belong to the
role. Users and user groups must be predefined by using Windows 2000 or
Windows NT 4.0 user administration.
Cubes
On the Cubes tab, you specify the cubes to which the role is assigned. A role
can be assigned to any type of cube—regular, virtual, or linked. After a role is
assigned to a cube, some properties of the role can be customized for the cube
without changing the database role.
Mining Models
On the Mining Models tab, you specify the data mining models to which the
role is assigned.
Dimensions
The Dimensions tab allows you to restrict access to dimension members. Only
shared dimensions display on this tab. To restrict access to a private dimension,
you must use the Cube Role Manager dialog box.
Advanced Tab
For complex dimension security, the Advanced tab allows you to enter
multidimensional expression (MDX) statements that define the dimension
members viewable by users assigned to the role.
On the Advanced tab:
! Data inputs from the Basic tab are represented as MDX statements. You can
edit the MDX statements directly in the edit boxes, or you can click the
ellipsis buttons (…) to display the MDX Builder dialog box.
! Separate MDX statements define the top viewable level, the bottom
viewable level, the visible members, and the invisible members.
Common Tab
The Common tab lists two important features:
! Visual Totals
When you enabled this property, members that are hidden because of
dimension security are not included in aggregations.
When you do not enable the Visual Totals property, a parent member value
may not equal the value of its visible children. In addition, when visual
totals are disabled, users may be able to deduce the values for hidden
members. When you hide dimension members, you normally enable the
Visual Totals property to prevent these problems from occurring.
Note Visual totals cannot be enabled for a cube containing a measure based
on a distinct count. For more information on distinct count measures, see
Module 6, “Working with Cubes and Measures,” in course 2074A,
Designing and Implementing OLAP Solutions with Microsoft SQL Server
2000.
! Default Member
For users assigned to the role, this property—an MDX statement—specifies
the default member for the defined dimension. The MDX statement can be a
simple member name, or a complex expression that evaluates the member
name dynamically.
In this demonstration, you learn how to add a new role to the FoodMart 2000
Delivery Tip database.
Encourage students to
follow along with your
demonstration. ! To display the Create a Database Role dialog box
1. In Analysis Manager, right-click the FoodMart 2000 database, and then
click Manage Roles.
2. In the Database Role Manager dialog box, click New.
This section introduces how to manage cube roles by using the Cube Role
Manager. The section also explains dimension and cell security, advanced cell
security permissions, and the administration of custom options.
A cube role defines access permissions for cubes, including virtual cubes and
Delivery Tips linked cubes. To create and maintain cube roles, use the Cube Role Manager
Display the appropriate dialog box.
interface of the Cube Role
Manager dialog box as you To display the Cube Role Manager dialog box, perform the following steps:
discuss this section and the
following slides pertaining to 1. Expand the database, and then expand the Cubes folder.
cube role management. 2. Right-click the cube, and then click Manage Roles.
As necessary, switch
between the slides and the The Cube Role Manager Dialog Box
Cube Role Manager The Cube Role Manager dialog box is similar to the Database Role Manager
interfaces.
dialog box. However, there are a few differences:
! The leftmost column on the dialog box contains check boxes. Only the
selected roles are assigned to the cube.
Key Point ! The Cube Role Manager allows you to define cell security.
A cube role defines access ! The Cube Role Manager allows you to define drillthrough, cube linking,
permissions for cubes, and SQL query permissions.
including virtual cubes and
linked cubes.
Note For more information about drillthrough, see Module 14, “Using
Actions, Drillthrough, and Writeback,” in course 2074A, Designing and
Implementing OLAP Solutions with Microsoft SQL Server 2000.
! The Cube Role Manager allows you to establish security for both private
and shared dimensions, whereas the Database Role Manager lists only
shared dimensions.
To edit a cube role in the Cube Role Manager, perform the following steps:
1. In the Cube Role Manager dialog box, click the appropriate role.
2. Click Edit.
To copy a cube role in the Cube Role Manager, perform the following steps:
1. In the Cube Role Manager dialog box, click the role you want to copy.
2. Click Duplicate.
3. Enter a name for the new role, and then click OK.
To test a cube role the Cube Role Manager, perform the following steps:
1. In the Cube Role Manager dialog box, click the role you want to test.
2. Click Test Role.
The Cube Browser dialog box appears, showing what an assigned user sees
in the cube.
To delete a cube role in the Cube Role Manager, perform the following step:
• In the Cube Role Manager dialog box, deselect the check box of the role.
You assign detailed access to a cube by applying dimension and cell level
security in the Create a Cube Role dialog box. The Create a Cube Role
dialog box is a superset of the Create a Database Role dialog box. Discussed
below are the elements that are unique to cube roles.
Cell Security
Cell security is the most detailed level of security—you use cell security to
restrict access to cell values. Define cell level security on the Cells tab in the
Create a Cube Role dialog box.
To define cell security, you must first specify the cell security policy. The cell
security policy designates the overriding policy for the cube and is set to one of
the following three options:
! Unrestricted Read. Users belonging to the role can view all cells. This is the
default policy.
! Unrestricted Read/Write. Users belonging to this role can view and update
all cell values. This option is only available if the cube, or underlying base
cubes for a virtual cube, is write-enabled.
! Advanced. The role can view only those cells specified by the advanced cell
security described in the next section.
If you select the Advanced policy for cell security, you can define three types of
permissions for cells, each of which has three types of rules that can be applied.
The three types of advanced permissions are Read Permission, Read Contingent
Permission, and Read/Write Permission.
In each of these permissions, the three types of rules that can be applied are
Unrestricted, Fully Restricted, and Custom.
Read Permission
Read permission determines the cells that are viewable to users of the role. The
cells specified with this permission are viewable regardless of whether they are
derived from other cells that are not viewable. The read permission choices are:
! Unrestricted. Users belonging to the role can view all cells. This is the
default read permission choice.
! Fully Restricted. The users belonging to this role can view only those cells
specified by read contingent or read/write permissions described below.
! Custom. The users belonging to this role can view only those cells specified
by an MDX statement.
Note If the Advanced Cell Security Rule for the Read Contingent or
Read/Write Permission is Unrestricted and you create a Custom Rule for the
Read Permission, the setting for Read Contingent and Read/Write is changed
automatically to Fully Restricted on saving the role.
Read/Write Permission
Read/write permission determines the cells that users can update by using the
writeback capability of Analysis Services. The cube must be write-enabled for
this setting to take effect.
Read/write permission overrides read permission—that is, if a user is granted
read/write permission, that user is able to view the cell even if read permission
is denied.
The read/write permission choices are:
! Unrestricted. Users belonging to the role can update all cells.
! Fully Restricted. Users belonging to the role cannot update any cells but can
read cells as specified by Read or Read Contingent permissions.
! Custom. An MDX expression defines the cells that can be both read and
updated.
Note For more information on writeback, see Module 14, “Using Actions,
Drillthrough, and Writeback,” in course 2074A, Designing and Implementing
OLAP Solutions with Microsoft SQL Server 2000.
The following items concern the administration of custom settings and special
cube security options.
Alternatively, you can specify the members that are not available for access.
For example, if you want to grant access to all measures except Unit Sales, you
can use the following expression:
[Measures].CurrentMember.Name <> “Unit Sales”
In this demonstration, you will learn how to define a new role for the HR cube
Delivery Tip in the FoodMart 2000 database. The members of this role will be denied access
Encourage students to
follow this demonstration on
to:
their own computers. ! The Senior Management member of the Position dimension by using
dimension security.
! The Employee Salary measure for the Middle Management member of
the Position dimension by using cell security.
The MDX expression gives users the ability to view all non-Middle
Management Position dimension members for all measures, and the ability
to view Middle Management members for all measures except for
Employee Salary.
7. Click Check to validate the MDX syntax, and then click OK.
Scenario
In exercise 1, you will implement dimension security. The role you define will
prevent users from viewing members of the Promotions dimension, except for
the All Promotions member. The same role will restrict the Store dimension so
that users can view only USA and its descendants. Finally, you will prevent
users from viewing the Store Cost measure.
In exercise 2, you will modify the role you created in exercise 1. Rather than
completely denying users access to Canada and Mexico, you will prevent them
from seeing the Store Cost measure for stores outside USA. You will perform
this by defining cell security for the cube.
Exercise 1
Building Dimension Security
In this exercise, you will implement dimension security for the FoodMart 2000
Sales cube.
Exercise 2
Building Cell Security
In the previous exercise, you prevented USA users from seeing Canada and
Mexico data. Suppose, however, that rather than completely denying these
users access to Canada and Mexico, that you simply want to prevent them
from viewing a specific measure, Store Cost, for Canada and Mexico. You
can define cell security rather than dimension security for the Store dimension.
The MDX statement gives users the ability to see USA stores for all
measures, and stores that are not in the USA, but not for the Store Cost
measure.
8. Click Check to validate the MDX syntax, and then click OK.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Introducing Analysis Services Security
Lead-in ! Understanding Administrator Security
The review questions cover
some of the key concepts ! Securing User Authentication
taught in the module.
! Understanding Database Roles
! Implementing Dimension Security
! Managing Cube Roles
3. You create a cube role restricting access to a dimension member. You test
the role by using the Test Role feature, and the role works correctly.
However, when you access the cube from a client application, the restricted
member displays. What is a likely cause?
The user is probably a member of the OLAP Administrators group.
Administrator status overrides security defined by a role.
Contents
Overview 1
Introducing DTS 2
Executing and Scheduling Packages 10
The Analysis Services Processing Task 12
Lab A: Creating a Package 16
Copying and Archiving OLAP Databases 19
Review 24
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, your 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.
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.
Instructor Notes
Presentation: Automating cube processing, copying server objects, and moving databases
45 Minutes from testing to production environments are important steps that come at the
end of an online analytical processing (OLAP) application’s deployment phase.
Lab: In this module, students learn the mechanics and techniques for these essential
15 Minutes processes.
After completing this module, students will be able to:
! Describe the role of Data Transformation Services (DTS).
! Create a DTS package.
! Define an Analysis Services processing task.
! Copy, archive, and restore OLAP databases.
Required Materials
To teach this module, you need the following materials:
! Microsoft® PowerPoint® file 2074A_16.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials.
! Read the instructor notes and margin notes.
! Complete all the demonstrations.
! Practice the lecture presentation and demonstration.
! Complete the lab.
! 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.
Important The order in which you select the two tasks is critical to setting
up the precedence constraints properly.
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 the module but are not specifically addressed in the
content of the student notes.
1. What does the Local server check box in the Analysis Services Processing
Task dialog box do?
If you select the Local server check box in the Analysis Services
Processing Task, the local server name is not attached to the package.
Therefore, you can execute the package on multiple servers without
receiving errors because of incorrect server names.
2. Can you create packages that execute other packages?
Yes.
3. Do you need to install SQL Server 2000 Enterprise Manager to design a
package?
You can start the DTS Designer only from the Enterprise Manager
interface. You can start the DTS Import and DTS Export wizards
externally to Enterprise Manager. You can design packages
programmatically outside the DTS Designer by using Component
Object Model (COM) compliant programming languages.
4. What are potential issues with buying third-party OLE DB providers?
DTS has a series of interfaces that an OLE DB provider must support
in the same order as DTS. Not all OLE DB providers are compliant
with DTS. For example, some OLE DB providers are not thread safe,
but report that they are. You can use an OLE DB provider test kit to
test OLE DB provider compliance.
Module Strategy
Use the following strategy to present this module:
! Introducing DTS
Begin by defining DTS and describing the tasks that it can perform. Define
a package as a collection of tasks—a data connection task, a data
transformation task, assorted processing tasks, and precedence constraint
tasks. Describe each type of task in detail. Introduce the DTS Designer,
explaining how to access it and describing the various areas of the interface.
Explain the steps involved in creating a package—defining a data source,
defining a transformation, and adding DTS tasks.
! Executing and Scheduling Packages
Explain to students that, after creating a package, they then define when and
how often to run the package. Describe the various ways to execute a
package. Finally, describe how to schedule a package, emphasizing that the
SQL Server Agent must be running for a scheduled package to execute.
! The Analysis Services Processing Task
Define the OLAP Processing task and describe when and how to use it. List
the various objects that the OLAP processing task can process.
! Copying and Archiving OLAP Databases
Explain that copying and archiving OLAP objects are two administrative
tasks that can be very useful in the deployment of an OLAP application.
Describe how to perform a copy and paste in SQL Server 2000 Analysis
Services and list some uses of copy and paste. Finally, describe how to
create an archive of a database and how to restore an archived database.
Emphasize that you can only restore and archive databases, not other items
such as cubes or servers.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Introducing DTS
Lead-in ! Executing and Scheduling Packages
In this module, you will learn
about various OLAP ! The Analysis Services Processing Task
deployment techniques.
! Copying and Archiving OLAP Databases
# Introducing DTS
Topic Objective
To introduce DTS.
Lead-in
In this section, you will be
! Reviewing DTS
introduced to DTS and its ! Defining DTS
role in data movement and
transformations. ! Working with DTS Packages
! Using the DTS Designer
In the corporate world, you create and store data in many different formats,
platforms, and systems.
Microsoft® SQL Server™ 2000 DTS gives you the ability to move
heterogeneous data sources on a regular basis, performing transformations
along the way.
In this section, you are introduced to DTS and its role in data movement and
transformations.
Reviewing DTS
Topic Objective
To introduce DTS in the
Microsoft data warehousing
suite of products.
Lead-in
DTS is the feature of SQL
Server that moves and OLTP DTS DW DTS Analysis Services Clients
transforms data. Source Storage
Defining DTS
Topic Objective
To define DTS and describe
its use.
Lead-in ! Automates Processing of OLAP Cubes and Dimensions
DTS is a workflow ! Imports and Exports Data
application that is bundled
into SQL Server 2000. DTS ! Transforms Data
allows you to extract,
transform, and load data to ! Automates Imports, Exports, and Transformations of
and from multiple Databases
heterogeneous data
sources. ! Executes Packages
! Transfers Database Objects
DTS is a workflow application that is bundled into SQL Server 2000. DTS
allows you to extract, transform, and load data to and from multiple
heterogeneous data sources.
By using DTS, you can:
! Automate the processing of OLAP cubes and dimensions.
! Import and export data between multiple data sources.
! Transform data between data sources by using simple copies or customized
transformation scripts.
! Automate the imports, exports, and transformations of databases.
! Define the imports, exports, and data transformations as packages that can
be used repeatedly.
! Transfer database objects, such as views, indexes, and stored procedures,
between SQL Server 2000 databases.
A package is a collection of database tasks created in DTS and saved for future
use. It is the primary object created and used in DTS. In a package, you define
the following tasks:
! Connections to your data source and data destination.
! Transformations defining data movement and manipulation.
! Assorted processing tasks.
! Task processing precedence constraints.
Tip DTS has Import and Export wizards accessed through the Enterprise
Manager or through an executable file. The wizards take you step by step
through the process of importing and exporting data from data sources to data
destinations. For more information, refer to the DTS online documentation.
DTS has a variety of built-in tasks that you can create in a package:
! ActiveX Script Task
! Execute Process Task
! Execute SQL Task
! Data Driven Query Task
! Transfer SQL Server Objects
! File Transfer Protocol (FTP) Task
! Execute Package Task
! Send Mail
! Bulk Insert
! Analysis Services Processing Task
! A custom task, created with languages such as Visual Basic or Microsoft
Visual C++®
An icon in the DTS Designer identifies each task. Assign a task by simply
dragging the appropriate icon from the tool palette in the DTS Designer to the
workspace.
The DTS Designer makes creating and managing packages and tasks easy.
Delivery Tip
Open Enterprise Manager, After you start Enterprise Manager, you access DTS from the tree view
and discuss each of the four immediately below the SQL Server node. From here, you have the ability to
topics as you talk students create and manage DTS tasks.
through the DTS Designer
interface.
Accessing the DTS Designer
To access DTS Designer, create or open a package from Enterprise Manager.
You will see the DTS Designer, which contains the following areas:
! The workspace is the area where connections, tasks, and transformations are
created and defined.
! Tool palettes allow you to easily define data sources and destinations as
well as processing tasks. Simply drag the appropriate icon to the workspace.
! The menu bar includes selections for general package and data
transformation tasks. You can choose to configure the data sources and
tasks of your packages from either the menu bar or the tool palettes.
Defining Transformations
To transform data between data sources, click Task, click Transform Data
Task, and then click the data source and the data destination.
Tip Verify that your data sources have been defined and configured before
creating a data transformation.
After you add the transform successfully, an arrow will connect the data sources
and will point in the direction that data is moving. You can right-click the
transform arrow to define the data transformation properties.
Adding Tasks
There are two ways to define tasks in a DTS package—drag the appropriate
icons from the task tool palette to the workspace, or click the appropriate task
from the Task menu.
Depending on the task added to the workspace, you configure the task
immediately after adding it to the package. After you originally define a task,
you modify its configuration by right-clicking the task and clicking Properties.
After you create and save a package, you then define when and how often to
Delivery Tip run the package. Right-click the package from Enterprise Manager to either
Open Enterprise Manager
and discuss executing and
execute the package immediately or schedule the package to execute at a future
scheduling packages as you or regularly scheduled time.
talk students through the
interface. Executing a Package
When you execute a package, you perform all transformations and tasks defined
in the package, connecting to the configured data sources, and ordering the
Key Point tasks based upon any defined precedence constraints.
A scheduled DTS package
is executed by the SQL You execute a package in the DTS Designer by either clicking the Execute
Server Agent service as a button on the toolbar or by clicking the Package menu and clicking Execute.
job. The SQL Server Agent
must therefore be running You execute a package in Enterprise Manager by right-clicking the package and
for the scheduled packages then clicking Execute Package. The package processes at that moment and a
to execute. dialog appears giving you the status of the package after processing completes.
Scheduling a Package
In a production environment, it is common for loading and transformation tasks
to be performed the same way each time they are executed. It is often important
to automate these regular tasks on an ongoing basis.
Note The SQL Server Agent service executes a scheduled DTS package as a
job. The SQL Server Agent must be running for the scheduled packages to
execute.
To create an Analysis Services task, simply drag the cube icon to the workspace
in DTS Designer.
After dragging the Analysis Services Processing task icon to the DTS Designer
workspace, you see the dialog in the preceding illustration. Select the object
that you want to process, and the type of processing that you want applied to the
selected Analysis Services object.
The Analysis Services Processing task can process any of the following objects
or folders:
! A database, including all cubes, partitions, virtual cubes, dimensions, and
mining models in the database.
! A cube.
! A partition.
! A virtual cube.
! A shared dimension.
! A virtual dimension.
! A mining model.
! Server object folders:
• The Cubes folder that includes all cubes and virtual cubes.
• The Dimensions folder that includes all shared and virtual dimensions.
• The Mining Models folder that includes all data mining models.
In this demonstration, you will learn how to create a new package that
Delivery Tips processes the HR cube in the Foodmart 2000 database.
The steps for this
demonstration are included
in the Instructor Notes.
Exercise 1
Creating a New Package
In this exercise, you will create a new package that processes the HR cube in
the Foodmart 2000 database.
Important The order in which you select the two tasks is critical to setting
up the precedence constraints properly.
You move various Analysis Server objects from one location to another by
using the copy and paste commands in Analysis Services. You can move
objects in databases, between databases, and even between servers.
To back up OLAP databases on your Analysis Server, you can create archives
Delivery Tip by using the Archive Database command in Analysis Manager. You can also
Point out to students that
they have been working with
use the msmdarch command from a command prompt or a batch script.
archived databases in many Archive a database in Analysis Manager by right-clicking the database, clicking
modules in course 2074A,
Archive Database, and selecting the location where you want the archive
Designing and Implementing
OLAP Solutions with
saved. You must also name the archive files created. Each database archive is
Microsoft SQL Server 2000. made up of one or more *.cab files.
You can also archive a database by using the msmdarch command included in
the Analysis Services installation. By default, the msmdarch.exe command file
exists in the C:\Program Files\Analysis Services\Bin directory. You can either
type msmdarch with appropriate switches at the command prompt, or you can
include the appropriate syntax in a batch script. If you include the command in
a batch script, you can then execute the script by using DTS to automate the
archiving of your OLAP databases.
Tip To open the MSMD Archive Shell dialog box that contains proper
msmdarch command usage and syntax, type the following syntax at a command
prompt at the C:\Program Files\Analysis Services\Bin directory:
msmdarch /?
You can only archive database objects. You do not have the ability to archive
lower or higher level objects, such as cubes or servers.
Caution When you archive an OLAP database, you are archiving only the
OLAP database definitions and metadata, along with the cube data at that point
in time. You are not archiving the source data that builds the cube and the
dimensions in the cube. To archive the source data, refer to your relational
database management system (RDBMS) documentation.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Introducing DTS
Lead-in ! Executing and Scheduling Packages
The review questions cover
some of the key concepts ! The Analysis Services Processing Task
taught in the module.
! Copying and Archiving OLAP Databases
Contents
Overview 1
Introducing Data Mining 2
Training a Data Mining Model 12
Building a Data Mining Model with
OLAP Data 13
Browsing the Dependency Network 23
Lab A: Creating a Decision Tree with
Relational Data 27
Review 32
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, your 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.
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.
Instructor Notes
Presentation: This module introduces students to data mining and explains how to build and
40 Minutes browse data mining models by using Microsoft® SQL Server™ 2000 Analysis
Services. Students will learn fundamental data mining terminology, concepts,
Lab: techniques, and algorithms.
20 Minutes
This is an overview module that focuses on the use of built-in Analysis
Manager wizards. It is not intended to provide in-depth knowledge of data
mining.
After completing this module, students will be able to:
! Describe data mining characteristics, applications, and modeling techniques.
! Describe the process of training a model.
! Use the online analytical processing (OLAP) Mining Model Wizard to edit,
process, and explore the decision trees.
! Analyze relational data relationships in the dependency network browser.
! Describe the steps required to build a clustering model by using OLAP data.
Required Materials
To teach this module, you need Microsoft PowerPoint® file 2074A_17.ppt.
Preparation Tasks
To prepare for this module, you should:
! Read all the materials for this module.
! Read the instructor notes and margin notes.
! Practice combining the lecture with the demonstrations.
! Complete the lab.
! 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.
Module Strategy
Use the following strategy to present this module:
The structure of this module is multiple demonstrations showing students how
to build and browse various types of data mining models. Except for the first
example about students attending college, the demonstrations are documented
directly in the student manual. Integrate your lecture with live demonstration
following the procedures included in the student notes. Encourage students to
follow along with your demonstrations on their computers. Some students may
choose to watch your demonstrations only, which is also acceptable.
! Introducing Data Mining
The case study introduces students to data mining. Data mining may be new
to many students and should be described in very simple terms highlighting
the business application and uses. Emphasize to students why this
technology is useful and complementary to the other forms of analysis they
have been exposed to. Then describe the various data mining techniques that
are available.
! Training a Data Mining Model
Describe the process required to create a data mining model. Define training
data and cases.
! Building a Data Mining Model with OLAP Data
Introduce students to the membership card scenario. Use the membership
card scenario to step students through the process of building a data mining
model with OLAP data by using the Mining Model Wizard. Describe each
step in the process—selecting the data mining technique, selecting the case,
selecting the training data, creating a dimension and virtual cube, and
browsing the data mining model.
! Browsing the Dependency Network
Demonstrate how to browse the dependency network. Explain that the
Dependency Network Browser can be used to view all the relationships in
your model.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Introducing Data Mining
Lead-in ! Training a Data Mining Model
In this module, you will learn
about data mining, how data ! Building a Data Mining Model with OLAP Data
mining can be used to
address business ! Browsing the Dependency Network
application requirements,
and how to create data
mining models by using the
Analysis Manager.
In many organizations, data volumes are so large that it is difficult, even for the
most seasoned analyst, to identify the key information most relevant to
managing the business.
Data mining is the automatic or semi-automatic process of deducing meaningful
patterns and rules from large quantities of data. These patterns provide valuable
insights to business managers and offer information that may be overlooked by
more traditional manual methods of analysis.
Data mining programs search for patterns in data rather than answer predefined
questions. Because of this, they can be used for knowledge discovery in
addition to hypothesis testing.
Data mining is used to:
! Provide insight into historical data.
! Predict future values or outcomes based on historical patterns.
! Close the analysis loop by taking action based on the information derived
from the analysis.
Detecting Fraud
You can use a data mining system to identify characteristics of suspicious
insurance claims by analyzing characteristics of legitimate and fraudulent
claims. For example, specific types of injuries that are difficult to diagnose,
such as neck and back injuries, may be more likely candidates for a fraudulent
claim.
Pricing Insurance
In the insurance industry, you use data mining techniques to analyze historical
data such as age, marital status, gender, and driving history. All these factors
play a role in predicting the likelihood of a specific driver for getting into an
automobile accident. Data mining techniques help you to weigh and factor these
data points into pricing for an individual insurance policy.
Several data mining techniques are available that you can use to identify the
Delivery Tip patterns in large volumes of data. You use different data mining techniques for
Do not spend much time
describing the different
different types of applications. In this section, you will learn the most common
models. Simply discuss that data mining techniques and when to apply them.
various models are available
for analysis and that Analysis Services Models
Microsoft provides two of
the models in Analysis
Analysis Services includes two data mining techniques—Microsoft Clustering
Services. and Microsoft Decision Trees.
Clustering
You use the clustering technique, sometimes called K-nearest neighbor, to
group data records that are similar to each other. You often use this common
technique as the starting point for market or customer analysis.
For example, you may want to segment your market so that you can offer
customized programs and pricing to specific customer groups. With clustering,
you can segment your customers into groups with similar characteristics.
Decision Trees
Decision trees are a popular method for both classifying and predicting. By
using a series of questions and rules to categorize data cases, you can predict
the likelihood of certain types of cases having a specific outcome.
For example, insurance companies use a decision tree to predict the likelihood
of high claims by analyzing statistical data organized by a set of rules that help
predict the likelihood of high claims.
Other Models
Analysis Services provides two types of data mining models—clustering and
decision trees. However, users may define their own models or use other
proprietary data mining algorithms. Common data mining models include
market basket analysis, memory-based reasoning, and neural networks.
Memory-Based Reasoning
Memory-based reasoning (MBR) is a directed data mining technique that is
used for prediction and classification. MBR analyzes a collection of the known
instances of the nearest neighbor and from that information makes predictions
about unknown instances.
For example, if a patient exhibits a series of symptoms, doctors apply their
experience with similar patients to diagnose the current case. The doctors
perform their diagnoses by using a form of MBR.
Neural Networks
Just as a human can learn from experience, so can computers. Neural networks
model the neural connections in a human brain and thereby simulate learning.
If you assemble data where the input and output factors are both known, the
computer can “learn” from those patterns and set up rules and mathematical
factors to help calculate or predict the output value.
Suppose you want to sell your car. Several factors affect the sales price, such as
the age of the car, its condition, its manufacturer and model, and so forth.
Analyzing historical car prices, the neural network can create a series of input
and output factors to predict the sales price.
Summary of Models
The following table defines commonly used data mining models and their
typical usages.
Technique Typical usage
Clustering (K-nearest neighbor) Classification
Decision trees Classification and prediction
Market basket analysis (affinity Clustering or affinity grouping
grouping)
Memory-based reasoning Classification and prediction
Neural networks Classification, prediction, and clustering
Introductory Example
Topic Objective
To introduce an example of Why Do High School Students Attend College?
how data mining can be
used for prediction.
Lead-in
What do you think is the
principal attribute for
predicting whether students
attend college? What, if
anything, can you conclude
from the information in the
table?
In this demonstration, you will create a data mining model by using a decision
Delivery Tips tree with relational data. Specifically, you will create a decision tree that
The steps for this
demonstration are included
determines what causes students to attend college.
in the Instructor Notes.
Encourage students to
follow your demonstration
on their computers.
This example demonstrates that data mining allows you to validate or discredit
specific hypothesis. Data mining also helps you identify patterns that you may
not expect or notice by analyzing the data manually.
To create a model, you must assemble a set of data where the attributes to be
Delivery Tip predicted are known. Such a data set is called the training data. During the
Use the build slide to
explain how Analysis Server
training process, data is inserted into the data mining model. The data mining
evaluates training data to model analyzes the training data and looks for rules and patterns that can be
build a data mining model, used later to determine the predictive columns.
and then uses the model to
predict future outcomes
You perform training by processing the data mining model in Analysis
based on new data sets. Manager.
The training data has two characteristics:
! It is typically historical data.
! It is statistically representative of the cases for which you are building a
predictive model.
The case is the basic unit for analysis in the mining model. The case is the
element that is used for classifying and grouping the data.
As depicted in the preceding illustration, the data mining engine evaluates the
cases identified in the training data and creates the model based on the
algorithm selected. When the model is built, it can be applied to future data to
predict outcomes or classify data.
You can use the Mining Model Wizard in Analysis Manager to create a data
mining model. This section uses the Membership Card scenario to demonstrate
the creation of a data mining model.
Building and reviewing a data mining model entails several steps:
1. Selecting the data mining technique.
2. Identifying the case.
3. Selecting the entity to be predicted.
4. Identifying the training data.
5. Optionally creating a dimension and virtual cube from the resulting model.
6. Processing the model and browsing the results.
Following is the systematic process for predicting the card selection patterns:
1. Use the Microsoft Decision Tree model to find card selection patterns in the
customer base.
2. Select the Customer as the dimension being mined—the case dimension.
3. Select the Member Card member property as the information used by the
data mining algorithm to identify the patterns.
4. Use the Customer demographic information available to train the model.
5. Browse the decision tree that is created by using the data mining algorithm.
Based on the patterns discovered, the marketing department can enhance the
services available at each card level to ensure that the specific card programs
are suited to customers who apply for each type of card.
There are varieties of data mining techniques used to build a data mining
model. Microsoft currently offers two data mining techniques:
! Microsoft Decision Trees
! Microsoft Clustering
The Microsoft Decision Trees technique is used for classification and
prediction. You can use the decision tree technique for the membership card
scenario because it predicts and assigns probabilities of outcomes based on a
variety of attributes. The objective of the scenario is to predict card levels based
on demographic characteristics of customers.
The Microsoft Clustering technique is used for classification. It is a method that
uses various techniques to group records into groups or clusters that exhibit
similar, predictable characteristics.
The Mining Model Wizard prompts you to select the technique for creating the
model.
The case is the basic unit for analysis in the mining model. It is the base
Delivery Tip element for classifying and grouping data.
Ask students what the case
dimension and level are for In the first data mining example presented in this module—whether a student
the membership card will attend college or not—the case is each student. In this membership card
scenario. example, the case is each customer in the Foodmart database.
In an OLAP cube, the case is a level—typically the leaf level—of a dimension.
The Mining Model Wizard prompts you to select the case that you want use to
create the model.
The predicted entity is the element you want the model to predict.
Delivery Tip
Ask students what the In the students attending college example, “planning to attend college or not” is
predicted entity is in the the predicted entity. In the membership card scenario, you want to predict what
membership card scenario. membership card a person is likely to apply for based on that person’s
demographic attributes. Therefore, the predicted entity is membership card.
In an OLAP cube, a predicted element can be:
! A measure
! A member property of the case level
! Members of another dimension
Although only one entity can be see from the wizard, additional entities can be predicted in one model using the editor.
Note Although only one predicted entity can be selected by using the wizard,
additional entities may be added by using the Data Mining Editor.
The Mining Model Wizard prompts you to select the predicted entity for this
model.
To build the model, the model must “learn” from the training data.
The training data is a statistically representative subset of historical data where
the attributes to be predicted are known. The training data must contain the case
data element, the predicted entity, and at least one other attribute that can be
used for predicting that entity.
The Mining Model Wizard prompts you to select the training data to be used in
building the model.
You can choose to create a dimension from the decision tree. You can then
choose to create a virtual cube that includes the virtual dimension and the
original base cube from which the model was created. This technique allows
users to explore the decision tree in an interactive ad-hoc manner.
The Mining Model Wizard gives you the option to create a new dimension
based on the decision tree and then optionally include that dimension in a
virtual cube.
Node Path
To finish creating the model, you must name, save, and process the model. The
final step of the wizard allows you to do this.
When you complete a model by using the Mining Model Wizard, you exit from
the wizard to the OLAP Mining Model Editor. You can use the editor to browse
the results of your model or edit properties of the model.
Content Detail Represents the portion of the mining model on which the focus
is set.
Content Navigator Represents the complete view of the mining model and can be
used for navigating the decision tree and changing the context
in the Content Detail pane.
Attributes Displays the numeric (Totals) or graphical (Histogram)
representation of the predicted entity for the currently selected
node.
Node Path The pane that contains the full context information for the node
currently in focus.
In the data mining model browser, you can view the attributes and their
relationship to the entity you are trying to predict. The Dependency Network
Browser gives you the ability to view all the attributes in the model and how
they relate to one another.
As shown in the above slide, each attribute is a node with arrows indicating the
prediction links between the nodes.
After you create and process the mining model, you can explore the dependency
network.
In this demonstration, you will create a data mining model by using a decision
tree with OLAP data.
! To explore data in the decision tree and isolate Golden card customers
1. In the Content Detail pane, click the All node.
Notice that the All node is black. The color represents the density of cases in
that node. Because the All node contains all the 5,581 cases, it is colored
black to represent high density.
2. Click the Totals tab of the Attributes pane.
The Tree Total row shows 5,581 total cases. Because OLAP data is used,
the number of total cases represents the customers having activity in the
Sales cube compared to the entire population of customers in the database.
In other words, 5,581 customers are active in the Sales cube.
3. Click the Histogram tab of the Attributes pane.
This shows a graphical representation of the cases by different member card
types.
Tip The Attributes pane can be sorted by any of the three columns—Value,
Cases, or Probability by clicking the column headings. The cursor arrows
indicate ascending or descending sort order.
4. In the lower right corner of the OLAP Mining Model Editor, click Golden
in the Tree color based on list.
This action re-colors the decision tree based on the density of Golden cases.
Important The first branch in the decision tree represents the most
dominant attribute for predicting the predicted entity. In this example, the
attribute that has the greatest impact on predicting the membership card is
the customer’s salary.
Objectives
Explain the lab objectives. After completing this lab, you will be able to:
! Create a decision tree with relational data.
! Browse the decision tree results.
Exercise 1
Creating a Decision Tree with Relational Data
In this exercise, you will create a data mining model by using a decision tree
with relational data. You will create the model from the Mining Model Wizard
in Analysis Manager.
Exercise 2
Browsing the Relational Decision Tree Results
In this exercise, you will browse the decision tree results from the data mining
model created in Exercise 1. Because you selected three predictable columns in
that exercise, you will have three decision trees to review.
The items that are not being predicted but were selected as predictable columns
are inputs into the decision tree.
Tip If you cannot see the results in the Attribute pane, you can resize each
column or the Content Detail pane space.
Note The membership card example is very simple. Often there are
hundreds of elements to be analyzed. The arrows, along with the color-
coding and the link strength, offer an easy-to-use graphical interface to help
you understand the relationships.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Introducing Data Mining
Lead-in ! Training a Data Mining Model
The review questions cover
some of the key concepts ! Building a Data Mining Model with OLAP Data
taught in the module.
! Browsing the Dependency Network
2. What are the two data mining algorithms available with Analysis Services
2000, and when does it make sense to use each algorithm?
Microsoft Decision Trees—useful for classification and prediction
Microsoft Clustering—useful for classification
Overview 1
Building the Warehouse Cube 2
Lab A: Building the Warehouse Cube 8
Building the Sales Cube 16
Lab B: Building the Sales Cube 22
Building the Warehouse and Sales Virtual
Cube 28
Lab C: Building the Warehouse and Sales
Cube 33
Review 38
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, your 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.
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.
Instructor Notes
Presentation: In this module, students apply concepts they have learned in modules 1 through
60 Minutes 17 in the course 2074A, Designing and Implementing OLAP Solutions Using
Microsoft® SQL Server™ 2000. Students will use various cube and dimension
Labs: techniques to build cubes from the Foodmart 2000 database by using
120 Minutes Microsoft SQL Server 2000 Analysis Services.
In the labs, students are given high-level procedures and must recall the specific
steps and actions for creating various dimension and cube structures. Students
create a preliminary cube, and must then make changes to the cube by applying
dimension and level properties.
After completing this module, students will be able to:
! Create a cube based on user requirements.
! Create another cube with different dimensions and measures.
! Build a virtual cube.
Required Materials
To teach this module, you need the following materials:
! Microsoft PowerPoint® file 2074A_18.ppt
Preparation Tasks
To prepare for this module, you should:
! Perform all the student labs.
! Read all the student materials.
! Read the instructor notes and margin notes.
! Practice integrating the demonstrations with the lecture.
! 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.
Product Shared
Time Shared
Warehouse Shared
Store Shared
First Opened Year Private
3. Highlight the fact that the cube contains the following measures:
• Units Ordered
• Units Shipped
• Warehouse Sales
• Warehouse Cost
• Maximum Supply Time
4. Drill down on each dimension and verify that students have the correct
number of levels in each dimension and that the levels are in the correct
order.
5. Drill down on the First Opened Year dimension and verify that students
have the correct expression in the Member Key Column and the Member
Name Column for the level.
6. Click the Maximum Supply Time measure, and verify that students use the
Max Aggregate Function to define the measure.
7. Edit each of the three calculated members, and verify that students use the
correct expressions to define each calculated member.
8. Close the Cube Editor.
9. Expand the Warehouse cube, expand the Partitions folder, and verify that
students have two partitions defined in the cube: one partition for 1998
inventory data and one for 1997 inventory data.
Demonstration: The following demonstration procedures provide information that will not fit in
the margin notes or is not appropriate for student notes.
10 Minutes
! To restore a new database and define a data source
1. In Analysis Manager, right-click the server, click Restore Database, click
the Look in list, click the file
C:\Moc\2074A\Labfiles\L18\Answers\Module 18B.CAB, click Open,
click the Restore button, and then click Close.
2. Expand the Module 18B database, double-click the Data Sources folder,
right-click the FoodMart 2000 data source, and then click Edit.
3. Verify that FoodMart 2000 is selected in step 1. Click OK.
Store Shared
Product Shared
Time Shared
Quarter Virtual
Customer Shared
Gender Private
Education Virtual
Yearly Income Virtual
3. Highlight the fact that the cube contains the following measures:
• Store Sales
• Store Cost
• Unit Sales
4. Notice the Customer dimension.
The Customer dimension contains the Customer level that uses the
customer_id as the Member Key Column, and lname, fname as the
Member Name Column.
5. Notice the Product dimension. The Product Name level is disabled in the
Cube Editor.
6. Edit each of the three calculated members, and verify that students use the
correct expressions to define each calculated member.
7. Close the Cube Editor.
8. Expand the Sales cube, expand the Partitions folder, and verify that
students have three partitions defined in the cube: one partition for 1997
sales data, one for 1998 sales data, and one for 1998 December sales data.
Demonstration: The following demonstration procedures provide information that will not fit in
the margin notes or is not appropriate for student notes.
10 Minutes
! To restore a new database and define a data source
1. In Analysis Manager, right-click the server, click Restore Database, click
the Look in list, click the file
C:\Moc\2074A\Labfiles\L18\Answers\Module 18C.CAB, click Open,
click the Restore button, and then click Close.
2. Expand the Module 18C database, double-click the Data Sources folder,
right-click the FoodMart 2000 data source, and then click Edit.
3. Verify that FoodMart 2000 is selected in step 1. Click OK.
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 the module but are not specifically addressed in the
content of the student notes.
1. How can you temporarily add 1997 inventory data to the Warehouse cube?
You can incrementally update the Warehouse cube, defining the
inventory_fact_1997 as the fact table from which to retrieve data.
2. What is an easy way to create the First Opened Year dimension in the
Warehouse cube?
In the Warehouse Cube Editor, create a new dimension by using the
Dimension Wizard. Select the store table as the dimension table, create
the dimension as a Time dimension, and then define the hierarchy
containing two levels—year and month. At the end of the wizard, clear
the Share this dimension with other cubes check box.
After the dimension appears in the cube tree view, you can delete the
month level, leaving one level, First Opened Date. Rename the level
First Opened Year.
Module Strategy
Use the following strategy to present this module:
! Building the Warehouse Cube
Begin by defining the schema that students will use to build the Warehouse
cube. Let students know which tables to use, and then introduce the
dimensions and levels that they will create. Next, introduce the measures to
include in the cube. Finally, define the calculated members to create.
! Building the Sales Cube
Introduce the schema of the Sales cube. Let students know which tables to
use. Next, introduce the dimensions and levels that they will create and then
introduce the measures to include. Finally, define the calculated members to
create.
! Building the Warehouse and Sales Virtual Cube
Explain that students will be creating a virtual cube named Warehouse and
Sales by combining the Warehouse cube and the Sales cube. Introduce the
dimensions and levels to be included, and then define which measures to
add. Finally, explain that students will add calculated members by using two
different methods—creating a new one, and importing several from the
source cubes.
Overview
Topic Objective
To provide an overview of
the module topics and
objectives. ! Building the Warehouse Cube
Lead-in ! Building the Sales Cube
In this module, you will
apply the concepts learned ! Building the Warehouse and Sales Virtual Cube
in modules 1 through 17 of
the course 2074A,
Designing and Implementing
OLAP Solutions Using
Microsoft SQL Server 2000
by creating various cubes
from the Foodmart 2000
database.
In this module, you will apply the concepts learned in modules 1 through 17 in
the course 2074A, Designing and Implementing OLAP Solutions Using
Microsoft® SQL Server™ 2000 by creating various cubes from the Foodmart
2000 database.
After completing this module, you will be able to:
! Create a cube based on user requirements.
! Create another cube with different dimensions and measures.
! Build a virtual cube.
In this section, you will learn about the schema of the database used to create
the Warehouse cube by using Microsoft SQL Server 2000 Analysis Services.
In addition, you will learn about the dimensions, measures, and calculated
members that you will create in the Warehouse cube.
The Foodmart 2000 database contains tables that you will use to create the
Delivery Tips Warehouse cube.
Let students know that they
can turn back to this page You will create a cube that tracks Units Ordered, Units Shipped, Warehouse
during the lab to identify Sales, Warehouse Cost, Maximum Supply Time, and Margin. Users need to
levels and tables used to
see these numeric values by Warehouse, by Store, by Time period, and by
build dimensions.
Product. You will need to include two years worth of data, as well as the
Students can also open the variance of the two years—1997 and 1998. In addition, users want to evaluate
database themselves in the all the values based on the year in which the stores opened.
Access by navigating to
\Program Files\Analysis
The tables that you will use to build the cube are the following:
Services\Samples on their ! Inventory fact tables—for 1997 and 1998 data
computers and opening
Foodmart 2000.mdb. ! time_by_day
! product
! product_class
! store
! warehouse
! warehouse_class
You will create five dimensions in the Warehouse cube. Before creating each
Delivery Tips dimension, you will determine the source table and the levels that are required
For classes with more
experienced students,
to build the dimension.
briefly highlight the fact that
they will be creating several Product
dimensions in lab A. Do not
Define the shared Product dimension by using the tables product and
cover the dimension
structures in detail.
product_class. The Product dimension contains six levels:
! Product Family
For less advanced classes,
use this page as an ! Product Department
opportunity to prepare
! Product Category
students for the lab by
discussing each of the ! Product Subcategory
dimensions in detail.
! Brand Name
! Product Name
Time
Define the shared Time dimension by using the time_by_day table. The Time
dimension contains three levels:
! Year
! Quarter
! Month
Be certain that the Time dimension levels are specified with the proper Level
Type properties.
Warehouse
Define the shared Warehouse dimension by using the tables warehouse and
warehouse_class. The Warehouse dimension contains four levels:
! Country
! Description
! State
! Warehouse
Store
Define the shared Store dimension by using the store table. The Store
dimension contains four levels:
! Store Country
! Store State
! Store City
! Store Name
You will create five measures in the Warehouse cube. All measures come from
the inventory fact tables. The measures to include in the cube are:
! Units Ordered
! Units Shipped
! Warehouse Sales
! Warehouse Cost
! Maximum Supply Time
You will create three calculated members in the Warehouse cube. The
calculated members to include in the cube are:
! Margin. Warehouse Sales - Warehouse Cost.
! 1998 versus 1997 Variance. The difference between the two years.
! USA + Canada. The rollup of the two members created by using the Sum
function.
Prerequisites
Before working on this lab, you must have:
! Experience working with dimensions.
! An understanding of dimensions, cubes, and measures.
! Experience working with the Cube Editor and the Dimension Editor.
! Experience working with the Calculated Member Builder.
Calculated Members
For more information on creating calculated members, see module 11,
"Implementing Calculations Using MDX," in course 2074A, Designing and
Implementing OLAP Solutions Using Microsoft SQL Server 2000.
Partitions
For more information on creating partitions, see module 10, "Managing
Partitions," in course 2074A, Designing and Implementing OLAP Solutions
Using Microsoft SQL Server 2000.
Exercise 1
Creating the Warehouse Cube
In this exercise, you will create a new cube, Warehouse, which contains five
dimensions with varying specifications, levels, and structures. In addition, the
cube contains five measures and three calculated members. You will process
the cube and will confirm that the cube is correct by verifying cube values.
The lab provides high-level procedures for you to follow. If you do not
remember the specific steps for a procedure, refer to the modules outlined in the
For Your Information section of the lab.
If you still cannot determine the proper steps for a single procedure, then refer
to the corresponding answer files, which are located in:
C:\Moc\2074A\Labfiles\L18\Answers
Use the following table to create the dimensions with various dimension
specifications.
Dimension Name Dimension Type Levels/Members
____________________________________________________________
Exercise 2
Updating the Warehouse Cube
In this exercise, you will modify the Warehouse cube by adding calculated
members and retrieving data from another fact table containing 1997 data.
3. Verify that you retrieve 157,890 for the following member combination:
• 1998 versus 1997 Variance
• All Store
• All Product
• All First Opened Year
• Units Shipped
• All Warehouse
4. Verify that you retrieve $26,582.61 for the following member combination:
• All Time
• All Store
• Drink products
• All First Opened Year
• Margin
• All Warehouse
5. Save the Warehouse cube, and then close the Cube Editor.
In this demonstration, you will view and discuss the solutions of lab A.
Delivery Tips
The steps for this
demonstration are included
in the Instructor Notes.
Encourage students to
follow along with the
demonstration by comparing
their Warehouse cube to
the archived version that
you demonstrate.
In this section, you will learn about the schema of the database used to create
the Sales cube by using Analysis Services. In addition, you will learn about the
dimensions, measures, and calculated members that you will create in the Sales
cube.
The Foodmart 2000 database contains tables that you will use to create the
Delivery Tips Sales cube.
Let students know that they
can turn back to this page The Sales cube contains information that pertains to the Foodmart stores and
during the lab to identify customers. Users will need to analyze the numeric values of Store Sales, Store
levels and tables used to
Cost, Unit Sales, Gross Margin, and Average Selling Price. Because of the
build dimensions.
analytical and strategic role of most Sales cube users, you will need to create
Students can also open the many dimensions in the cube. Users must see data by Product, by Time, by
database themselves in Store, by Customer, by Gender of customer, by Education of customer, and
Access by navigating to by Yearly Income of customer. The cube must store data for 1997 and 1998
\Program Files\Analysis years.
Services\Samples on their
computers and opening You will use the following tables to build the Sales cube:
Foodmart 2000.mdb.
! Sales fact tables—for all the 1997 and 1998 data
! time_by_day
! product
! product_class
! store
! customer
You will define eight dimensions in the Sales cube. Before creating each
Delivery Tips dimension, you will determine the source table and the levels that are required
For classes with more
experienced students,
to build the dimension.
briefly highlight the fact that
they will be creating several Store
dimensions in lab B. Do not
Define the shared Store dimension by using the store table. The Store
cover the dimension
structures in detail.
dimension contains four levels:
! Store Country
For less advanced classes,
use this page as an ! Store State
opportunity to prepare
! Store City
students for the lab by
discussing each of the ! Store Name
dimensions in detail.
Product
Define the shared Product dimension by using the tables product and
product_class. The Product dimension contains six levels:
! Product Family
! Product Department
! Product Category
! Product Subcategory
! Brand Name
! Product Name
Time
Define the shared Time dimension by using the time_by_day table. The Time
dimension contains three levels:
! Year
! Quarter
! Month
Be certain that the Time dimension levels are specified with the proper Level
Type properties.
Quarter
Define the virtual Quarter dimension by using the Quarter level from the
Time dimension. The Quarter dimension contains one level—Quarter.
Customer
Define the shared Customer dimension by using the customer table. The
Customer dimension contains four levels:
! Country
! State
! City
! Name
Gender
Define the private Gender dimension by using the customer table. This defines
the gender of each customer. The Gender dimension contains one level—
Gender.
Education
Define the virtual Education dimension by using the customer table. The
Education dimension contains one level— Education.
Yearly Income
Define the virtual Yearly Income dimension by using the customer table. The
Yearly Income dimension contains one level— Yearly Income.
You will create three measures in the Sales cube. All measures come from the
sales fact tables. The measures to include in the cube are:
! Store Sales
! Store Cost
! Unit Sales
You will create three calculated members in the Sales cube. The calculated
members to include in the cube are:
! Margin—Store Sales – Store Cost.
! Average Selling Price—Store Sales / Unit Sales.
! Average Customer Value—the average customer value, defined across all
measures and all dimensions.
Prerequisites
Before working on this lab, you must have:
! Experience working with dimensions.
! An understanding of dimensions, cubes, and measures.
! Experience working with the Cube Editor and the Dimension Editor.
! Experience working with the Calculated Member Builder.
Lab Setup
To complete this lab, you must first complete:
! Lab A, Building the Warehouse Cube, found earlier in this module.
Calculated Members
For more information on creating calculated members, see module 11,
"Implementing Calculations Using MDX," in course 2074A, Designing and
Implementing OLAP Solutions Using Microsoft SQL Server 2000.
Partitions
For more information on creating partitions, see module 10, "Managing
Partitions," in course 2074A, Designing and Implementing OLAP Solutions
Using Microsoft SQL Server 2000.
Exercise 1
Creating the Sales Cube
In this exercise, you will create a new cube, Sales, which contains eight
dimensions with varying specifications, levels, and structures. In addition, the
cube contains three measures and three calculated members. You will process
the cube and confirm that the cube is correct by verifying cube values.
The lab provides high-level procedures for you to follow. If you do not
remember the specific steps for a procedure, refer to the modules outlined in the
For Your Information section of the lab.
If you still cannot determine the proper steps for a single procedure, refer to the
corresponding answer files, which are located in:
C:\Moc\2074A\Labfiles\L18\Answers
Use the following table to create the dimensions with various dimension
specifications.
Dimension Name Dimension Type Levels/Members
4. In the Sales cube, only include the top five levels of the Product dimension.
Do not include the Product Name level.
5. Name the cube Sales.
6. Process the cube, without defining aggregations or storage mode.
7. Be certain that you include all sales data for 1997 and 1998.
Tip Three tables contain 1997 and 1998 data in the Foodmart 2000
database.
4. Verify that you retrieve $46,169.83 for the following member combination:
• All Time
• Canada stores
• Food products
• All Customer
• All Education
• All Gender
• Gross Margin
5. Save the Sales cube, and then close the Cube Editor.
In this demonstration, you will view and discuss the solutions of lab B.
Delivery Tips
The steps for this
demonstration are included
in the Instructor Notes.
Encourage students to
follow along with the
demonstration by comparing
their Sales cubes to the
archived version that you
demonstrate.
You will now create a virtual cube, Warehouse and Sales, which will combine
the previously created Warehouse and Sales cubes.
The Warehouse and Sales virtual cube will give users the ability to see
Product and Time members across measures from both the Warehouse and
the Sales cubes. In addition, the Customer and Store dimensions are added,
but without some of the more sensitive dimensions, such as Yearly Income and
Education.
You will define four dimensions in the Warehouse and Sales virtual cube.
Delivery Tip
Briefly mention the fact that
the virtual cube contains Time
four dimensions, and move Define the shared Time dimension by using the time_by_day table. The Time
on. dimension contains three levels:
! Year
! Quarter
! Month
Product
Define the shared Product dimension by using the tables product and
product_class. The Product dimension contains six levels:
! Product Family
! Product Department
! Product Category
! Product Subcategory
! Brand Name
! Product Name
Store
Define the shared Store dimension by using the store table. The Store
dimension contains four levels:
! Store Country
! Store State
! Store City
! Store Name
Customer
Define the shared Customer dimension by using the customer table. The
Customer dimension contains four levels:
! Country
! State
! City
! Name
You will create five measures in the Warehouse and Sales virtual cube:
! Unit Shipped
! Store Cost
! Store Sales
! Warehouse Sales
! Warehouse Cost
You will create calculated members in the Warehouse and Sales virtual cube
by using two methods:
! Creating one new calculated member—Average Shipped Cost
(Warehouse Cost / Units Shipped).
! Importing all calculated members from the two source cubes—Warehouse
and Sales. You will keep only those calculations that work properly.
Prerequisites
Before working on this lab, you must have:
! Experience working with dimensions.
! An understanding of dimensions, cubes, and measures.
! Experience working with virtual cubes.
! Experience working with the Virtual Cube Editor.
! Experience working with the Calculated Member Builder.
Lab Setup
To complete this lab, you must first complete:
! Lab A, Building the Warehouse Cube, found earlier in this module.
! Lab B, Building the Sales Cube, found earlier in this module.
Calculated Members
For more information on creating calculated members, see module 11,
"Implementing Calculations Using MDX," in course 2074A, Designing and
Implementing OLAP Solutions Using Microsoft SQL Server 2000.
Virtual Cubes
For more information on creating virtual cubes, see module 12, "Working with
Virtual Cubes," in course 2074A, Designing and Implementing OLAP Solutions
Using Microsoft SQL Server 2000.
Exercise 1
Creating the Warehouse and Sale Virtual Cube
In this exercise, you will create a new virtual cube, Warehouse and Sales,
which combines the data from two existing cubes—Warehouse and Sales. In
addition, you will create a new calculated member and will import calculated
members previously defined in the Warehouse and Sales source cubes.
The lab provides high-level procedures for you to follow. If you do not
remember the specific steps for a procedure, refer to the modules outlined in the
For Your Information section of the lab.
If you still cannot determine the proper steps for a single procedure, refer to the
corresponding answer files, which are located in:
C:\Moc\2074A\Labfiles\L18\Answers
In this demonstration, you will view and discuss the solutions of lab C.
Delivery Tips
The steps for this
demonstration are included
in the Instructor Notes.
Encourage students to
follow along with the
demonstration by comparing
their Warehouse and Sales
cube to the archived version
that you demonstrate.
Review
Topic Objective
To reinforce module
objectives by reviewing key
points. ! Building the Warehouse Cube
Lead-in ! Building the Sales Cube
The review questions cover
some of the key concepts ! Building the Warehouse and Sales Virtual Cube
taught in the module.
2. How did you incorporate all the 1997 and 1998 data into the Sales cube?
The Sales cube contains three partitions—one pulling data from
sales_fact_1997, one pulling data from sales_fact_1998, and one pulling
data from sales_fact_dec_1998.
3. Why did you delete the calculated member Average Selling Price in the
Warehouse and Sales virtual cube?
The expression for the Average Selling Price calculated member
included the Units Sales measure that does not exist in the Warehouse
and Sales virtual cube.