Star Schema & SAP HANA Views: by Vishal Saxena

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10
At a glance
Powered by AI
The key takeaways from the document are fact tables, dimension tables, star schemas, attribute views, analytic views and calculation views in SAP HANA.

A fact table is a table which consists of fields for measurements, metrics or facts of a business process. It is located at the center of a star schema surrounded by dimension tables. A fact table stores quantitative information for analysis.

A dimension table is one of the set of companion tables to a fact table. Dimension tables contain descriptive attributes (or fields) that are typically textual fields (or discrete numbers that behave like text). Dimension table rows are uniquely identified by a single key field.

Star Schema & SAP HANA Views

By Vishal Saxena
What is Fact Table?
• A fact table is a table which consists of fields for
measurements, metrics or facts of a business process. It is
located at the center of a star schema surrounded by
dimension tables. A fact table stores quantitative information
for analysis.
• A fact table typically has two types of columns: those that
contain facts and those that are a foreign key to dimension
tables.
• The primary key of a fact table is usually a composite key that is
made up of all of its foreign keys.
What is Dimension Table?
• A dimension table is one of the set of companion tables to a
fact table.
• The fact table contains business facts (or measures), and
foreign keys which refer to candidate keys (normally primary
keys) in the dimension tables.
• Contrary to fact tables, dimension tables contain descriptive
attributes (or fields) that are typically textual fields (or discrete
numbers that behave like text).
• Dimension table rows are uniquely identified by a single key
field.
What is Star Schema?
• A diagram of a star schema resembles a star, with a fact table at the
center.
• The star schema consists of one or more fact tables referencing any
number of dimension tables.
• Surrounding the fact table are dimension tables, which are related
to the fact table by a single join. Dimension tables contain data that
describe the different characteristics, or dimensions, of a business.
Data warehouses and data marts are usually based on a star
schema.
• In a star schema, subjects are either facts or dimensions. You define
and organize subjects according to how they are measured and
whether or not they change over time. Facts change regularly, and
dimensions do not change, or change very slowly.
Star Schema - Example
What is an Attribute View?
• Attribute View act as Master data context, which provides Text
or Description for Key/Non-key field.
• Attribute view acts like a dimension. It join multiple tables and
act as Master.
• Attribute view is reusable objects. Attribute View can be reuse
in Analytic View and Calculation View.
• There is no measure and aggregation option.
• Attributes View is used to select a subset of columns and rows
from a database table.
Attribute View Types
There are 3 types of Attribute Views:
• Standard : standard attribute which is created by table fields.
• Time : It is based on default time tables
• For calendar type Gregorian -
– M_TIME_DIMENSION
– M_TIME_DIMENSION_ YEAR
– M_TIME_DIMENSION_ MONTH
– M_TIME_DIMENSION_WEEK
• For calendar type Fiscal -
– M_FISCAL_CALENDAR

• Derived : It is an attribute view which is derived from another existing


attribute view. Derived attribute view will be opened in read-only mode.
The only editable field is its description.
– Copy From : If you want to copy from another attribute view, use this option.
– Note: Difference between Derived and Copy from is, in the case of derived, you can
only edit the description of new attribute view while in the case of copy, you can
modify everything entirely.
What is an Analytic View?
• Analytic view is an information view.

• It joins together one central fact table, which contains the measures
with any number of other tables (or) attribute views.

• This is the basic view type that is directly used as source of data for
reporting.

• Analytic view can be comparable to InfoCubes in SAP BW.

• Analytic View = 1 Fact Table(with Key figures) + ( 1 or


moreTables/Attribute views ).
What is an Calculation View?
• Calculation view is a powerful information view.
• Analytic view measure can be selected from only one fact table. When there is need
of More Fact table in information view then calculation view comes in the picture.
Calculation view supports complex calculation.
• The data foundation of the calculation view can include tables, column views, analytic
views and calculation views.
• We can create Joins, Unions, Aggregation, and Projections on data sources.
• Calculation views support Complex Calculation, OLTP and OLAP models, Client
handling, language, currency conversion, Union, Projection, Aggregation, Rank, etc.

• Calculation View are of two types –


• Graphical Calculation View (Created by SAP HANA Studio Graphical editor).
• Script-based calculations Views (Created by SQL Scripts by SAP HANA Studio).
Lets see the scenario to be developed after which I’ll be
showing you a Practical Example of creating & using
these views in HANA System…

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy