
A data model represents framework of what relationships are in a database. Data models are the foundation of software development. They provide a standardized method for defining and formatting database contents consistently across systems, enabling different applications to share the same data.
Professional data modeling tools provide a way to generate SQL from a modeled ER diagram although some developers often prefer writing SQL directly. Below is a look of a data model.
Virtual Data Model
The concept of the Virtual Data Model (VDM) was introduced with HANA Live three years ago. SAP HANA Live is a Virtual data model on top of suite tables which uses native SAP HANA SQL views called Calculation views for real-time operational Reporting. This came with certain issues:
With S/4HANA, SAP launched S/4HANA Analytics as an upgrade to HANA Live. S/4HANA supports a new data model by providing a ready-to-use content using CDS view. The CDS data model used by SAP S/4HANA can be considered a successor to the virtual data model used by SAP HANA Live as the new CDS provides certain advantages over VDM which are discussed later in this blog.
As for our customers, which are the current users of HANA Live nothing changes unless they migrate to S/4 HANA. The existing virtual data models will continue to be supported by SAP. Once customers migrate to S/4HANA, the new CDS-based views can be used and upgraded against the simplified data model in S/4HANA.
To take advantage of SAP HANA for application development, SAP introduced a new data modeling infrastructure known as core data services. With CDS, data models are defined and consumed on the database rather than on the application server. CDS also offers capabilities beyond the traditional data modeling tools, including support for conceptual modeling and relationship definitions, built-in functions, and extensions
Technically, CDS is an enhancement of SQL which provides a Data Definition Language (DDL) for defining semantically rich database tables/views (CDS entities) and user-defined types in the database. Some .of the enhancements are:
SAP HANA Live(based upon VDM) | SAP S/4 Analytics ( based upon CDS ) |
---|---|
| Best of HANA Live Features
|
VDM to CDS Migration
In order to ensure a smooth migration from HANA Live VDM Model to S/4 HANA VDM CDS Model, SAP provides a migration roadmap tailored for the Customer businesses. In the past a lot of effort was spent to define and implement the HANA Live Virtual Data Model based on HANA Calculation Views. This is used as a starting point for the definition and implementation of the CDS Data Model. CDS views are generated for the Calculation views. Please note, after the generation additional effort is necessary to adapt the generated views to the new approach (CDS). Typical tasks which might be necessary are:
However, not all of these manual tasks are necessary for each migrated calculation view. In particular, “simple” views can often be left unchanged after generation.
Example: Calculation View “sap.hba.ecc.BusinessTransactionType”
The calculation view “BusinessTransactionType” has a text join node “Join_1” with the join condition “TJ01.VRGNG = TJ01T.VRGNG” .
NAMESPACE sap.hba.ecc;
DEFINE VIEW BusTransType AS SELECT FROM "SAP_ECC".TJ01
ASSOCIATION [1, 0..1] TO "SAP_ECC".TJ01T as _Text ON TJ01.VRGNG = _Text.VRGNG
and _Text.SPRAS = $session.system.language
{
TJ01.VRGNG AS BusinessTransactionType,
TJ01T.TXT AS BusinessTransactionTypeName,
TJ01.WTKAT AS ControllingValueCategory,
TJ01.PSIKZ AS ControllingValueClassification
};
NAMESPACE sap.hba.ecc;
DEFINE VIEW BusTransType AS SELECT FROM "SAP_ECC".TJ01
LEFT JOIN "SAP_ECC".TJ01T
ON
TJ01.VRGNG = TJ01T.VRGNG and
TJ01T.SPRAS = $session.system.language
{
TJ01.VRGNG AS BusTransTypee,
TJ01T.TXT AS BusinessTransactionTypeName,
TJ01.WTKAT AS ControllingValueCategory,
TJ01.PSIKZ AS ControllingValueClassification
};
CDS views can be developed and maintained in SAP HANA studio and in ABAP in Eclipse. The textual editor in eclipse provides rich feature set for fast development like:
Learn more about CDS from here:
My CDS view self study tutorial - Part 1 how to test odata service generated by CDS view
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |