You create a simple data model to store user information. The model contains two tables: one for the user information, and the other for user address details. The user can only have one address. You also need a view to show the complete information of the user including the address. Which actions do you perform if you use CDS artifacts only? Please choose the correct answer.
Correct Answer: D
Question 57
Which join type is NOT supported by join optimization (pruning)? Please choose the correct answer.
Correct Answer: A
Question 58
Which OData capacity do you use when you need to restrict the number or selection of exposed columns? Please choose the correct answer.
Correct Answer: D
Property projection is an OData capability that allows you to restrict the number or selection of exposed columns in an OData service. Property projection is achieved by using the $select query option, which specifies a subset of properties to be included in the response. The $select query option can be applied to a single entity, a collection of entities, or a complex type. Property projection can be used to reduce the payload size and improve the performance of the OData service. For example, suppose you have an OData service that exposes a Products entity set with the following properties: ID, Name, Category, Price, and Description. If you want to restrict the number or selection of exposed columns to only ID and Name, you can use the $select query option as follows: GET /Products?$select=ID,Name The result is: { "@odata.context": "$metadata#Products(ID,Name)", "value": [ { "ID": 1, "Name": "Laptop" }, { "ID": 2, "Name": "Mouse" }, { "ID": 3, "Name": "Keyboard" } ] } The following OData capabilities are not used to restrict the number or selection of exposed columns, but for other purposes: * Parameter entity sets: Parameter entity sets are a way to define entity sets that require one or more parameters to be specified in the request. Parameter entity sets can be used to implement function imports or actions that return a collection of entities. Parameter entity sets can also be used to filter or sort the results based on the parameters. * Aggregation: Aggregation is a way to apply aggregate functions, such as sum, count, min, max, or average, to the properties of an entity set or a complex type. Aggregation can be used to perform calculations or analysis on the data. Aggregation is achieved by using the $apply query option, which specifies a transformation pipeline with various operators, such as groupby, aggregate, filter, or order by. * Key specification: Key specification is a way to define the key properties of an entity type, which uniquely identify an entity instance within an entity set. Key specification is part of the entity type definition in the metadata document of the OData service. Key specification can be used to retrieve a single entity by its key values. References: * [OData Version 4.0 Part 2: URL Conventions], Section 5.1.1: System Query Option $select, pp. 10-11. * [OData Version 4.0 Part 3: Common Schema Definition Language (CSDL)], Section 13: Entity Model, Subsection 13.2: Entity Sets, pp. 88-89.
Question 59
You create a simple data model to store user information. The model contains two tables: one for the user information, and the other for user address details. The user can only have one address. You also need a view to show the complete information of the user including the address. Which actions do you perform if you use CDS artifacts only? Please choose the correct answer.
Correct Answer: C
The correct action is to define a User Details view using select on the user entity and using the association to read the address information. This way, you can leverage the power of CDS associations to create a join between the user and address entities without explicitly specifying the join condition. You can also use the association path to access the address fields in the view definition. This approach simplifies the data model and avoids redundancy. Option A is incorrect because it selects from the address entity instead of the user entity, which is not the desired output. Option B is incorrect because it extends the user entity with address columns, which is unnecessary and violates the normalization principle. Option D is incorrect because it creates a calculation view instead of a CDS view, which is not the requirement. Calculation views are graphical or scripted views that can be used for complex calculations and data transformations, but they are not CDS artifacts. References: * SAP HANA 2.0 SPS06 - Application Development for SAP HANA1, Section 2.2.2, p. 32-33 * SAP HANA 2.0 SPS06 - Core Data Services for SAP HANA2, Section 2.3, p. 25-26 * SAP HANA 2.0 SPS06 - Calculation View Modeling3, Section 1.1, p. 7
Question 60
Which application runtimes are currently supported by the SAP Cloud Application Programming Model? There are 2 correct answers to this question.