Show answerHide answer
Correct answer: A Service model entities
Explanation
Explanation:To make data accessible to a UI (like SAP Fiori) or an external system, you must define a Service Layer. While the data model (Persistence Layer) defines how data is stored in the database, the Service Model defines how that data is structured for consumption.
In CAP, entities defined in the db/ folder are private by default. You "expose" them by defining entities within a service definition in the srv/ folder. This process creates the OData or REST endpoints necessary for an application to interact with the data. Without a service model entity, the application has no interface to perform CRUD (Create, Read, Update, Delete) operations.
Why the other options are incorrect:
B. Associations:
These are used to define relationships (e.g., 1:N or M:N) between entities. While they are vital for data navigation and deep inserts, an association itself does not expose an entity to the network; it only links them internally.
C. Aspects:
These are reusable building blocks or mixins (such as cuid, managed, or temporal). They are used to simplify the definition of entities by automatically adding common fields like UUIDs or timestamps, but they do not handle the exposure of data.
D. Data model entity:
This is the internal representation of the database table. Defining a data model entity creates the table schema in SAP HANA or SQLite, but it remains "hidden" from the application layer until a service entry is created to project it.
References:
SAP Help Portal: Core Data Services (CDS) - Services and Projections.
CAPire (Official CAP Documentation): Under "Providing Services," it specifies that "Services define the API of an application... they consist of entities that are usually projected from the underlying data model."