{"ref":"capability:data-modelling","page":"/capabilities/data-modelling","json":"/capabilities/data-modelling.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"data-modelling","name":"Data modelling","domain":"data-and-persistence","ecosystems":["cap","abap"],"universal":true,"description":"Defining the shape of data before anything serves it: entities and their types, how they relate, and the projections and views that services and applications consume.","short":"Defining entities, their relations and the views services consume","core_coverage":{"state":"core-and-community","assessed_at":"2026-09-27","relationship":"unassessed","what_core_does":"This is the core. CDL is the language, CSN is what it compiles to, and the compiler is the thing every other tool reads the model through — entities, views and projections, managed and unmanaged associations and compositions, aspects, and annotations, with @sap/cds/common supplying the reusable types.","where_it_stops":"It stops at the model itself. Turning CSN into something else — types for a compiler, a picture, a migration against a database that already holds data — is a different capability each time, and each has its own entry here. The guide's own performance advice is part of the answer: avoid UNION in views, model polymorphism as normalised or denormalised entities rather than unions, and keep view chains and joins short, because the compiler translates what the model says and does not optimise it away.","community_adds":"CDS plugins that add reusable model parts to a project: [cap-user-info](artifact:uxkjaer-cap-user-info) ships an aspect and an entity that resolve createdBy and modifiedBy to a user record, and [cds-numberrange-plugin](artifact:abdulbasitg-cds-numberrange-plugin) adds a counter entity behind an annotated element.","sources":[{"url":"https://cap.cloud.sap/docs/cds/cdl","title":"CDL: Conceptual Definition Language — capire","checked":"2026-09-08","quote":"The Conceptual Definition Language (CDL) is a human-readable language for defining CDS models."},{"url":"https://cap.cloud.sap/docs/guides/databases/cdl-to-ddl","title":"CDL Compilation to Database-Specific DDLs — capire","checked":"2026-09-27","quote":"Databases are deployed based on the entity definitions in your CDS models."},{"url":"https://cap.cloud.sap/docs/guides/databases/cdl-to-ddl","title":"CDL Compilation to Database-Specific DDLs — capire","checked":"2026-09-27","quote":"The CAP framework handles all compilation to DDL automatically, for example when you run cds watch or cds deploy."},{"url":"https://cap.cloud.sap/docs/node.js/cds-compile","title":"Parsing and Compiling Models — capire","checked":"2026-09-27","quote":"This is the central function to compile models from files or in-memory sources to CSN."},{"url":"https://cap.cloud.sap/docs/guides/domain/","title":"Domain Modeling — capire","checked":"2026-09-27","quote":"Domain Models capture the static, data-related aspects of a problem domain in terms of entity-relationship models. They serve as the basis for persistence models deployed to databases as well as for service definitions."},{"url":"https://cap.cloud.sap/docs/guides/databases/performance","title":"Performance Considerations for CDS Modeling — capire","checked":"2026-09-27","quote":"Using the UNION statement to merge data from different sources should be avoided. Especially, if other activities like SORTING or FILTERING are performed after the UNION statement."},{"url":"https://cap.cloud.sap/docs/guides/databases/performance","title":"Performance Considerations for CDS Modeling — capire","checked":"2026-09-27","quote":"UNIONs in views come with a performance penalty and complex modelling."},{"url":"https://cap.cloud.sap/docs/guides/services/providing-services","title":"Define Provided Services — capire","checked":"2026-09-27","quote":"Services are defined in CDS using the service construct. A service definition declares the data entities and operations it serves, typically exposing projections on underlying domain model entities."},{"url":"https://cap.cloud.sap/docs/node.js/cds-reflect","title":"Reflecting CDS Models — capire","checked":"2026-09-27","quote":"Method cds.linked (or cds.reflect which is an alias to the same method) turns a given parsed model into an instance of class LinkedCSN, and all definitions within into instances of class LinkedDefinition, recursively."}]},"coverage_by_ecosystem":{"abap":{"state":"core-and-community","assessed_at":"2026-08-31","relationship":"unassessed","what_core_does":"[ABAP CDS](artifact:abap-cds) provides view entities, projections and annotations as the modelling layer above database tables.","community_adds":"Tools around the CDS layer: [CDS Analyser](artifact:agraeber-cdsanalyser) indexes a system's CDS views against the tables and fields they expose, [CDS field mapping](artifact:xexer-cds-field-mapping) looks up which CDS entity replaced a classic dictionary table and field, and [acds](artifact:abapify-acds) parses ABAP CDS source into a typed syntax tree.","sources":[{"url":"https://help.sap.com/docs/abap-cloud/abap-data-models/abap-core-data-services-cds","title":"SAP Help — ABAP Core Data Services","checked":"2026-08-31"}]}},"coverage_by_flavor":{"abap-cloud":{"state":"core-only","assessed_at":"2026-09-14","what_core_does":"Data models in ABAP Cloud are built from [CDS view entities](artifact:abap-cds); DDIC-based views, tied to classic dynpro tooling, are excluded, and their CDS-based successors are used instead.","where_it_stops":"It reaches only objects released for ABAP for Cloud Development: an unreleased table or view stays out of a data model until SAP releases it, or a released CDS entity is built to expose it.","sources":[{"url":"https://github.com/SAP-samples/abap-cheat-sheets/blob/main/26_ABAP_Dictionary.md","title":"SAP-samples/abap-cheat-sheets: ABAP Dictionary","checked":"2026-09-14","quote":"While several DDIC objects are still supported in ABAP Cloud (excluding, for example, classic DDIC views), it is recommended to use their ABAP CDS-based successors for new developments."},{"url":"https://pages.community.sap.com/topics/abap/abap-cloud-faq","title":"SAP Community: ABAP Cloud FAQ","checked":"2026-09-14","quote":"ABAP Cloud is based on released objects and public APIs and extension points."}]}},"changed_in":[{"version":"@sap/cds 9.6.0","date":"2025-12-16","applies_to":{"ecosystems":["cap"],"flavors":["node"]},"what_changed":"The compiler gained a declarative validation annotation, at Gamma status. Before it, a check like 'reject if this field is missing or out of range' meant a custom before-handler in application code; after it, `@assert: (<CXL expression>)` on an element states the condition in the model itself and the runtime validates it on write.","invalidates":"Advice that any conditional validation beyond @mandatory or @assert.range needs a handwritten handler. Since December 2025 a CXL expression in @assert covers much of that ground, model-side.","source":{"url":"https://cap.cloud.sap/docs/releases/2025/dec25","title":"CAP release notes, December 2025 — Declarative Constraints","checked":"2026-09-08","quote":"Use the new @assert annotation to express conditions using CDS Expression Language (CXL)."}},{"version":"@sap/cds 9.9.0","date":"2026-04-23","applies_to":{"ecosystems":["cap"],"flavors":["node"]},"what_changed":"Declarative constraints (@assert) moved from Gamma to General Availability, and a bug in error reporting was fixed alongside it: every violation used to return the generic error code ASSERT regardless of which constraint failed; now the code returned is the one named in the constraint itself.","invalidates":"Error-handling code or tests written against declarative constraints before April 2026 that match on a literal 'ASSERT' error code — they now see the constraint's own code instead.","source":{"url":"https://cap.cloud.sap/docs/releases/2026/apr26","title":"CAP release notes, April 2026 — Declarative Constraints reach GA","checked":"2026-09-08","quote":"Before, the error code returned in case of violations was always `ASSERT`, regardless of the specific error. With the GA release, the error code is now correctly set to the value specified in the constraint definition."}},{"version":"@sap/cds 8.0.3","date":"2024-07-12","applies_to":{"ecosystems":["cap"],"flavors":["node"]},"what_changed":"cds.compile.to.hana generates the hdbtable and hdbview artifacts and replaces cds.compile.to.hdbtable. Dated from the first 8.0 release published on npm.","invalidates":"Build scripts and posts that call cds.compile.to.hdbtable.","source":{"url":"https://cap.cloud.sap/docs/node.js/cds-compile","title":"Parsing and Compiling Models — capire","checked":"2026-09-27","quote":".hana() Since @sap/cds 8.0.0"}}],"drafted_with_ai":true,"history":[{"date":"2026-09-14","field":"coverage_by_flavor.abap-cloud","from":null,"to":"core-only","reason":"ABAP CDS is the sole ABAP-door provider of this capability, is sap-official, and states no flavor on its provides edge. SAP's own ABAP Cloud documentation (the abap-cheat-sheets ABAP Dictionary cheat sheet and the ABAP Cloud FAQ) confirms CDS view entities, not classic DDIC-based views, are how data models are built there, reachable only through released objects and public APIs. (Recorded on abap-data-modelling before the merge of 2026-10-17.)"},{"date":"2026-09-27","field":"core_coverage.sources","from":"the CDL reference","to":"the CDL reference, the DDL compilation guide and the compile API","reason":"capire audit 2026-09-27: two pages about compiling the model were cited nowhere; one carries a version marker."},{"date":"2026-09-27","field":"core_coverage","from":"without the page","to":"cites the page","reason":"capire audit 2026-09-27: the Domain Modeling guide and the performance page were cited nowhere."},{"date":"2026-09-27","field":"core_coverage","from":"without the page","to":"cites the page","reason":"capire audit 2026-09-27, judgement pages read once more: the service definition page and the Node.js reflection API were cited nowhere; the Java reflection API already was."},{"date":"2026-10-17","field":"description","from":"Defining the shape of the data before anything serves it — entities and types, aspects that carry cross-cutting concerns, associations and compositions, and the projections a service exposes. The question every CAP project answers first, and the one the rest of the corpus assumes has been answered.","to":"Defining the shape of data before anything serves it: entities and types, shared aspects, associations and compositions, and the projections a service exposes.","reason":"Keep the default capability wording neutral; preserve the previous wording in framing_by_ecosystem.cap. Maintainer-requested scope audit."},{"date":"2026-10-17","field":"description","from":"Defining the persistent and projected shape of data — and the migration from classic dictionary objects to CDS view entities.","to":"Defining the persistent and projected shape of data, including how stored structures relate to the views applications consume.","reason":"Keep the default capability wording neutral; preserve the previous wording in framing_by_ecosystem.abap. Maintainer-requested scope audit. (Recorded on abap-data-modelling before the merge of 2026-10-17.)"},{"date":"2026-10-17","field":"ecosystems","from":"cap","to":"cap, abap","reason":"abap-data-modelling was the same concern behind the ABAP door under a second id and the same name, so the capability list across the doors showed Data modelling twice. One capability per concern: the ABAP door's coverage, its ABAP Cloud flavor reading and its framing are carried over unchanged into coverage_by_ecosystem.abap, coverage_by_flavor.abap-cloud and framing_by_ecosystem.abap."},{"date":"2026-10-17","field":"description","from":"Defining the shape of data before anything serves it: entities and types, shared aspects, associations and compositions, and the projections a service exposes.","to":"Defining the shape of data before anything serves it: entities and their types, how they relate, and the projections and views that services and applications consume.","reason":"The cross-ecosystem paragraph now covers both doors: CAP's entities, aspects and service projections and ABAP's CDS view entities over stored tables are each kept in their door's framing."},{"date":"2026-10-17","field":"entry","from":"data-modelling and abap-data-modelling","to":"data-modelling","reason":"Merged the duplicate ABAP capability into this one, repointed its provides edges, content explains edges and prose links, and retired abap-data-modelling. Its old pages redirect here."},{"date":"2026-10-26","field":"core_coverage.state, core_coverage.community_adds","from":"core-only","to":"core-and-community; community_adds names cds-plugin kinds that add reusable model parts","reason":"Reassessed against the graph (check:capabilities): independent cds-plugin providers (cap-user-info, cds-numberrange-plugin) now provide this capability on the CAP door."},{"date":"2026-10-26","field":"coverage_by_ecosystem.abap.state, coverage_by_ecosystem.abap.community_adds","from":"core-only","to":"core-and-community; community_adds names tools around the CDS layer","reason":"Reassessed against the graph (check:capabilities): independent ABAP providers (CDS Analyser, CDS field mapping, acds) now provide this capability on the ABAP door."}],"framing_by_ecosystem":{"cap":{"description":"Defining the shape of the data before anything serves it — entities and types, aspects that carry cross-cutting concerns, associations and compositions, and the projections a service exposes. The question every CAP project answers first, and the one the rest of the corpus assumes has been answered."},"abap":{"description":"Defining the persistent and projected shape of data — and the migration from classic dictionary objects to CDS view entities."}}},"sap_delivery":{"door":"cap","all":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:sap-cds-common-content","name":"@sap/cds-common-content","json":"/artifacts/sap-cds-common-content.json"},{"ref":"artifact:sap-cds-compiler","name":"@sap/cds-compiler","json":"/artifacts/sap-cds-compiler.json"}]},"by_flavor":{"node":{"built_in":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json"}],"documented_pattern":[],"announced":[],"packages":[{"ref":"artifact:sap-cds-common-content","name":"@sap/cds-common-content","json":"/artifacts/sap-cds-common-content.json"},{"ref":"artifact:sap-cds-compiler","name":"@sap/cds-compiler","json":"/artifacts/sap-cds-compiler.json"}]},"java":{"built_in":[{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json"}],"documented_pattern":[],"announced":[],"packages":[]}}},"edges":{"use_cases":[],"shared_tasks":[],"related_tasks":[],"options":[{"ref":"artifact:sap-cds","name":"@sap/cds","json":"/artifacts/sap-cds.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:sap-cds-common-content","name":"@sap/cds-common-content","json":"/artifacts/sap-cds-common-content.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:sap-cds-compiler","name":"@sap/cds-compiler","json":"/artifacts/sap-cds-compiler.json","ecosystem":"cap","origin_ring":"sap-official"},{"ref":"artifact:abap-cds","name":"ABAP CDS","json":"/artifacts/abap-cds.json","ecosystem":"abap","origin_ring":"sap-official"},{"ref":"artifact:uxkjaer-cap-user-info","name":"cap-user-info","json":"/artifacts/uxkjaer-cap-user-info.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:xexer-cds-field-mapping","name":"CDS Field Mapping","json":"/artifacts/xexer-cds-field-mapping.json","ecosystem":"abap","origin_ring":"independent"},{"ref":"artifact:abdulbasitg-cds-numberrange-plugin","name":"cds-numberrange-plugin","json":"/artifacts/abdulbasitg-cds-numberrange-plugin.json","ecosystem":"cap","origin_ring":"independent"},{"ref":"artifact:agraeber-cdsanalyser","name":"cdsanalyser","json":"/artifacts/agraeber-cdsanalyser.json","ecosystem":"abap","origin_ring":"independent"},{"ref":"artifact:cap-java-cds-services-bom","name":"com.sap.cds:cds-services-bom","json":"/artifacts/cap-java-cds-services-bom.json","ecosystem":"cap","origin_ring":"sap-official"}],"samples":[{"ref":"artifact:mariokernich-abapconf2026-custom-entities","name":"abapconf2026-custom-entities","json":"/artifacts/mariokernich-abapconf2026-custom-entities.json"},{"ref":"artifact:capire-bookshop","name":"capire/bookshop","json":"/artifacts/capire-bookshop.json"},{"ref":"artifact:sap-samples-abap-platform-analytics-data-modeling","name":"SAP-samples/abap-platform-analytics-data-modeling","json":"/artifacts/sap-samples-abap-platform-analytics-data-modeling.json"},{"ref":"artifact:sap-samples-cap-cds-hands-on","name":"SAP-samples/cap-cds-hands-on","json":"/artifacts/sap-samples-cap-cds-hands-on.json"},{"ref":"artifact:sap-samples-cloud-cap-hana-swapi","name":"SAP-samples/cloud-cap-hana-swapi","json":"/artifacts/sap-samples-cloud-cap-hana-swapi.json"},{"ref":"artifact:capire-xflights","name":"xflights","json":"/artifacts/capire-xflights.json"},{"ref":"artifact:capire-xflights-java","name":"xflights-java","json":"/artifacts/capire-xflights-java.json"}],"explained_by":[{"ref":"content:devtoberfest-2026-cds-associations-and-joins","name":"CDS Associations & Joins","json":"/content/devtoberfest-2026-cds-associations-and-joins.json"},{"ref":"content:052-10-minutes-from-start-to-launchpad","name":"052: 10 Minutes from Start to Launchpad","json":"/content/052-10-minutes-from-start-to-launchpad.json"},{"ref":"content:beyond-read-text-decoding-sapscript-long-texts-stxl-with-sqlscript-in-cds-amdp","name":"Beyond READ_TEXT: Decoding SAPscript Long Texts (STXL) with SQLScript in CDS/AMDP","json":"/content/beyond-read-text-decoding-sapscript-long-texts-stxl-with-sqlscript-in-cds-amdp.json"},{"ref":"content:deep-insert-in-cap-using-composition-and-fiori-elements","name":"Deep Insert in SAP CAPM Using Composition and Fiori Elements","json":"/content/deep-insert-in-cap-using-composition-and-fiori-elements.json"},{"ref":"content:calculating-ibp-technical-week-key-figure-date-in-s-4hana-using-cds-view","name":"Calculating IBP Technical Week \"Key Figure Date\" in S/4HANA Using CDS View","json":"/content/calculating-ibp-technical-week-key-figure-date-in-s-4hana-using-cds-view.json"},{"ref":"content:building-an-enterprise-application-with-fiori-elements-and-cap-part-1","name":"Building an Enterprise Application Using Fiori Elements and CAP - Part 1","json":"/content/building-an-enterprise-application-with-fiori-elements-and-cap-part-1.json"},{"ref":"content:create-cds-views-and-expose-them-through-odata-in-capm","name":"Create CDS Views and expose through OData service in CAPM","json":"/content/create-cds-views-and-expose-them-through-odata-in-capm.json"},{"ref":"content:a-cap-plugin-for-flexible-number-range-management","name":"A CAP Plugin for Flexible Number Range Management: cds-numberrange-plugin","json":"/content/a-cap-plugin-for-flexible-number-range-management.json"},{"ref":"content:understanding-projections-in-capm","name":"Understanding Projections in CAPM: Select Only What You Need!","json":"/content/understanding-projections-in-capm.json"},{"ref":"content:generating-adobe-form-using-rap-framework-odata-services","name":"Generating Adobe Form Using RAP framework OData Services","json":"/content/generating-adobe-form-using-rap-framework-odata-services.json"},{"ref":"content:my-cap-projects-toolbox","name":"My CAP Projects Toolbox","json":"/content/my-cap-projects-toolbox.json"},{"ref":"content:understanding-csn-and-its-role-in-embedded-analytics","name":"SAP Incentive Management - Understanding of CSN file & CLI Command to generate","json":"/content/understanding-csn-and-its-role-in-embedded-analytics.json"},{"ref":"content:cap-cds-cdl-csn-and-jq-finding-associations","name":"CAP, CDS, CDL, CSN and jq - finding associations","json":"/content/cap-cds-cdl-csn-and-jq-finding-associations.json"},{"ref":"content:sap-cap-cloud-application-programming","name":"SAP CAP(Cloud Application Programming)开发框架概述","json":"/content/sap-cap-cloud-application-programming.json"},{"ref":"content:use-aspects-associations-and-convert-odata-v4-to-v2-using-proxy","name":"Use Aspects, Association and Convert OData V4 to V2 using Proxy","json":"/content/use-aspects-associations-and-convert-odata-v4-to-v2-using-proxy.json"},{"ref":"content:cap-techbytes-input-validation","name":"#CAP-TechBytes Input Validation","json":"/content/cap-techbytes-input-validation.json"},{"ref":"content:btp-sapcap-quirky-nuggets-n01-n02","name":"#BTP #SAPCAP: Quirky Nuggets (N01-N02)","json":"/content/btp-sapcap-quirky-nuggets-n01-n02.json"},{"ref":"content:part-2-enrich-cap-based-services-with-behaviors-using-annotations","name":"[Part – 2] Enrich CAP based Services with Behaviors using Annotations","json":"/content/part-2-enrich-cap-based-services-with-behaviors-using-annotations.json"},{"ref":"content:understanding-entity-relationships-in-cds","name":"Understanding entity relationships in CDS","json":"/content/understanding-entity-relationships-in-cds.json"},{"ref":"content:sap-cap-recent-enhancements-the-hana-dev-should-know-about","name":"SAP CAP Recent Enhancements the HANA Dev Should Know About","json":"/content/sap-cap-recent-enhancements-the-hana-dev-should-know-about.json"},{"ref":"content:sap-cap-adapter-to-expose-odata-as-custom-rest-service","name":"SAP CAP Adapter to expose OData as custom REST Service","json":"/content/sap-cap-adapter-to-expose-odata-as-custom-rest-service.json"},{"ref":"content:creating-structured-types-enums-and-named-aspects-in-the-graphical-modeler","name":"Creating structured types, enums and named aspects using the CDS Graphical Modeler","json":"/content/creating-structured-types-enums-and-named-aspects-in-the-graphical-modeler.json"},{"ref":"content:importing-sap-cds-common-cds-using-the-cds-graphical-modeler","name":"Importing @sap/cds common.cds to your CAP project using the CDS Graphical Modeler","json":"/content/importing-sap-cds-common-cds-using-the-cds-graphical-modeler.json"},{"ref":"content:first-java-cap-application","name":"First Java Cap Application","json":"/content/first-java-cap-application.json"},{"ref":"content:developing-business-services-with-cloud-application-programming-cap-model-in-sap","name":"Developing Business Services with Cloud Application Programming(CAP) Model in SAP Business Studio","json":"/content/developing-business-services-with-cloud-application-programming-cap-model-in-sap.json"},{"ref":"content:computed-field-example-in-cap","name":"Computed field example in CAP","json":"/content/computed-field-example-in-cap.json"},{"ref":"content:sap-cloud-platform-backend-service-tutorial-11-cds-magic-key-generation","name":"SAP Cloud Platform Backend service: Tutorial [11]: CDS : magic: key: generation","json":"/content/sap-cloud-platform-backend-service-tutorial-11-cds-magic-key-generation.json"},{"ref":"content:develop-a-full-stack-business-application-with-sap-cloud-application-programming","name":"Develop a full stack Business application with SAP Cloud Application Programming Model","json":"/content/develop-a-full-stack-business-application-with-sap-cloud-application-programming.json"},{"ref":"content:sap-tutorial-cap-define-constraints-declaratively","name":"Learn how to define constraints declaratively in your CDS model","json":"/content/sap-tutorial-cap-define-constraints-declaratively.json"},{"ref":"content:sap-tutorial-cap-status-transition-flows","name":"Explore the declarative power of status-transition flows","json":"/content/sap-tutorial-cap-status-transition-flows.json"},{"ref":"content:teched-2026-tm268","name":"Analyze and optimize ABAP Cloud model apps built on core data services","json":"/content/teched-2026-tm268.json"}],"normative_context":[]}}