Advance xpath Flashcards

1
Q

Which operation can be used to select a specific set of rows in a table?

Selection

Elimination

Set operation

Projection
A

Selection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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
A

one version of the objects from both lists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What operation combines the data from two different entities into one table?

Set union

Projection

Set difference

Cartesian product
A

Cartesian product

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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.
A

It allows you to select attributes for all objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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.
A

To filter on strings and dates in XPath queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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%]
A

[%BeginOfCurrentDay%] - 1 * [%WeekLength%]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.
A

You are using the function on a string that is set to ‘unlimited’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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.
A

The ‘and’ operator will give a different result based on how you write the XPath query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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.
A

Generates a slow query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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.
A

When comparing to a related entity, it is enough to stop at the association to get the most optimal query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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.
A

You should apply indexes on attributes that are used in searches when the performance of your app is not up to par.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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.
A

The removal of duplicate data from your domain model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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.
A

To remove duplicate data from your app so you can avoid insertion, update, and deletion anomalies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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.
A

The duplication of information in several entities to increase performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly