Advance xpath Flashcards
Which operation can be used to select a specific set of rows in a table?
Selection Elimination Set operation Projection
Selection
The Set Union operation combines two lists into one that contains:
all elements that appear in only one of the two lists all elements from both lists one version of the objects from both lists all elements that exist in both lists
one version of the objects from both lists
What operation combines the data from two different entities into one table?
Set union Projection Set difference Cartesian product
Cartesian product
What does the Projection operation do?
It allows you to project an entity onto a data view. It allows you to add two lists into one. It allows you to select attributes for all objects. It allows you to select objects from an entity.
It allows you to select attributes for all objects.
What can you use a constrain function for?
To select objects based on enumerations. To use Java in your XPath queries. To call a microflow into your XPath. To filter on strings and dates in XPath queries.
To filter on strings and dates in XPath queries.
Which of the queries below can be used to filter on dates a week in the past?
[%BeginOfCurrentDay%] - 1 * [%WeekLength%] [%CurrentDay%] - 1 * [%WeekLength%] [%BeginOfCurrentDay%] - [%WeekLength%] [%BeginOfCurrentDay%] - 1 * [%Week%]
[%BeginOfCurrentDay%] - 1 * [%WeekLength%]
One of your XPath queries that use the contains() function is not performing very well. What is the most likely root cause?
You have implemented a custom function in JavaScript. You are using the function on a string that is set to 'unlimited'. You are using the function on an attribute that is not a string. You have not implemented a separate XPath query for all the languages that your app is using.
You are using the function on a string that is set to ‘unlimited’.
When using the and operator:
The 'and' operator needs to be followed by two brackets to work. You can use the 'and' operator everywhere in an XPath expression. The 'and' operator will give a different result based on how you write the XPath query. The 'and' operator is not available unless you have a boolean attribute in your entity.
The ‘and’ operator will give a different result based on how you write the XPath query.
The not() function:
Generates the same query as the != operator. Cannot be used when you use the or the operator. Can only be used on boolean attributes. Generates a slow query.
Generates a slow query.
Which statement best describes how you would retrieve all related objects in the most optimal way?
When you use an object in your XPath, you need to compare it to an entity directly like this: [Sales.Customer_Account/Administration.Account = $currentUser] to get the most optimal query. You can only compare an object to the id attribute of an entity of the same type to get the most optimal query. When comparing to a related entity, it is enough to stop at the association to get the most optimal query. Mendix will optimize your XPath expressions at runtime.
When comparing to a related entity, it is enough to stop at the association to get the most optimal query.
When should you apply an index?
You should apply indexes on attributes that are used in searches when the performance of your app is not up to par. You should always apply indexes on all your attributes; that makes your app faster. You should only apply indexes on boolean attributes. Mendix will apply indexes where needed, you don’t need to worry about that.
You should apply indexes on attributes that are used in searches when the performance of your app is not up to par.
What is normalization?
The addition of attributes to your entities to store data in multiple places to your app runs faster. The addition of entities to your domain model that help you track normal behavior of your app. The removal of duplicate data from your domain model. The act of removing unneeded entities from your domain model.
The removal of duplicate data from your domain model.
Why would you want to do normalization?
To prepare your app for deployment on a cloud node. To increase the performance of your XPath retrieves. To remove duplicate data from your app so you can avoid insertion, update, and deletion anomalies. To make your domain model easier to read.
To remove duplicate data from your app so you can avoid insertion, update, and deletion anomalies.
What is denormalization?
The duplication of information in several entities to increase performance. The removal of XPath expressions to increase performance. The addition of more associations to your domain model to increase performance. The addition of more entities in your domain model to increase performance.
The duplication of information in several entities to increase performance.