Create an Entity Relationship Model in SAP Datasphere
- Overview of E/R Models
- How to create an E/R Model
- How to associate data columns
- Finalise an E/R Model and deploy
This tutorial is part of a mission, in which you try to help Best Run Bikes to to get a holistic view of their sales data by using the power of SAP Datasphere. You will get the sales data of Best Run Bikes and it is your mission to use the features of SAP Datasphere to help the bike suppliers make the best possible business decisions.
This mission consists of 8 modules that contain the necessary steps you need to follow in your mission to help Best Run Bikes:
- Sign up for a SAP Datasphere free tier tenant.
- Get to know the SAP Datasphere interface
- Add users and assign roles
- Create your Space
- Import your datasets
- You are here -> Create an entity relationship model
- Create a graphical view model
- Define measures, business semantics and preview your data
You can also follow the steps in this tutorial by watching this video. Please note that SAP Data Warehouse Cloud has evolved into SAP Datasphere. While this video references SAP Data Warehouse Cloud, the content applies to SAP Datasphere.
- Step 1
An E/R model provides a diagram for organising your data entities (tables and views) in relation to one another. You can:
• Add entities from the repository or import them from a connection or a CSN file, as well as creating new entities directly.
• Modify the properties of your entities including adding human-readable business names and creating associations directly in the diagram.
• Save and deploy all the contents of your model with a single action.
The work that you do in an E/R model benefits all the users in your Space as they can use the entities that you import or enhance as sources in their views.
A data model is a way to organise the data and define the relationship between the data elements you have, to give it a structure. This structure must be aligned with your team’s needs to generate reports and queries.
- Step 2
Go to the Data Builder and click on the New Entity-Relationship Model button.
This takes you into the graphical modelling interface. Since you imported the sample data manually via CSV, then your data can be found under the Repository.
- Click and drag the table
SalesOrdersonto the canvas. This table holds information about customer orders.
- Next, click and drag the table
SalesOrderItemsto add more detailed information about your orders.
With the data tables now in your modelling interface, you are now ready to create the relevant associations and deploy your E/R model.
- Step 3
After including the
SalesOrdertable and the
SalesOrderItemstables from your Best Run Bikes dataset into the model, they must now be associated to each other.
Click on the
SalesOrderstable and then click on the Create Association arrow icon.
Drag it over to the
SalesOrderItemstable to create an association between the two tables.
Ensure that the created association is between the columns
SalesOrderIDin the Association Properties panel.
Drag and drop to connect the sales column from one table to the other if it’s not done already.
Next, click and drag the
BusinessPartnerstable. This table contains information on Best-Run Bikes customers, which is useful when connected to the sales data. We’ll go ahead and create an association to the
SalesOrderstable using the
Now add some geographical location information to the model. Drag the
Addressestable onto the canvas.
And now create an association between the
BusinessPartnerstables using the
- Step 4
You’ve now joined all the tables we will be using in this model. Type a name into the Model Properties panel and click on Save. And once that’s completed, you can click on the deploy icon.
You have now created associations between the tables by creating an Entity-Relationship model. You can now use this model to create Graphical or SQL views and model your data accordingly.
Where can you create Entity Relationship Models in SAP Datasphere?