Lecture 3

1

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

OLTP vs. OLAP systems
Operational (OLTP)
Detailed Can be updated Accurate up to the second Used for clerical purposes Built based on requirements Supports small uniform transactions Data designed for optimal storage Very current data Data is application oriented Referential Integrity is useful High availability is normal

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

3

Review of Star Schema
 Multidimensional data models are needed for the creation of data warehouses  The classic star schema is a commonly used multidimensional model  This database schema classifies two groups of data: facts (sales or quantity, for example) and dimension attributes (customer, material, time, for example).  Facts are the focus of the analysis of a business' activities. The fact data (values for the facts) are stored in a highly normalized fact table.

4

5

Real World Changes  The Star schema reflects changes in the ‘real world’ normally by adding rows to the fact table. 6 . which is identified by the combination of key attributes in the dimension tables.  More precise ‘real world’ changes like Customer ‘4711’ purchase Material ‘BBB’ at Day ‘19980802’ for $100 creates a new record in the fact table.

Adding Records 7 .

Fact Table Date ID Year Fiscal Year Quarter Month Customer ID Customer Name City Region Type Material ID Customer ID Date ID Sales Amount (K) Unit Price (K) Quantity (K) Time Dimension Customer Dimension Material ID Material Name Material Type Material Group Material Dimension 8 .Star Schema Limitations • No support for multiple languages • Reduced performance due to the use of Alphanumeric keys • No support for time dependent changes • Duplication of Dimensional data.

which was developed as an enhanced star schema as a response to problems experienced with the classic star schema. called master data tables (outside the dimension tables). The enhancement comes from the fact that the dimension tables do not contain master data information!  Master data is stored in separate tables. 9 .SAP BI Schema The multi-dimensional model in SAP BI is based on the SAP BI schema.

 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 .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.

Dimensional Models 11 .

Snowflake 12 .

When do you snowflake? Snowflaking a dimension table can typically be performed under the following two conditions:  The dimension table consists of two or more sets of 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 .

g. sales amount).g. The fact table is surrounded by several dimensions. The meta data object in BI that describes characteristics and also key figures (facts) is called InfoObject. The center of an InfoCube forms the fact table containing the key figures (e. 2. A dimension consist of different table types:  Dimension Table  Attributes of the dimension tables are called characteristics (e. 3. 14 .Details of the SAP BI Schema 1. material).

 Fact table  Consists of Dimensional Keys and Key Figures (facts).SAP BI Extended Star Schema  Master Data  Represents Dimensional data  Independent of any Fact table  Reusable in multiple Fact tables  Designed to support multi lingual systems  Designed to support time dependent data. 15 .  Designed to improve query performance.  Dimension table  Acts as a link between Master data and Fact table records  InfoCube  Consists of Fact and Dimensional tables.

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 .

Those are stored and maintained outside the InfoCube. Max 233 key figures!  Dimension Tables – Linked by SID tables to the master data tables. (Remember master data is not part of the InfoCube.InfoCubes  InfoCube consists of a number of relational tables arranged together-  Fact Table – One table in which key figures are stored. Your own Cubes begin with A-Z. SAP BI allows a total of 16 dimensions.  Technical name of SAP provided InfoCubes starts with 0. 3-9 characters long 17 .)  Dimension – Grouping of logically related characteristics. Max 248 characteristics per dimension.

SAP BI Schema 18 .

 Virtual Cubes (Virtual Provider)  Only represent logical views of a dataset  Data resides in data source 19 .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.

schematic display as star schema 20 . SAP Demo Sales and Distribution overview 0D_SD_C03  Choose  InfoCube .Viewing InfoCube Schema  Go to the Data Warehousing Workbench  Metadata Repository  Choose InfoCube  Find the InfoCube you want to view  Eg.

Execute 8. Choose value ranges (if desired) 7.1. Click on Fld Selection for output. . Select the fields (characterisitcs and key figures that you want) 5. Viewing/Downloading Data in an InfoCube   Start Data Warehousing Workbench: Modeling (RSA1) Choose Modeling  InfoProvider Navigate to the InfoCube using the hierarchy of InfoAreas (SAP Demo Sales and Distribution overview . Note that this is a flat file 21 derived from a relational database (star schema) 2. Request export to a local spreadsheet file 9.0D_SD_C03) Right click and Display data 3. 4. View the data in the spreadsheet. Execute 6.

Terms used 22 .

InfoCube and Master Data 23 .

24 .

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'.  Master data types:  Attributes  Texts  (External) Hierarchies Master Data Tables  Eg. 25 . Additional information about characteristics is referred to as master data.

SAP BI MetaData Objects – Master Data Tables 3 possible components  Text  Textual description of Master Data element (AU =  Attributes Australia).  Hierarchies  Tree like structures to group master data. Telephone.)  Can be language and time dependent.  Can be language and time dependent. (Address.  Characteristics which describe another Characteristic.  Can be language and time dependent. 26 .

Note: Master Tables = Attribute Tables in this slide 27 .

BI Icons Key Figure Characteristic InfoCube Dimension Hierarchies Maintain Master Data Text InfoObject InfoSource Source System InfoArea 28 .

29 .  Either Characteristics or Key Figures.SAP BI MetaData Objects InfoObjects  Represent the structure that allows data to be stored in a BI systems.  Used to describe business processes and information requirements (fields):  Customers  Sales revenue  Contain technical and specialist information for master data and transaction data in the Meta Data Repository.  Used in BI to create structures and tables.

size) for further clarification Amount * Quantity * Number Integer Date Time Amount 1000 1500 30.000 Currency EUR USD ZWD 30 . Date 1/1/08 1/1/08 Customer Jones Rosemann Material Racer 26 Mountain B Sales Quantity 2 5 SAP BI MetaData Objects – Key Figures Amount $2000 $4000  Six different types       * Requires Unit (currency.Key Figures  Any kind of numeric information used to measure a business process.

2007 25.2007 30.10.2007 27.10.2007 24.2007 26.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 .2007 27.10.Aggregation  Key Figures are stored in Fact Table  Aggregation defines how they are stored  Sum  Maximum  Minimum SAP BI MetaData Objects – Key Figures Fact Table SalesRep NO S1 S1 S2 S2 S3 Year 2007 2007 2007 2007 2007 Month 10 10 10 10 10 Product NO P1 P2 P1 P2 P1 Sales 500 500 200 650 300 Sum OrdDate 23.10.10.10.10.10.10.2007 26.10.2007 30.2007 30.

SAP BI MetaData Objects – Key Figures 32 .

date. product. postcode. unit etc. colour.  They are the attributes of the dimension table Date 1/1/08 1/1/08 Customer Jones Rosemann Material Racer 26 Mountain B Sales Quantity 2 5 Amount $2000 $4000  Could be made up of more than one field  Used to analyze Key Figures 33 .SAP BI MetaData Objects – Characteristics Characteristics  Designed to describe objects used with in the business process  customer.

SAP BI MetaData Objects – Characteristics Characteristic (Single) Characteristic (Grouped)  Region  City  Customer Name  Customer Phone  Customer  State  City  Customer Name  Customer Phone (Attributes of Customer) 34 .

length. etc) Display properties Transfer routines (executed when data is uploaded) Master data descriptions (time dependency. text properties. language dependency. Hierarchies)  currencies and units of measure are required for Amount and  Time Characteristic  compulsory assignment to time dimension in InfoCube. (Calendar  Technical Characteristic  only technical use in BI (Request ID) 35 . navigational properties.SAP BI MetaData Objects – Characteristics  Characteristic      definition contains:  Unit Characteristic Quantity data types year) Technical field descriptions (data type.

SAP BI MetaData Objects – Characteristics 36 .

Types of Master Data Tables 37 .

• The Characteristics combine to form a concatenated primary key within a Dimension table.Compounding • Compounding refers to the when more than one characteristic is required to uniquely identify a master data record.Characteristic . Entity Relationship Model Department DepartNO (PK) Cost Center CostCenterNO (PK) Dimension DepartNO (PK) CostCenterNO (PK) 38 .

SAP BI MetaData Objects – InfoCube  Contains two types of data  Key Figures (transactional data)  Characteristics  1 Fact Table and 16 Dimension Tables  3 Dimensions are predefined by SAP    Time Unit Data Package Dim2 Dim3 Dim4 Dim5 Dim6 KF1 KF2 Up to 13 User-defined 39 Dim1 3 Pre-defined .

• A SID table is used to store the reference between the two keys. 40 .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.

Master Data SID Table DIM ID 1 2 3 SID 1 2 3 Fact Table DIM ID SalesRep DIM ID DIM ID Product Time KF Sales 41 .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.

 An InfoObject Catalog is a folder within an InfoArea that stores specific InfoObjects.  Separate InfoObject Catalogs are used for Key Figures and Characteristics  Displayed via a tree structure or directory 42 .SAP BI Meta Data Objects – InfoArea/InfoCatalog  An InfoArea is a directory that stores all related InfoObjects within the same business context.

InfoObjects Summary InfoObjects Key Figures Amount Unit Quantity Unit Number Integer Date Time Time Unit Package Characteristics Characteristic Attribute Text Hierarchy Characteristic InfoObject Catalog Key Figure InfoObject Catalog InfoArea 43 .

be totaled using the characteristic Cost Center. for example. the aggregation Last Value. and not a time characteristic. Here you would determine a time characteristic as an exception characteristic with. for example.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. 44 .

 Version Dependent Version 1 Region Version 2 Region North South North South S1 S2 S3 S4 S5 S1 S5 S2 S3 S4 45 .  Hierarchies can be either Version.Hierarchies  Hierarchies allow data to be presented in alternative ways. Time or Interval dependent.

46 .Hierarchies • Time Dependent • Interval Dependent Instead of each node representing a single value. node may now represent a range of values.

InfoCube: Quick build 1 2 3 4 5 6 7 • 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 .

Choose a Standard Cube.InfoCube: Detailed build 1. 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) 6. 4. Start with the Data Warehousing Workbench 2. 5. – Modeling Since InfoCubes are InfoProviders. 3. Save 48 .

Time dimension. Add InfoObjects (characteristics) to the dimensions.Add the InfoObjects that you want to be part of the Time dimension 8. 49 . Add Key figures InfoObjects 11. Then add and modify dimensions as modeled in your star schema 9. You can view the Data Model in the context menu of the cube. These InfoObjects were created previously 10.7. Save and Activate the InfoCube 12.

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 .

Sign up to vote on this title
UsefulNot useful