Professional Documents
Culture Documents
Outline
OLAP/OLTP Review of Star Schema Dimension Tables and Fact Table Real world changes SAP BI Enhanced Star Schema Fact Table Dimension Tables Master Data Tables MetaData Objects
2
Informational (OLAP)
Summarised Snapshot records, no updates allowed Timestamp on each record Used by management Built without knowing requirements Supports mixed workload Data designed for optimal access Mainly historical data Data is integrated Referential integrity is not useful High availability is nice to have
Product Dimension Customer Dimension
Sales Dimension
Quantities
Revenues
Costs Taxes
Time Dimension
Competition Dimension
normally by adding rows to the fact table. More precise real world changes like Customer 4711 purchase Material BBB at Day 19980802 for $100 creates a new record in the fact table, which is identified by the combination of key attributes in the dimension tables.
Adding Records
Fact Table
Date ID Year Fiscal Year Quarter Month
Time Dimension
Customer Dimension
Material Dimension
SAP BI Schema
The multi-dimensional model in SAP BI is based on the SAP BI schema, which was developed as an enhanced star schema as a response to problems experienced with the classic star schema. The enhancement comes from the fact that the dimension tables do not contain master data information! Master data is stored in separate tables, called master data tables (outside the dimension tables).
Snowflake model
SAP BI uses a snowflake model instead of the star schema Further normalization and expansion of the dimension
tables in a star schema result in the implementation of a snowflake design. A dimension is said to be snowflaked when the lowcardinality columns in the dimension have been removed to separate normalized tables that then link back into the original dimension table.
10
Dimensional Models
11
Snowflake
12
attributes which define information at different grains (detail) The sets of attributes of the same dimension table are being populated by different source systems (very common in data warehouses)
13
2. The fact table is surrounded by several dimensions. 3. A dimension consist of different table types: Dimension Table
Attributes of the dimension tables are called
characteristics (e.g. material). The meta data object in BI that describes characteristics and also key figures (facts) is called InfoObject.
14
Fact table
Consists of Dimensional Keys and Key Figures (facts).
Dimension table
Acts as a link between Master data and Fact table records
InfoCube
Consists of Fact and Dimensional tables.
15
InfoCubes
InfoCubes are the central objects of the multi-
dimensional model in SAP BI Reports and analyses are based on these InfoCubes It is a self-enclosed dataset for a business area from a reporting viewpoint Queries can be defined and executed on the basis of an InfoCube
16
InfoCubes
InfoCube consists of a number of relational tables arranged
together-
Fact Table One table in which key figures are stored. Max 233 key
figures! Dimension Tables Linked by SID tables to the master data tables. (Remember master data is not part of the InfoCube. Those are stored and maintained outside the InfoCube.) Dimension Grouping of logically related characteristics. SAP BI allows a total of 16 dimensions. Max 248 characteristics per dimension.
17
SAP BI Schema
18
Types of InfoCubes
Standard Cube
Physically contains data in the database They are data targets ie. data can be loaded into it A type of InfoProvider BI objects are called InfoProviders when queries can be
executed based on them Standard InfoCubes are technically optimized for read access. Virtual Cubes (Virtual Provider) Only represent logical views of a dataset Data resides in data source
19
Repository Choose InfoCube Find the InfoCube you want to view Eg. SAP Demo Sales and Distribution overview 0D_SD_C03 Choose InfoCube - schematic display as star schema
20
1.
Right click and Display data 3. Click on Fld Selection for output. 4. Select the fields (characterisitcs and key figures that you want) 5. Execute 6. Choose value ranges (if desired) 7. Execute 8. Request export to a local spreadsheet file 9. View the data in the spreadsheet. Note that this is a flat file 21 derived from a relational database (star schema)
2.
Terms used
22
23
24
Additional information about characteristics is referred to as master data. Master data types:
Attributes Texts (External) Hierarchies
Eg. the attribute 'material group' is stored in the attribute table, the text description for 'material name' is stored in the text table and the material hierarchy is stored in the hierarchy table for the characteristic 'MATERIAL'.
25
Attributes
Australia). Can be language and time dependent. (Address, Telephone.) Can be language and time dependent.
Hierarchies
Tree like structures to group master data. Can be language and time dependent.
26
27
BI Icons
Key Figure Characteristic InfoCube Dimension Hierarchies Maintain Master Data Text InfoObject InfoSource Source System InfoArea
28
data and transaction data in the Meta Data Repository. Used in BI to create structures and tables. Either Characteristics or Key Figures.
29
Key Figures Any kind of numeric information used to measure a business process.
Date 1/1/08 1/1/08 Customer Jones Rosemann Material Racer 26 Mountain B Sales Quantity 2 5
Amount
1000 1500 30,000
Currency
EUR USD ZWD
30
Aggregation Key Figures are stored in Fact Table Aggregation defines how they are stored
Sum Maximum Minimum
Sum
OrdDate 23.10.2007 24.10.2007 25.10.2007 26.10.2007 26.10.2007 27.10.2007 27.10.2007 30.10.2007 30.10.2007 30.10.2007 SalesRep NO S1 S1 S1 S2 S2 S1 S3 S2 S3 S2 Product NO P1 P1 P2 P1 P2 P2 P1 P2 P1 P2 Sales 300 200 100 200 300 400 100 200 200 150
Transaction Table
31
32
Could be made up of more than one field Used to analyze Key Figures
33
Characteristic
(Grouped)
Customer
State City Customer Name Customer Phone
(Attributes of Customer)
34
definition contains:
Unit Characteristic
Quantity data types year)
Technical field descriptions (data type, length, etc) Display properties Transfer routines (executed when data is uploaded) Master data descriptions (time dependency, navigational properties, text properties, language dependency, Hierarchies)
Time Characteristic
Technical Characteristic
36
37
Characteristic - Compounding
Compounding refers to the when more than one characteristic is
required to uniquely identify a master data record.
The Characteristics
Cost Center
CostCenterNO (PK)
Dimension
DepartNO (PK) CostCenterNO (PK)
38
Dim1
3 Pre-defined
Surrogate Keys
In order to improve query execution the system assigns a numeric (surrogate) key to represent the structured alpha numeric key assigned in Master data. A SID table is used to store the reference between the two keys.
40
Dimension Table
A Dimension table does not store any master data records. It contains a series of surrogate keys that link the Fact table and Master data together.
Fact Table
DIM ID SalesRep
KF Sales
41
and Characteristics
42
InfoObjects Summary
InfoObjects
Key Figures
Amount Unit Quantity Unit Number Integer Date Time Time Unit Package
Characteristics
Characteristic Attribute Text Hierarchy
InfoArea
43
Aggregation
The system has to aggregate using multiple
characteristics. The system can aggregate with another rule for each key figure (exception aggregation). The key figure Number of Employees would, for example, be totaled using the characteristic Cost Center, and not a time characteristic. Here you would determine a time characteristic as an exception characteristic with, for example, the aggregation Last Value.
44
Hierarchies
Hierarchies allow data to be presented in alternative
ways. Hierarchies can be either Version, Time or Interval dependent. Version Dependent
Version 1
Region
Version 2
Region
North
South
North
South
S1
S2
S3
S4
S5
S1
S5
S2
S3
S4
45
Hierarchies
Time Dependent
Interval Dependent
Instead of each node representing a single value, node may now represent a range of values.
46
Create InfoArea Create InfoObject Catalogues Create Characteristics and Key Figures Create InfoCube and Define Dimensions Assign Characteristics to Dimensions Choose Key Figures
Save and Activate InfoCube
47
Modeling Since InfoCubes are InfoProviders, go to InfoProvider Create InfoArea if needed Create InfoCube in the context menu of your InfoArea Specify name and description (you can copy an
existing InfoCube too)
7. Time dimension- Add the InfoObjects that you want to be part of the Time dimension 8. Then add and modify dimensions as modeled in your star schema 9. Add InfoObjects (characteristics) to the dimensions. These InfoObjects were created previously 10. Add Key figures InfoObjects 11. Save and Activate the InfoCube 12. You can view the Data Model in the context menu of the cube.
49
Summary
SAP BI uses an extended (snowflake) star schema Dimension tables, fact table and master data tables are
used to create the snowflake Master data tables reside outside the InfoCube Characteristics and key figure InfoObjects are used to model attributes of dimension tables and fact tables respectively
50