Documente Academic
Documente Profesional
Documente Cultură
with BW
ASAP FOR BW ACCELERATOR
BUSINESS INFORMATION WAREHOUSE
SAP (SAP America, Inc. and SAP AG) assumes no responsibility for errors or omissions in these materials.
These materials are provided “as is” without a warranty of any kind, either express or implied, including but not limited to, the implied
warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that
may result from the use of these materials.
SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these
materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and
does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages.
MULTI-DIMENSIONAL MODELING WITH BW
Table of Contents
MULTI-DIMENSIONAL MODELING WITH BW...................................................................................1
ASAP FOR BW ACCELERATOR...................................................................................................................1
TABLE OF CONTENTS................................................................................................................................2
1 INTRODUCTION...................................................................................................................................1
1.1 SOFTWARE VERSION SUPPORTED......................................................................................................1
1.2 REFERENCES......................................................................................................................................1
1.3 OVERVIEW.........................................................................................................................................1
2 FROM MULTI-DIMENSIONAL MODEL TO INFOCUBE – FIRST APPROACH...................5
2.1 THE GOALS OF MULTI-DIMENSIONAL DATA MODELS.........................................................................5
2.2 SUBJECT AREA..................................................................................................................................5
2.3 THE ROLE OF THE BW BUSINESS CONTENT......................................................................................5
2.4 BASIC MODELING STEPS...................................................................................................................6
2.4.1 Step 1: Develop a complete understanding of the underlying business processes...................7
2.4.1.1 Reaping benefits of BW’s Business Content......................................................................................9
2.4.2 Step 2: Create a valid Schema................................................................................................10
2.4.2.1 The Multi-Dimensional Model (MDM)............................................................................................10
2.4.2.2 The Star Schema...............................................................................................................................10
2.4.3 Step 3 : Create an InfoCube Description...............................................................................13
2.5 RESUME...........................................................................................................................................14
3 STAR SCHEMA BASICS AND MODELING ISSUES....................................................................15
3.1 HOW THE STAR SCHEMA WORKS....................................................................................................15
3.2 STAR SCHEMA ISSUES.....................................................................................................................16
4 MULTI-DIMENSIONAL SCHEMAS IN BW...................................................................................18
4.1 OVERVIEW.......................................................................................................................................18
4.2 CONNECTING MASTER TABLES TO INFOCUBES..............................................................................20
4.3 DIMENSIONS IN A BW SCHEMA......................................................................................................21
4.3.1 Master Data Table..................................................................................................................23
4.3.1.1 Reference Characteristic Assignment...............................................................................................23
4.3.1.2 Master Table Existence....................................................................................................................23
4.3.1.3 Assigning Attributes.........................................................................................................................23
4.3.1.4 Attributes and Querying...................................................................................................................23
4.3.1.5 InfoObject Names and Names of Attributes.....................................................................................24
4.3.1.6 Time Dependent Attributes...............................................................................................................24
4.3.1.7 Compound Attributes.......................................................................................................................26
4.3.2 Text Tables..............................................................................................................................26
4.3.3 SID Tables..............................................................................................................................26
4.3.3.1 InfoObject Definition and SID Tables..............................................................................................26
4.3.3.2 SID Tables Mainetance....................................................................................................................28
4.3.3.3 InfoCube Access and SID Tables.....................................................................................................28
4.3.4 External Hierarchy Table.......................................................................................................30
4.3.4.1 External Hierarchy Types.................................................................................................................30
4.3.4.2 Tables for External Hierarchies........................................................................................................31
4.3.4.3 Loading External Hierarchy Data.....................................................................................................31
4.3.4.4 External Hierarchies and InfoCube Access.......................................................................................31
4.3.5 Dimension Tables of an InfoCube..........................................................................................32
4.3.5.1 Defining Dimension Tables..............................................................................................................32
4.3.5.2 Columns of a Dimension Table........................................................................................................33
4.3.5.3 Limitations.......................................................................................................................................33
4.3.5.4 Dimensions and Navigation..............................................................................................................34
4.3.5.5 Loading data into Dimension Tables................................................................................................34
4.3.5.6 Special BW Dimensions...................................................................................................................34
4.3.5.6.1 Packet Dimension......................................................................................................................34
4.3.5.6.2 Unit/ Currency Dimension.........................................................................................................34
4.3.5.7 Dimensions with only one Characteristic (Line Item Dimensions)...................................................34
Introduction
This document provides background information on the techniques used to create InfoCubes,
the multi-dimensional structures within SAP BW, and provides suggestions to help the
customer in understanding when to apply the various techniques available.
2. References
For more detailed information on the SAP BW Architecture please refer to The BW ODS
Whitepaper and to the paper Hierachies in BW.
3. Overview
BW version 2.0 was a major step in the evolution of the BW architecture and functionality.
Most important in terms of architecture was the introduction of the new BW Operational
Data Store (BW ODS).
Note: The new BW ODS introduced with version 2.0B is not to be confused with the ODS layer in
version 1.2B. This layer has been renamed in Version 2.0B as Persistent Staging Area (PSA).
The BW ODS is a multi-level layer in the BW data warehouse that offers the functionality to
store the results of data cleansing and data transformation processes in transparent tables
called ODS Objects. In so doing the BW ODS forms the historical foundation of the data
warehouse.
To enable process integration, multiple BW ODS Objects can feed other ODS Objects or
InfoCubes. Business rules can be applied in the integration process. The number of ODS
Objects in the integration chain is not limited in BW.
The BW architecture graphic (see fig.01, p.2) illustrates that InfoCubes should be founded on
the integration layer for transactional data in the BW ODS. Furthermore the InfoCubes are
linked to common master reference data located in master data tables, text tables, and
(external) hierarchy tables. Thus the BW infrastructure provides the structure for building
InfoCubes founded on a common integrated basis. This approach allows for partial solutions
based on a blueprint for an enterprise-wide data warehouse.
Meta Data
Business Rules
CRM
Business Rules
Cleansing & Transformation
BBP
•Ad Hoc
Queries
Extraction
ETL Tools
•Reporting
Legacy •Applications
•Models
Integration
Granularity
Master Data
Change Service
Scheduling Monitoring
Management Management
(figure 01)
In the context of this paper, additional functionality is also offered through the ability to
report on members of the BW ODS Objects.
With regard to InfoCubes, BW ODS Objects can either be accessed directly or serve as
drilldown targets. (see fig.02, p.3)
Which BW structure (InfoCubes or ODS-Objects) to use as the foundation for reporting and
analysis, and in what circumstances, is not discussed in this paper but in The BW ODS
Whitepaper.
The focus of this paper is how to support Online Analytical Processing (OLAP) in BW.
OLAP functionality is one of the major requirements in data warehousing. In short, OLAP
offers even un-experienced end-users the capability to analyze business process data (KPIs)
in terms of the business lines involved. Normally this is done in stages, starting with business
terms showing the KPIs on an aggregate level, and proceeding to business terms on a more
detailed level.
Meta Data
Provider
Master Data
Change Service
Scheduling Monitoring
Management Management
(figure 02)
A simple example:
An ODS-Object may serve to report on a single record (event) level such as:
Show yesterday’s Sales Orders for Sales Person ‘Y’.
This does not mean that sales order level data cannot reside in an InfoCube but rather that
this is dependant upon particular information needs and navigation.
There are no hard and fast rules about the architecture of an enterprise data warehouse and
this will not be discussed in any further detail here. It is important to bear in mind that this
document deals only with the building of one part of a data warehouse with reusable objects,
namely InfoCubes, with master data, and (external) hierarchies.
In Chapter 2 this document provides initial information concerning the transition from an
information need to the common multi-dimensional data model / Star schema. As the BW
schema is based on the Star schema, an introduction to the Star schema will be given in
Chapter 3, and some general aspects explained. The BW schema is explained in detail in
Chapter 4, where modeling aspects that are derived directly from the BW schema are also
explained. Chapter 5 deals with time aspects in the BW schema and further demands which
might have to be designed with BW.
2. Subject Area
As this paper describes the process of modeling BW InfoCubes, it is assumed that the subject
area for which we want to create a solution is well defined. It may become apparent during
the modeling stages that the best solution would be to implement more than one InfoCube.
The criteria on which this decision should be made will be discussed in a separate chapter.
Address
...
Material DIM ID
OrgStr DIM ID
Time Code ID
SAP BW ....
Quantity
..... Build the solution as a
part of an integrated
data warehouse
(figure 03)
Examples may be the most efficient means of providing an understanding of how to approach
a Multi-Dimensional Model / Star schema and eventually a valid BW implementation, and of
introducing basic terms.
E.g. If the end-user describes his information needs and subject area as,
‘Track the performance of materials with respect to customers and sales persons’
The following nouns relate to the end-user’s information needs:
Material
Customer
Sales Person
The nouns are basic business terms and are usually called Strong Entities (see fig.04):
(figure 04)
Ask the end-user about the relationship between his basic business terms (strong entities).
Normally the relationship between strong entities are N:M Relationships i.e. a customer can
purchase multiple materials and materials can be purchased by multiple customers (see
fig.05):
(figure 05)
This will give you the basic Facts. Facts are normally additive and describe n:m
relationships. In a business scenario with a working document this document forms an
Intersection Entity which often resolves the n:m relationships to 1:n relationships. In the
first instance, however, it is up to the end-user whether or not to include the working
document in the model when analysing, for example, a sales transaction level (see fig.06):
Sales Transaction
Intersection Entity
(figure 06)
In the next stage the customer is asked to be more precise and, in this case, determine that
additional details for material, customer and sales person are also required.
This gives you additional entities and attributes where attributes are the “describing fields” of
an entity. In ERM diagrams attributes show the “fields” in relational tables.
The attributes demonstrate to what extent it is possible to store data concerning this entity
(see fig.07, p.9)
It is useful for the following steps to ask the end-user for details concerning relationships
between entities and relationships between entities and their attributes.
This draws your attention to any ‘abnormal’ situations like n:m relationships between an
entity and an attribute (s. material and color). These relationships have to be treated carefully
(see fig.08, p.9).
Sales Transaction
Date
Customer no
Material no
Sales pers no
Amount
Quantity
Currency
(figure 08)
Material Group
Price
Sales order
(figure 09)
After completing these steps you will have a good idea about the business terms involved and
how the relationships between them are configured. This provides a good basis for a
multidimensional model.
Even if the solution is not entirely SAP product based, or you plan to migrate a source legacy
system to R/3 for example in the future, the respective InfoSources should be considered.
(figure 10)
Overcoming model complexity involves the creation of a schema that is comprehensible for
both the end-user and the software.
In a Star schema, one dimension represents one table. These dimension tables surround the
fact table, which contains the facts (key figures), and are linked to that fact table via unique
keys, one per dimension table. Each dimension key uniquely identifies a row in the
associated dimension table. Together these dimension keys uniquely identify a specific row
in the fact table (see fig.11).
Star Schema
Material ID
Sales Rep ID
Material Name
LastName
Material Type
SalesDep
Material Group
Sales Org
Dimension Material ID Material
(Table) Sales Rep ID Dimension
Time Code ID (Table)
Customer ID
Customer ID Time Code ID
Customer Name Sales Amount Year
City Quantity Fiscal Year
Region Quater
Office Name Mounth
FACT (Table) Day of the Week
Customer
Dimension Time
(Table) Dimension
(Table)
(figure 11)
C
u
st
ome
rSt
r
eet S
a
le
sP
e
rs S
a
le
sR
e
gi
on M
a
t
e
tr
i
ra
l
l U
a n
it D
a
D
te
a
t
e
I
des
Gmb
h M
e
i
er M
o
ni
tor 9
8
11
18
C
u
st
om
me
r
eSa
l
esP
e
rs
Mat
er
ia
lD
at
eAm
o
un
tQ
ua
n
ti
ty
I
des
Gmb
hMe
i
er M
o
ni
tor 9
8
11
18 1
0
00 2
(figure 12)
The basic process of mapping an ERM to the MDM/ Star schema is shown on the following
graphic (fig.13):
Material Group
Region Sales Dept. Loc.
Price
Sales order
?
Unit Price
City Fiscal Year
Region Quater
Office Name Mounth
FACT Day of the Week
Customer Dimension
Time Dimension
(figure 13)
Address
...
Material DIM ID
OrgStr DIM ID
Time Code ID
....
Quantity
.....
(figure 14)
7. Resume
In his book ‘ The Data Warehouse Toolkit’, Ralph Kimball writes:
The nine database design decision points for a dimensional data warehouse consist of
deciding on the following:
1. The processes, and hence the identity of the fact tables ([one fact table - one
InfoCube…] -> intersection entities)
2. The dimensions of each fact table (-> strong entities)
3. The dimension attributes with complete descriptions and proper terminology (->
attributes and entities)
4. The grain of each fact table
5. The facts, including pre-calculated facts
6. How to track slowly changing dimensions
7. The aggregations, heterogeneous dimensions, mini-dimensions, query modes and other
physical storage decisions
8. The historical duration of the database (archiving aspects)
9. The urgency with which the data is extracted and loaded into the data warehouse (time
frame for loading)
(figure 15)
The answer is determined in two stages:
Browsing the Dimension Tables
Access the Customer Dimension Table and select all records with City = 'New
York'
Access the Material Dimension Table and select all records with Material
group = 'XXX'
Access the Time Dimension Table and select all records with Year = '1997'
As a result of these three browsing activities, there are a number of key values
(Customer IDs, Material IDs, Time Code ID), one from each dimension table
affected.
Accessing the Fact Table
Using the key values evaluated during browsing, select all records in the fact table
that have these values in common in the fact table record key.
Reporting
Star-III. Reports can be created by accessing the dimension tables (master data
reporting).
Star-IV. The Star schema saves information about events that did or did not happen
(e.g. reporting the revenue for the customers in New York within a certain time
span would show the customers that have revenue, but not the customers that have
no revenue).
Aggregation
Star-V. Only the information at the granularity of the dimension table keys (material
ID, customer ID, time code ID, sales rep ID) need to be stored to make any desired
aggregated level of information available.
Star-VI. More precisely: any summarized information can be retrieved at run time i.e.
as far as functionality is concerned, there is no need to store pre-calculated
aggregated data, but with large ( number of rows) fact tables and / or large
dimension tables, pre-calculated aggregates must be introduced for performance
reasons.
Attribute Relationships (Hierarchies)
In the Star schema there is one (real) attribute (most granular) as the unique
identifier of each dimension table row joining the fact table. The other attributes of
a dimension table are normally ‘parents’ of such identifying attributes, thus the term
hierarchy. With hierarchies numerous challenges must be resolved:
Star-VII. N:M relationship within a dimension.
There is no simple way to handle an N:M relationship between two attributes within
a dimension table (such as materials with different colors). If material is the lowest
level, it is not possible to put both material and material color into one normal star
dimension table, as we would have one material value associated with multiple
colors. As such, material is no longer a unique key.
Star-VIII. No leaf attribute values.
Again there is no easy way to handle transactional input to a Star schema where the
facts are offered at different attribute levels, whereby the attributes belong to the
same dimension. For example, assume the attributes material and material group
exist in the same dimension. Some subsidiaries can offer transactional data at
material level whereas others can only offer data at material group level. The result
in the latter case is dimension table rows with blank or null values for the material,
which destroys the unique key material.
Star-IX. Unbalanced hierarchies
Very often we have attributes in a dimension where a relationship exists between
some attribute values, whereas with others there is none. As the relations between
attribute values of different attributes within a dimension form a tree that will result
in paths of differing lengths from root to leaves, these unbalanced hierarchies will
produce reports with dummy hierarchy tree nodes.
Table Sizes and Performance
Schema Maintenance
Star-XI. There are no limitations to the Star schema with respect to the number of
attributes in the dimension and fact tables, except the limitations caused by the
underlying relational database.
Star-XII. Flexibility regarding the addition of characteristics and key figures to the
schema is caused by properties of relational databases.
Multi-Dimensional Schemas in BW
Based on experience with the Star schema, the SAP BW schema uses a more sophisticated
approach to guarantee consistency in the data warehouse and to offer schema-based
functionality to cover the end-users analysis needs.
Creating a valid multi-dimensional schema in BW means that you always have to bear in
mind the overall enterprise data warehouse requirements and the solution-specific analysis
and reporting needs. Errors in this area will have a deep impact on the solution, resulting in
poor performance or even an invalid schema.
1. Overview
The graphic shows a multi-dimensional BW schema using the example from the previous
chapters. Only those parts that are important as far as modeling is concerned are included
(fig.17).
S a le s R e p N u m b e r
S a le s R e p N u m b e r D im e n s io n M a te r ia l N u m b e r
M a te r ia l N u m b e r
M a te r ia l T y p e
S a le s D E P
S a le s O r g _ D im e n s io n _ ID M a t e r ia l_ D im e n s io n _ ID
M a te r ia l T e x t T a b le
S a le s R e p T e x t T a b le
S a le s R e p N u m b e r M a t e r ia l N u m b e r M a te r ia l N u m b e r
S a le s R e p N u m b er M a te r ia l N u m b e r
S a le s R e p N u m b er Language C ode
Languag e C ode S a le s O r g D im e n s io n T a b le M a t e r ia l D im e n s io n T a b le Language C ode
Langua g e C ode
M a te r ia l N a m e
S a le s R e p N am e
M a t e r ia l_ D im e n s io n _ ID
M a t e r ia l H ie r a r c h y T a b le
S a le s O r g _ D im e n s io n _ ID
In fo C u b e
V e rtri e b s o rg a n i s a ti o n
T im e _ D im e n s io n _ ID
C u s to m e r _ D im e n s io n _ ID R e g io n 1 R e g io n 2 R e g io n 3
C u s to m e r T e x t T a b le C u s to m e r N u m b e r Y ear
Q u a te r
C u s to m e r N u m b e r M o u n th
C u s to m e r N u m b e r
Language C ode C u s to m e r D im e n s io n T a b le D ay
Language C ode
C u s to m e r N a m e T im e D im e n s io n T a b le
C u s to m e r D im e n s io n T im e D im e n sio n
Observations:
The center of a multidimensional schema in BW forms the fact table.
In BW the facts of the fact table are called key figures (e.g. sales amount).
The fact table is surrounded by dimensions.
A dimension consist of different table types:
Dimension Table
In BW the attributes of the dimension tables are called characteristics (e.g.
material).
The meta data object in BW that describes characteristics and also key figures
(facts) is called InfoObject.
Master Tables:
Master Data Table
Dependent attributes of a characteristic can be stored in a separate table called
the Master Data Table for the characteristic. In BW they are called
terminology attributes (e.g. material type).
Text Tables
Textual descriptions of a characteristic are stored in a separate text table. The
system runs in different languages at a time.
Important
The use of the term hierarchy in BW is a possible point of confusion. The
normal understanding of hierarchy is defined as a sequence of parent-child
relationships between characteristics. From this perspective, there are
hierarchies in the dimension tables, master tables, and in hierarchy tables.
(figure 18)
2. The solution-independent shared master tables valid for use with any InfoCube and
BW ODS Object in the data warehouse.
These master tables are the glue that binds the data warehouse and are discussed in
depth in the next chapter.
In order to be able to cover all requirements master tables in a BW Schema are not linked
directly to InfoCubes, as the following, simplified, picture illustrates (fig.19):
Multi-Dimensional Schema in BW
Master Text
SID Tables Hierarchies SID Tables Hierarchies
Master Text
Master Text
(figure 19)
As you can see, pointer or translation tables called SID (Surrogate-ID) tables are used in the
BW schema to link the solution-independent master tables of the BW schema to InfoCubes.
The graphic shows a simplified version of what types of SID tables exist and their tasks are discussed
in detail in the section on the SID table.
3. Dimensions in a BW schema
Earlier we introduced some basic rules in defining dimensions on the results of prior
analysis:
Attributes with 1:N conditional relationships should be stored in the same dimension
such as material group and material.
The foreign -> primary key relations define the dimensions.
Once a decision on the members of a dimension has been made we have to consider that a
dimension in the BW schema might consists of different parts (fig.20):
M a te r ia l M a te r ia l M a s te r T a b le
D im e n sio n
M a t e r ia l N u m b e r
M a te r ia l N u m b e r
M a te r ia l T y p e
M a te r ia l_ D im e n s io n _ ID
M a t e r ia l T e x t T a b le
M a te r ia l N u m b e r M a t e r ia l N u m b e r
M a te r ia l N u m b e r
L a ngu a ge C o d e
M a t e r ia l D im e n s io n T a b le L an g u ag e C o d e
M a t e r ia l N a m e
M a te r ia l H ie r a r c h y T a b le
V e r trie b s o rg a n is a ti o n
R e g io n 1 R e g io n 2 R e g io n 3
G e b ie t 1 G e b ie t 2 G e b i e t 3 G e b i e t 3 a G e b ie t 4 G e b ie t 5 G e b ie t 6 G e b ie t 7 G e b ie t 8
(figure 20)
We emphasize that:
Dimensions in a BW schema
The dependent attributes of the characteristics can reside in different locations of a BW
schema dimension.
One of the primary goals of this paper is to show the different modeling aspects that result in
a different location of an attribute in a dimension of a multi-dimensional BW schema (fig.21,
p.22).
Material Dimension
Material
Dimension table
Material
As a Characteristic ?
Material
Master table
As a Navigational /
Display Attribute ?
Materialgroup
As a Hierarchy ? Material
Hierarchy table
(figure 21)
As the graphic shows, the material-material group relation can be designed defining material
group
Either as a characteristic i.e. member of a material dimension table
Or as an attribute i.e. member of the material master table
Or as a node-describing attribute of the material hierarchy table
Or as any combination of the above options.
Which option best fits individual needs depends primarily on the desired time aspects in your
queries, and is discussed in chapter 5.
Important
To avoid confusion we emphasize:
In BW the terms characteristic and attribute refer only to the different locations in the
schema. As shown above, even within the same schema ‘material group’ can occur as a
characteristic in the material dimension table and as an attribute of material in the material
master data table.
When no reference is being made to specific schema location (as with the meta data
definition), the term InfoObjects of type characteristic is used.
3. Assigning Attributes
The attributes of a characteristic that will reside in its master data table are determined in the
modeling phase. The attributes are added using the ‘attributes’ tab page in InfoObject
maintenance.
These attributes form the communication structure for the InfoSource to load the master data.
There is one ‘time dependent’ check box for each attribute in the ‘attribute’ tab page
section.
Time dependency of an attribute allows you to keep track on the changes over time of the
relation of the characteristic and the time dependent attribute values.
In terms of technical implementation, two master data tables exist if we have both non-
time dependent and time dependent attributes.
One master data table stores all relations to non-time dependent attributes (name of
the table: /BIC/Pinfobjectname) and
One table stores relations to time dependent attributes (name of the table:
/BIC/Qinfobjectname).
The time dependent attributes master data table has additional DATETO and
DATEFROM system attributes. In queries the different constellations are addressed using
the key date (-> Query properties). The validity attributes are not available for navigation.
Note: The table names of BW business content InfoObjects start with /BI0/ ...
A closer look at the reporting possibilities of time dependent attributes is given in chapter 5.
Important
There are no pre-calculated aggregates at time-dependent attribute level!
7. Compound Attributes
Characteristics may not be unique i.e. another attribute is necessary to allow the data to be
addressed. Example: the InfoObject 0COSTCENTER (cost center) offered from R/3
applications is only unique with the InfoObject 0CO_AREA (Controlling Area).
Additional attributes can be defined in the compound tab page section of InfoObject
maintenance.
2. Text Tables
The text table of an InfoObject of type characteristic keeps the descriptions of the
characteristic values. The existence of a text table and different description types as short,
middle and long text descriptions and language dependency can be defined in the master data
tab page section.
The text table, or better the description attributes, may be defined as time dependent.
Transfer rules may be applied during text data load.
3. SID Tables
SID tables play an important role in linking the data warehouse information structures to the
subject-oriented InfoCubes and ODS Objects.
To speed up access to InfoCubes and to allow an InfoCube and ODS-Object independent
master data layers, each characteristic and attribute is assigned a SID column and their values
are encoded into 4-byte integer values.
Note:
The algorithm to determine a SID value works fastest if the characteristic does not exceed the
numerical size of nine as in this case the characteristic values will be the SID. No traditional
SID table has to be accessed as the characteristic or attribute values correspond 1:1 to their
SIDs.
Example:
Supposing the InfoObject ‘material’ has both ‘non-time dependent’ and ‘time dependent’
attributes. The activation of this InfoObject generates the following tables (for illustration
purposes we will use the example from the master table section):
Materiall
AAAMatType
BBB 100
CCC 200
DDD 100
100
Non-Time Dependent Attribute Master Data
(table
Tablename:
Material-SID Material
001 AAA
002 BBB
003 CCC
004 DDD
To get an understanding of the function of these SID tables a simple example is given as to
how the result of a query is evaluated. If we need the following information:
Show me the sales amount for customers located in 'New York' with material group
'X' and ‘Y’ in the year = '1999'
Let us assume that the material group is a navigational attribute (non-time dependent) of the
characteristic material in the material master data table and we have no predefined aggregates
at material group level.
How the different material dimension tables operate together to access the InfoCube fact
table is shown in the following picture (fig.29, p.29):
Material
MaterialMaster
Mastertable
table Example: Show me the sales values for material group X
(Name: /BIC/PMATERIAL)
(Name: /BIC/PMATERIAL) and Y
Material MatGroup
MatGroup SID MatGroup
AAA X
CCC Y X 345
DDD Y 678
Y MatGroup
Z 999 MatGroupSID
SIDtable
table
Not used for Infocube access ! (Name:
(Name:/BIC/SMATGROUP)
/BIC/SMATGROUP)
(figure 29)
The result set for the material groups is then determined in two steps:
Browsing the tables that form the dimensions
Material dimension
Access the ‘traditional’ material group SID table and select the material
group SIDs (here ‘345’ and ‘678’) for material group = 'X' and ‘Y’
Access the material non-time dependent attribute SID table with these
material group SIDs and determine the material SID values (here ‘111’,
‘222’ and ‘333’).
Access the material dimension table with these material SID values and
determine the material dimension table Dim-Id values (here ‘1’, ‘2’ and
‘3’)
Customer dimension: same proceeding
Time dimension: same proceeding
As a result of these three browsing activities, there are a number of key values
(material dimension table Dim Ids, customer dimension table Dim-Ids, time
dimension table Dim Ids), one from each dimension table affected.
Accessing the fact table
Using the key values (Dim-Ids) determined during browsing, select all records in
the fact table that have these values in the fact table record key.
We can summarize that in accessing an InfoCube no ‘real value’ master data tables are used.
The following graphic illustrates this (fig.30):
(figure 30)
2. Or (exclusive) allow time dependency for each external hierarchy node (time
dependent structure)
With both structure types you can allow intervals for the leave nodes, which makes the
definition of the external hierarchy easier.
Important
In terms of performance, it is important to know that with external hierarchies of type 1
pre-calculated aggregates are possible at each level, even for specific node values.
With external hierarchies of type 2 there are no pre-calculated aggregates.
(figure 31)
Fact 11 1711 1
Table 22 1712 1
33 2711 2
44 3711 3
55 4711 4
66 5711 5
77 6711 6
(figure 32)
A node of a hierarchy can either be textual or it can be an InfoObject with a specified value
e.g. InfoObject ‘material group’ with value ‘X’. All display attributes of the InfoObject
‘material group’ are associated with this node.
Important
BW does not force you to only assign related characteristics to the same dimension table,
offering you additional schema potential. Nevertheless, as a basic rule you should only
put characteristics that have a parent-child relationship in the same dimension.
The activation of the InfoCube then results (with one exception which we will discuss later)
in the generation of an InfoCube dimension table for each dimension.
11 1711 1
22 1712 1
33 2711 2
44 3711 3
55 4711 4
66 5711 5
77 6711 6
(figure 33)
In the BW schema a surrogate key is used as a unique key with each dimension table and not
the real most granular characteristic within the dimension. For example, for each unique
combination of SID values for the different characteristics within a dimension table there is a
unique surrogate key value assigned. The dimension tables are joined to the fact table using
surrogate keys in BW.
Important
The use of a surrogate key as a unique key in a dimension table allows modeling patterns
such as N:M relationships within the same dimension or leafless hierarchies, and most
importantly, it allows you to follow up changes of constellations between values of different
characteristics within the same dimension over time (time rows). This will be discussed in
depth in chapter 5.
3. Limitations
An InfoCube allows
16 dimensions
3 dimensions exist with each InfoCube (whether they are used and thus visible or
not)
Time dimension
Unit/ currency dimension
Packet dimension
Important
It should be noted that in wider usage each attribute / characteristic is sometimes called
a dimension. This a potential point of misunderstanding as then saying that the BW
schema has 16 dimensions, three of which are used internally, may sound very limited.
According to this definition of a dimension there are 13 X 248 dimensions possible with
BW plus the dimensions defined by the navigational attributes.
6. Special BW dimensions
With BW we have special predefined dimensions:
Time dimension
Unit/ currency dimension
Packet dimension
1. Packet dimension
With every load into an InfoCube there is a unique packet-ID assigned. This allows you to
purge erroneous loads without recreating the whole InfoCube again. The packet dimension
can increase overheads during querying and can therefore be eliminated using the compress
feature of the InfoCube after proven correctness of the loads up to a certain packet-ID.
Important
If you are not interested in unit or currency calculations you should define the key figures
as numbers and then introduce the unit in the key figure header (i.e. sales in HL). This
will reduce overheads.
This will probably occur with specific reporting requirements or if for example you have the
document line item in your model (see chapter 5 for all scenarios except no.3).
In these situations a dimension table means only overhead. BW allows you define this kind
of dimension as a line item dimension (Check box dimension definition).
In doing this no dimension table will be generated for this dimension. A dimension table will
serve the SID table of this characteristic. The key in the fact table will be the SID of the SID
Table (fig.34).
Line item dimension:
Line-Item
5 5
Dimension
5
5
2 4 5
3 5
3 1 2
5 5
5
2 3
5
(1) Fact Table
5 5
3 3
(2) Dimension Tables
5
(3) time-independent-SID
(4) time-dependent-SID
5 5
(5) ‘traditional‘ SID
(figure 34)
4. Fact table
The fact table is created during InfoCube activation. The structure of the fact table in the BW
schema is the same as it is in the normal Star schema. The keys of the dimension tables (i.e.
the dim-IDs) or the SIDs of line item dimensions are the foreign keys in the fact table. The
non-key columns are defined by the selected key figures during InfoCube definition.
Each row in the fact table is uniquely identified by a value combination of the respective
DIM IDs/ SIDs of the dimension/ SID Tables
Since the BW uses system-assigned surrogate keys, namely DIM IDs or SIDs of 4 bytes
in length per dimension to link the dimension / SID tables to the fact table, there will
normally be a decrease in space requirements for keys in comparison to the use of real
characteristic values for keys.
The dimension / master (SID) tables should be relatively small with respect to the number
of rows in comparison to the fact table (factor 1:10 / 20).
5 5
2 Multiple
Fact Tables 5
4 5
5
E
3 5
3 2
5 5
F
5
3
5
(F) F-Fact
(F) F-Fact Table
Table Requid
Request >0 2 5
> 0E-Fact Table Request = 0
(E)
(E) E-Fact Table Requid
=0
3 3 5
(2) Dimension
Tables 5
(3) time-independent-
(4)
SIDtime-dependent- 5 5
(5)SID‘traditional‘
SID 35)
(figure
Both fact tables have the same columns. The F-table uses b-tree indexes the E-Table uses
bitmap indexes except for line item dimensions where a b-tree index is used.
The InfoCube compression feature moves the fact records of all selected requests from the F-
to the E-fact table. In doing so the request-ID of each fact record is set to zero.
The separation into two fact tables is fully transparent.
5 5
Time
Dimensio Partitioning
n 5
Fact Tables
5 4 5
E 5
2 3
3
5 5
F
5
3
5
(F)
(F)F-Fact
F-FactTable Request
Table >
Requid 5
0
> 0E-Fact Table Request =
(E)
(E) E-Fact Table Requid Packe
0 Dimensio
t
=0
(2) Dimension 3 3n
Tables
(3) time-independent-
(4)
SIDtime-dependent-
(5)SID
‘traditional‘
SID
(figure 36)
Together with the entire value range for the partitioning InfoObject that you would expect
and the optional maximal number of partitions, the value range for each partition is
determined.
Note: Partitioning is a database functionality. Have a look at the OSS to find out how and to
what extent your database provider supports partitioning!
For example:
Let us assume we want to partition a fact table using 0CALMONTH. We want to
have data in our fact table starting from ‘199901’. Let us further assume that we
expect a lifespan of our InfoCube up until ‘201012’. Without specifying a maximum
value for the partitions we would have
11 years x 12 month + 2 = 134 partitions
The additional 2 partitions are reserved for data which have a 0CALMONTH value
less or larger than our expected values.
To bring in 1 quarter in each partition we proceed as follows :
134 Partition / 4 = 33,5 => maximum = 34
Important
Partitioning for a fact table has to be defined before you activate the InfoCube. It cannot
be done afterwards!
Fact table partitioning as described above only affects E-fact tables. F-fact tables are
automatically partitioned by the request-ID. For this and other reasons do not forget to
compress your InfoCube on a regular base!
BW Terminology
3.
The following picture shows differences in the terminology (fig.37):
(figure 37)
Important
It should again be noted that generally attributes/ characteristics are sometimes called
dimensions. This a potential point of misunderstanding as saying that the BW Schema offers
16 dimensions, three of which are used internally, sounds very limited. Using this definition
of a dimension there are actually 13 X 248 dimensions possible with BW plus the dimensions
defined by the navigational attributes.
Analysis
Aspects
Global
Performance
Data Warehouse
Aspects
Design Aspects
(figure 38)
5. Granularity
An important result of the data modeling phase is that the granularity (the level of detail of
your data) is determined. Granularity deeply influences
Reporting capabilities
Performance
Space needed
Load Time
You have to decide whether you really need to store detailed data in an InfoCube or whether
it is better in an ODS object or even not stored in your data warehouse at all, but accessed
directly from your Source system via drill thru.
These decisions are decisions that do not only influence your current scope, but the entire
approach to and architecture of your data warehouse.
This topic is discussed in a special paper.
500 X 300 X 12 = 1,800,000 records in the fact table per year due to only these two
attributes if on average 500 articles are sold within an hour
Finally, assuming 500 outlets, there will be 900,000,000 records a year in the fact table.
2. Impacts on Storage
Quite obviously granularity directly impacts the storage space needed. As it stores the
transaction data, the fact table is the largest table in the InfoCube. Therefore, estimating the
size of the fact table provides a rough idea of the space required for the InfoCube.
For each dimension table a four-byte integer DIM ID (dimension ID) is used, in conjunction
with the other DIM IDs, to point to the associated row of data in the fact table. In addition,
the length of all the key figures in the fact table must be considered:
((Number of DIM IDs) * 4 + (total length of all key figures)) * number of records
Important
Remember the three dimensions required are time, unit, and packet.
3. Impacts on Performance
Large fact tables impact on reporting and analysis. Apart from hardware considerations, there
are a few additional considerations to bear in mind.
Aggregation
For large fact tables consider the use of pre-calculated aggregates. For implications,
such as an increase in the storage space required, see earlier sections of this paper.
Partitioning
Partition the fact table. The option exists to divide a table with respect to the values of
a specific attribute, into several physical tables. This process is transparent to the user.
This technique is useful with large fact tables because it provides access via smaller
indexes.
Material
As a Characteristic ?
Material
Master table
As a Navigational /
Display Attribute ?
Materialgroup
As a Hierarchy ? Material
Hierarchy table
(figure 39)
The freedom to choose between the different locations of dependent attributes is actually
restricted as the reporting behavior and possibilities differ and depend upon the location.
Thus the reporting needs investigated during the blueprint phase of the project normally
define the location of a dependent attribute. This is discussed in detail in the following
chapters.
Materialgroup SID
Mat Mat-SID Material Dimension Table
AAA 001 Mat-GR-SID
Mat-GR-SIDMat-SID
Mat-SID Mat-DIM-ID
Mat-DIM-ID Fact Table
BBB 002
910
910 001
001 111
111
CCC 003
Mat-DIM-ID
910
910 002
002 222
222 Mat-DIM-IDTime-DIM-ID
Time-DIM-ID Revenue
Revenue
DDD 004
920 002 666 111
111 09/1998
09/1998 100
100
EEE 005 920 002 666
920 003 333 Fact
222 Table
09/1998 100
920 003 333 222 09/1998 100
Material SID 920
920 004
004 444
444 333
333 09/1998
09/1998 100
100
920
920 005
005 555
555 444
444 09/1998
09/1998 100
100
Mat-GR Mat-GR-SID 111
111 10/1998
10/1998 100
100
X 910 222
222 10/1998
10/1998 100
100
333
333 10/1998
10/1998 100
100
Y 920
444
444 10/1998
10/1998 100
100
Add new record to dim table
555
555 10/1998
10/1998
10/1998 100
100
Add new record
to fact table
(figure 40)
Changes in the relationship between the values of parent-child attributes within a dimension
are discussed in detail in the next chapter.
We will use the following example to explain the different time scenarios (fig.41):
Constellation 09/1998:
Material Material group
AAA X
Fact Table
BBB X
Material Date Revenue
CCC Y
AAA 09/1998 100
DDD Y
BBB 09/1998 100
CCC 09/1998 100
Constellation 10/1998: DDD 09/1998 100
The reader is invited to implement this little example (just 9 rows in the Fact Table) on BW
to verify the following scenarios:
1. Scenario I: Description
(figure 43)
Real example:
This time scenario typically occurs with sales forces.
When the assignment of sales persons to customers changes to a new sales person-customer
constellation, all the sales data from earlier times will be reported as if they always referred
to the new sales person. This requirement means a realignment of the fact data to the new
constellation.
(figure 44)
The parent attribute (material group) resides in the master data table of the child
characteristic (material) (BW Admin WB: InfoObject maintenance-> attributes).
The parent attribute has to be defined as a navigational attribute to allow drill and filter
functions (BW Admin WB: InfoObject maintenance-> attributes and InfoCube
maintenance -> navigation).
2nd Solution:
Today is yesterday or today’s constellation is the truth – 2nd solution:
Define the dependent attribute of your multi-dimensional model as a node attribute of an
external hierarchy of your characteristic.
(figure 45)
Parent attribute resides in the hierarchy table as node attribute of an external hierarchy of
the child characteristic.
No time-dependent hierarchy name, structure or versions are necessary for the external
hierarchy to implement this scenario.
Important
1. Scenario II : Description
(figure 46)
This scenario may be of interest if you want to report the effects of organizational changes.
Example:
When the Materials are reorganized using new material group assignments, this scenario
would allow one query to report your last years sales data with today’s material assignment
and another query with the material assignment which was valid last year, offering a
fundament for comparisons.
A FAQ may be how to handle revenues in the fact table that cannot be assigned to a material
because they do not exist in yesterday’s master data.
(figure 47)
The material group is a time-dependent navigational attribute of material (BW Admin WB:
InfoObject maintenance-> attributes).
As emphasized above there would be no pre-calculated aggregates possible at material group
level.
Important
The key date of a query allows you to address different master data records with the
same characteristic value.
This key date is valid for all master records of characteristics having time dependent
attributes.
Using the time-dependent feature you are not able to report more than one master
record (constellation) for a characteristic value at a single query execution.
2nd Solution:
Today is yesterday or today’s constellation is the truth – 2nd solution:
Define the dependent attribute of your multi-dimensional model as a node attribute of an
external hierarchy of your characteristic where the entire hierarchy or even the structure is
time dependent.
Keydate
Keydate==09/1998
09/1998
Report using yesterday‘s constellation
Material Hierachy Table Material group Rev 9/98 Rev 10/98
-1 -1
(All) (All)
+ X 200 200
-2 -3 -2 -3 + Y 200 200
(X) (Y) (X) (Y) not assigned 100
(figure 48)
Allow versions and/ or entire hierarchy time dependent or even time-dependent structures for
external hierarchies of the child characteristic (material) (BW Admin WB: InfoObject
maintenance-> hierarchies).
The parent attribute resides as a node attribute of an external hierarchy in the hierarchy table
of the child characteristic (BW Admin WB: InfoObject maintenance-> hierarchies).
Important
If all dependent attributes of a characteristic are navigational (time dependent or not) or are
display attributes in the characteristic’s master data table or nodes (time dependent or not)
of an external hierarchy (time dependent or not), then remember you have the option to
define this characteristic as a line item dimension.
This scenario is of interest if you want reports that track the organizational changes (time
rows), for example with Human Resources.
(figure 50)
The parent attribute (material group) resides as a characteristic in the dimension table of the
child characteristic (material) (BW Admin WB: InfoCube maintenance -> characteristics).
If the parent characteristic is not delivered via transaction data load an update rule has to be
created to determine the parent characteristic value via automatic lookup in the
characteristic’s master data.
constellation changes and to assign the validity of such constellations implicitly via the time
in the fact table.
Scenario IV: Report only on data for constellations valid today and yesterday -today
and yesterday-
(figure 52)
During master data load the user DateTo value of the old master record has to be updated.
Hint: Define time variables with intervals for DateFrom and DateTo to allow flexible
reports and analysis (BEx Query Builder).
For example, to make a query with comparable data for the period 9/1998 to 10/1998 you
have to define the intervals as follows:
(userdefined) DateFrom: 011900 - 091998
(userdefined) DateTo: 101998 – 129999
The query key date must be in 9 or 10/1998
If, on the other hand, the end-user has a real need to report using different time scenarios the
following rules have to be observed:
Furthermore we realize that there is an impact on performance with certain time scenarios:
Pre-calculated aggregates are not possible on the time dependent attribute level.
Introducing time dependency for an attribute where it is not strictly necessary may
render performance improvements impossible. The same is true with external
hierarchies that are structure time dependent.
Material Color
Color is an attribute of the characteristic ‘material’. A material can have multiple colors and
vice versa. According to the standard process, color should be in the master data table for
material, like material type. But this is not possible because the material is the unique key of
the master table. We cannot have one material with multiple colors in the master table. (This
is a typical challenge with Star schemasStar-VII.).
(figure 54)
Compound attributes
If you can avoid compounding - do it!
Compound attributes always mean there is an overhead with respect to:
Reporting - you will always have to qualify the compound attributes within a query
Performance
Bear in mind:
Compounding always implies a heritage of source systems and just because it makes sense
within the source systems does not necessarily mean that it will also make sense in data
warehousing.
Remember that data warehousing does not mean copy management!
4. Inflation of dimensions
It might happen that your multi-dimensional model shows you a lot of ‘small’ dimensions.
‘Small’ in this regard means dimensions that will have only one or two characteristics,
whereby these characteristics have only a few values.
Bear in mind the following:
The limitations with respect to the number of dimensions within a BW schema.
The possible overhead produced during query execution by having to join many
dimension tables to a large fact table
A possible solution to overcome these:
Combining ‘small’ dimensions to overcome dimension inflation
The BW schema does not enforce that only related characteristics are brought into one
dimension table. This allows you create a dimension (table) collecting more or less unrelated
characteristics from ‘small’ dimensions.
You must observe that the number of expected combinations of characteristics values should
of course not be the Cartesian product!
Another aspect is usability i.e. for query authors you have to create a meaningful dimension
name (like ‘scenario dimension’), which allows him easy navigation of the model in the
query builder.
ONUM: Order Number (C) ONUM: Order Number (C) ONUM: Order Number (C)
ODAT: Order Date (C) DDAT: Delivery Date (C) BDAT: Billing Date (C)
SALP: Sales Person (C) DELP: Delivery Person (C) BILP: Billing Person (C)
OQTY: Order Quantity (K) DQTY: Delivered Quantity (K) BQTY: Billing Quantity (K)
OPRI: Order Price (K) DPRI: Delivery Price (K) BPRI: Billing Price (K)
(figure 55)
The question is whether there are general rules on how to implement reporting scenarios in
BW that consist of sub-scenarios.
6. MultiCubes
Looking at the example introduced above you might come to the conclusion that as you
frequently want to report data from these processes together, the first step might be to create
one common multi-dimensional model and subsequently one Infocube.
Creating a solution using one InfoCube without any further schema improvements we would
achieve (fig.56):
O r d e r - D e liv e r y - B illin g C u b e
ONUM CUS PROD ODAT SALP DDAT DELP BDAT B IL P OQTY OPRI DQTY DPRI BQTY BPRI
1 C1 P1 1998 S1 * * * * 5 100 0 0 0 0
2 C2 P1 1998 S2 * * * * 10 200 0 0 0 0
3 C1 P2 1997 S3 * * * * 4 130 0 0 0 0
4 C2 P2 1997 S2 * * * * 8 150 0 0 0 0
4 C2 P2 1998 S2 * * * * -2 -4 0 0 0 0 0
1 C1 P1 * * 1 99 8 D2 * * 0 0 5 1 00 0 0
2 C2 P1 * * 1 99 9 D1 * * 0 0 7 1 20 0 0
2 C2 P1 * * 1 99 9 D2 * * 0 0 3 80 0 0
3 C1 P2 * * 1 99 8 D1 * * 0 0 2 60 0 0
4 C2 P2 * * 1 99 8 D2 * * 0 0 6 1 10 0 0
1 C1 P1 * * * * 1 99 9 B1 0 0 0 0 5 1 00
2 C2 P1 * * * * 1 99 9 B1 0 0 0 0 10 2 00
3 C1 P2 * * * * 1 99 8 B2 0 0 0 0 4 1 30
O N U M C U S P R O D O D A T S A LP O Q TY O P R I
O rd e r-C u b e
1 C 1 P 1 1 9 9 8 S 1 5 100
2 C 2 P 1 1 9 9 8 S 2 10 200
3 C 1 P 2 1 9 9 7 S 3 4 130
4 C 2 P 2 1 9 9 7 S 2 8 150
4 C 2 P 2 1 9 9 8 S 2 -2 -4 0
O N U M C U S P R O D D D A T D E LP D Q TY D P R I
D e liv e r y - C u b e 1 C 1 P 1 1 9 9 8 D 2 5 100
2 C 2 P 1 1 9 9 9 D 1 7 120
2 C 2 P 1 1 9 9 9 D 2 3 80
3 C 1 P 2 1 9 9 8 D 1 2 60
4 C 2 P 2 1 9 9 8 D 2 6 110
O N U M C U S P R O D B D A T B IL P B Q TY B P R I
B illin g - C u b e 1 C 1 P 1 1999 B 1 5 100
2 C 2 P 1 1999 B 1 10 200
3 C 1 P 2 1998 B 2 4 130
(figure 57)
… and based on these Basic InfoCubes a MultiCube, a query showing sales and delivered
quantity, would look like this (fig.58):
Two queries are sent in parallel to the order and delivery cube. The subsequent union creates
the result table (fig.60).
Multi-Cube Queries
Sales
Delivery
Billing
Basic-Cube Queries Multi-Cube Basic-Cube Queries
Sales Billing
Cube Cube
Delivery
Cube
Basic-Cube Queries
Example (fig.61):
CUS PROD DAT ValType QTY
C1 P1 199801 P 10
C2 P1 199801 P 10
C1 P2 199801 P 4
C2 P2 199801 P 8
C1 P1 199801 F6 80
C2 P1 199801 F6 70
C1 P2 199801 F6 30
C2 P2 199801 F6 60
(figure 61)
It is important to remember that reporting the sales amount here is not meaningful
without specifying the ValType (as a filter, in a restricted key figure). For example, you
would summarize plan data and forecast data.
Thus incorporating both features (the MultiCube and a partitioning attribute) provides
successful implementation (fig.62):
Multi-Cube Queries
Plan /Actual
Multi-Cube
Basic-Cube Queries Basic-Cube Queries
Plan,
Forecast.. Actual Data
Data Cube
Cube
(figure 62)
Sometimes key figure attributes must be integrated into the fact table
On the other hand, price is continuous over time and that means that it does not make sense
to calculate discounts on the basis of sales amount and quantity in a fact record using the
actual price from the master data table as described above with fact records which are for
example one year old.
In this case the discount has to be calculated during load time in an update rule addressing
the actual price via lookup to the master data table.
In terms of reporting, it can also be of interest to store attribute key figures additionally as a
characteristic or an attribute of type characteristic.
Example:
Sales Employee, Delivery Employee, Billing Employee
Create one InfoObject ‘employee’. Create other characteristics as InfoObjects that refer to
‘employee’.
It makes often sense to add ‘employee’ to the schema separately to facilitate simple questions
like “show me all transactions where a specific employee was involved in no matter what
role”.
(figure 63)
2. Counting
Often it makes sense to add separately an artificial key figure to allow easy counting. ‘1’
represents this key figure during the load for each record.
9. Big dimensions
During modeling the question of how to deal with dimension and master tables with
hundreds of thousands or even millions of records may be raised.
=Use line item dimensions
This situation often occurs with larger customer dimensions. In brief one solution may be to:
(figure 64)
Performance aspects:
Queries to InfoCubes that use hierarchies of this kind are generally faster than the same
queries to InfoCubes that model the same scenario with one of the two other hierarchy
modeling techniques.
BW does not automatically know about any hierarchical dependencies. Therefore pre-
calculated aggregates that summarize data over ‘regions’ are not used for queries that
summarize over ‘countries’ if the country is not included in that pre-calculated
aggregate as well. You should, therefore, always include hierarchical levels to an
aggregate that is above the level over which data is summarized.
Example 1: If an aggregate summarizes data over 0REGION then do include
0COUNTRY in that aggregate too.
Example 2: If an aggregate summarizes data over months then do include years, decades,
etc. too.
The reporting aspects of this technique are:
BW does not explicitly know about the hierarchical dependencies. Therefore there is no
predefined drill down path with this hierarchy design.
4. External Hierarchies
This is the ideal type if a hierarchy (fig.65)
frequently changes
has no fixed number of levels (sometimes referred to as a "ragged" or “unbalanced”
hierarchy).
unbalanced hierarchy
(figure 65)
A typical example is a cost center hierarchy in which several (sub-) cost centers belong to
one cost center which itself belong to another cost center and so on. Such a hierarchy has no
fixed number of levels as cost centers usually correspond to departments or groups within a
company, which might be reorganized into new subgroups. Thus new levels might be
introduced, old ones disappear. The hierarchy might be deeper at one end (due to a deeper
hierarchical organization) and shallower at the other.
Another major advantage of external hierarchies in comparison to their alternatives is that an
InfoObject can have several such hierarchies and all these can be used within the same cube.
With the alternative approaches the same effect could only be achieved through difficult
work-arounds.
Performance issues connected to this type of hierarchy are as follows:
These hierarchies do not usually perform as well as those modeled within dimensions.
They usually perform at least as well as the hierarchies based on navigational attributes.
Problems can arise for large external hierarchies with many thousands of nodes and
leaves. In that case it might be better to consider one of the two alternatives.
Types of external Hierarchies:
Versions and/or time dependency of the whole external hierarchy structure (DateTo,
DateFrom) - there are pre-calculated aggregates at each level even for specific node
values possible
Or (exclusive) time dependency for each external hierarchy node (time-dependent
structure) - there are no pre-calculated aggregates possible.