Creating an Entity-Relationship Model

Create an E/R model to import, visualize, edit, and deploy multiple tables and views together. You can use an E/R model to better understand a subset of the entities in your space, and to communicate this information to other stakeholders.

Prerequisites

To create E/R models, you must have a scoped role that grants you access to a space with the following privileges:
  • Data Warehouse General (-R------) - To access SAP Datasphere.

  • Data Warehouse Data Builder (CRUD----) - To create, edit, and delete E/R models.

  • Space Files (CRUD----) - To create, read, update, and delete objects in your spaces.

The DW Modeler role template, for example, grants these privileges. For more information, see Privileges and Permissions and Standard Roles Delivered with SAP Datasphere.

Context

An E/R model provides a diagram for arranging 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.
In addition to working with E/R models in the editor, you can also:

Procedure

  1. In the side navigation area, select (Data Builder), select a space if necessary, and select New ER Model to open the editor.
  2. Add, import, or create entities in the diagram:
  3. Select an entity to access its toolbar:

    Button

    Action

    (Add Column)

    Add a column to the selected table.

    (Create View from Selection)

    Create a view from the selected entity (see Create a View in an E/R Model).

    (Create Table)

    Create a table along with an association pointing from the selected entity to the new table (see Create a Table in an E/R Model).

    (Create Association)

    Create an association from the selected entity to another entity (see Create an Association in an E/R Model Diagram).

    (Add Related Entities)

    Add entities that are related (by association) to the selected entity (see Add Related Entities to an E/R Model Diagram).

    (Preview Data)

    Preview the data for the selected entity (see Viewing Object Data).

    (Impact and Lineage Analysis)

    Open the Impact and Lineage Analysis diagram. This diagram enables you to understand the lineage and impacts of the selected object.

    (see Impact and Lineage Analysis.)

    (Edit Custom CSN Annotations)

    [optional] Click (Edit Custom CSN Annotations) to open the Edit Custom CSN Annotations dialog.

    (Open in New Tab)

    Open the selected entity in its own editor in a new tab.

  4. Edit the selected entity's properties in the Properties panel.

    If any entity contains columns with Personal Data or Sensitive Personal Data from a data product, then it is tagged accordingly and the ER model also displays the appropriate tag (see Modeling with Personal Data).

  5. Click (Save) to save your model:
    • Save to save the entities displayed in your E/R model.

    • Save As to create a local a copy of the entities displayed in your E/R model. The model must have been previously saved at least once. The Save dialog opens. Enter new business and technical names and click Save.

  6. Click (Deploy) to deploy the entities displayed in your E/R model:
    • Newly-created entities are deployed for the first time.

    • Entities that have changes to deploy are re-deployed.

  7. The tools in the editor toolbar help you work with your object throughout its lifecycle:

    Tool

    Description

    (Save)

    Save your changes to the design-time repository. You can use Save As to create a copy of the object.

    See Saving and Deploying Objects.

    (Deploy)

    Deploy your changes to make them available in the run-time environment.

    See Saving and Deploying Objects.

    (Source Browser)

    Show the Source Browser panel to drag objects into the E/R model diagram.

    See Using the Source Browser.

    (Preview Data)

    Open the Data Preview panel to preview data in the selected object.

    See Viewing Object Data.

    (Undo) / (Redo)

    Revert the last change to the object or redo a change you have previously undone.

    (Add from Repository)

    Add entities connected to your entity by associations.

    For more information, see Add Related Entities to an E/R Model Diagram.

    (Import)

    Import entities from a connection or from a CSN file.

    For more information, see Import an Object from a Connection or Other Source and Importing Objects from a CSN/JSON File.

    (Export)

    Export all the objects in the E/R model to a CSN/JSON file.

    See Exporting Objects to a CSN/JSON File.

    Versions

    Open the Version History dialog for the object.

    See Reviewing and Restoring Object Versions.

    Details

    Toggles the display of the Properties panel.