SAP HANA Star Schema
Before we move on to SAP HANA Star Schema let us understand first what a Star Schema is.
What is a Star Schema?
Star schema is the backbone of all data warehouse modelling be it SAP or Oracle. It is a fairly simple concept and is really important for any kind of analysis.
Let’s understand this with extending the simple example we had in the Master data Vs Transactional Data tutorial.
Star Schema in SAP HANA explained with an example
We had our master data table as below:
Product Code | Description | Plant |
SH | Shoe | US1 |
CO | Coat | US1 |
CA | Cap | DE1 |
Also, we had our transaction data table as below:
Product Code | Date(MM/DD/YYYY) | Revenue ($) |
SH | 1/1/2016 | 100 |
CO | 1/1/2016 | 200 |
CA | 1/1/2016 | 300 |
SH | 1/2/2016 | 100 |
CO | 1/2/2016 | 200 |
CA | 1/2/2016 | 300 |
Now, for analysis of the transaction data by product and description, we would be required to have connections between the master and transaction table. The overall data model would look as shown below:
1
Doesn’t look like much of a Star for a Star schema model right?
Well, that’s because we are doing a really small analysis here. Let’s assume our transaction data had Customer and Vendor details too. Also, we wanted to do more detailed time based analysis like Year/Month statistics from date.
Let’s see how that data model looks like.
1
This looks more like a star.. right? Well to be honest, it looks more like a 4-legged octopus to me but a Star schema sounds cooler so let’s go with that name.
To conclude, the star schema shows you how the backbone of your data models must look like. This will be much more clearer and fun when we actually start building data models in HANA and BW on HANA.
Note: Prior to the advent of HANA, a model called extended star schema was used in SAP BW which was the best practice for BW running on a legacy database. With BW on HANA, it is no longer relevant and is not discussed in this tutorial. As of BW on HANA 7.5 and Enterprise HANA SP11, a lean star schema approach is what must be followed in all data models. Well, BW does it by itself anyways when on HANA so you can leave it up to the application.
Thank you for reading this tutorial. Please show some support for this website by sharing these tutorials across social media using the share buttons below. Also, make sure you subscribe to our newsletter when the pop-up comes up to get alerts as soon as tutorials get added.
Until next time. Happy Learning!