There are 5 types of languages & notations in Core Data Services (CDS). Before I dive into the definitions it’s important to touch on the importance of CDS in the SAP ecosystem. You will learn ‘what’ & ‘how’ CDS commands a position of importance.
What is SAP CAPM?
SAP Cloud Application Programming Model (CAPM) is a framework of languages, libraries, and tools for building enterprise-grade services and applications. It guides developers along a golden path of proven best practices and offers a wealth of out-of-the-box solutions for recurring tasks. The main compounds of CAPM is
1. Core Data Services(CDS)
2. Service SDK’s
What Exactly is Core Data Services?
CDS is the backbone of the SAP CAPM. It is a collection of domain-specific languages that help you focus on your specific business domain model during development.
Primarily, it provides the means to declaratively capture service definitions and data models, queries, and expressions in plain (JavaScript) object notations. CDS features parse from a variety of source languages and to compile them into various target languages.
CDS models are plain JavaScript objects complying to the Core Schema Notation (CSN), an open specification derived from JSON Schema. You can easily create or interpret these models, which foster extensions by 3rd-party contributions. Models are processed dynamically at runtime and can also be created dynamically.
CDS is our universal modeling language for both domain models and service definitions.
CDS have different types of Languages and Notations: Now we come to the parts & preludes of the CDS model. They also comply better with different databases.
- Definition Language(CDL)
- Schema Notation(CSN)
- Query Language(CQL)
- Query Notation(CQN)
- Expression Notation(CXN)
Definition Language(CDL) :
Let’s go through one of the languages from the domain the Definition language(CDL).
CDL is a human readable syntax for defining your models. Let’s see some of the available definitions of the language:
- Entities
- Views
- Associations
- Aspects
- Types
- Service definitions and more
Core Schema Notation (CSN)
CSN is pronounced as ‘Season’ too. It is a notation for compact representation of data and service models (Json or CDS model). It’s developed to understand, share and interpret models with minimal dependencies.
It is similar to JSON schema but goes beyond the ability to capture full-blown entity-relationship models and extensions. However, the CAN models are more concise and secure.
The CANs’ models are examples of the perfect source to generate target models such as OData/EDM or OpenAPI interfaces & persistence models for SQL or NoSQL databases.
Example for convert to CDL entity/service into CSN:
Different types of CSN Models:
In the next part of this series, I will discuss CDS in SAP programming, talking specifically about Query Language(CQL), Query Notation(CQN), Expression Notation(EXN), and Demo Project.
If you are interested in viewing similar articles, visit our blog, here.
View our LinkedIn, here.