Thursday, August 4, 2011

What is Star Schema & Extended Star Schema in BI 7.0 ?

SAP BW Star Schema


SAP BW Star schema is based on the extended of the classic star schema (aka “snowflake” schema). The enhancement comes from the fact that the dimension table does not contain master data information. This master data information is stored in separate tables, called master data tables. In SAP BW Star Schema, the distinction is made between two self-contained areas: infocube and surrogate ID (SID) tables
.
sap bw star schema

Infocube

Infocubes are the central objects on which reports and analysis are based in SAP BW. It describes a self-contained data set within a business area, for which we can define queries.
infocube

Infocube consist of a central fact table and several surrounding dimension tables. In SAP BW star schema, the facts in a fact table refers to key figure and the dimension attributes refer to characteristics.
In contrast to classic star schema, characteristics are not component the dimension tables since the characteristic values are not stored in the dimension tables. They are stored in master data tables. There are foreign keys that replace the characteristics as the component of dimension table, i.e.: SID stand for Surrogate ID. In picture above, these keys are given the prefix SID_.

Each Dimension table has a generated primary key, called the dimension key. (In Picture above, the keys are given the prefix DIM_ID_..). As the classic star schema, the primary key of the fact table is made up of dimension keys.

Master data Table or Surrogate ID (SID) Table

In SAP BW, additional information about characteristic is referred to as master data.Master data information is stored in separate tables called master data tables. There are 3 types of master data, i.e.: AttributesText and Hierarchies.
 SID Tables
Here, SID tables play an important role in linking the data warehouse information structured to the subject-oriented infocubes. The master data tables, text tables, and hierarchy tables are not directly linked to the associated dimension tables. These tables are infocube independent and joined with the dimension tables using SID table. The SID therefore provides the link to the dimension tables.


The connection between Infocube and Master Data Tables

Infocube and master data linking
Infocube and master data connection
Picture above illustrates the connection between master data table and infocube. Master data tables are connected to an infocube by way of the SID tables. The picture above also explains that in SAP BW star schema, the master data is independent infocube and can be used by several infocubes at the same time.



Extended Star Schema:

Many of the problems associated with the basic star schema are resolved with the BW extended star schema. With the extended star schema, attributes are removed from the dimensions and placed outside the InfoCube in master data tables.


The BW extended star schema differs from the basic star schema. It is divided by a solution dependent part (InfoCube) and a solution independent part (attribute, text and hierarchy tables) which is shared among other InfoCubes.In BW, attributes located in the dimensions are called characteristics. In BW, attributes located in a master data table of a characteristic are called attributes of the characteristic.

When designing a solution, it is a great challenge to decide whether an attribute should reside in a dimension table and thus in the InfoCube or in a master table or even both. Data is loaded separately into the master data (attributes), text and hierarchy tables. The SID table provides the link between the master data and the dimension tables.

The fact table and the relevant dimension tables of an InfoCube are connected with one another relationally using the dimension keys. The dimension key is provided by the system per characteristic combination in a dimension table.

With the execution of a query the OLAP processor checks the dimension tables of the InfoCube to be evaluated for the characteristic combinations required in the selection.

The dimension keys determined in this way point the way to the information in the fact table. Dimension tables consist of a maximum of 248 characteristics. The Time dimension holds the time characteristics needed for analysis.

The Unit dimension contains the unit of measure and currency characteristics needed to describe the key figures properly. The Data Packet dimension is used to identify discrete packets of information loaded into the InfoCube. In this way, packets can be deleted, reloaded or maintained individually.





No comments:

Post a Comment