Expand Your Domain Modeling Skills Flashcards

1
Q

What is another way of calling an association?

A

Reference.

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

How many associations can you add between two entities?

A

Many associations of various multiplicity.

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

What is a good reason to choose to use an Information Entity instead of multiple associations?

A

You want to display additional information about an association.

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

Which of the event handlers does always need to return a boolean return value?

A

The before commit.

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

When an entity is declared persistable what happens in terms of database operations?

A

When an entity is declared persistable a database table is created for that entity. Committing an instance of such an entity results in a row being inserted into this table storing attribute and association information in the database.

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

What is the fate of non-persistable entities in terms of database storage?

A

Non-persistable entities cannot be stored in the database and have no associated database table. While it is possible to commit a non-persistable entity the commit only stores the current attribute and association values in memory not in the database. This information is garbage collected at the end of the session.

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

What is a transient object in Mendix?

A

A transient object is an object created in memory that exists only in memory and not in the database. When an object is created the database is not accessed except for retrieving AutoNumber information if attributes of this type are present.

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

In associations between non-persistable and persistable entities where does the ownership of the association lie?

A

In associations between non-persistable and persistable entities the ownership of the association must always lie on the side of the non-persistable entity.

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

How can you visually identify whether an entity is persistable or non-persistable without opening the properties screen?

A

You can identify whether an entity is persistable or non-persistable by looking at the color of the entity. Non-persistable entities have a different color.

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

What are some limitations of non-persistable entities in Mendix?

A

Non-persistable entities in Mendix cannot have validation rules on the Domain Model and can’t have indexes as these are features associated with the database.

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

Why would you use non-persistable entities despite their rules and limitations?

A

Non-persistable entities are useful when certain data should not be stored in the database. This could be due to data being process-related connected to a transaction or sensitive information that by law cannot be stored. Non-persistable entities ensure that such data cannot be committed to the database avoiding unnecessary table creation and clutter in the database.

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

What is a calculated attribute in Mendix?

A

A calculated attribute is defined in the domain model and gets its value the moment it is accessed. The value is determined using a chosen microflow which is executed at every subsequent retrieve of the attribute ensuring the value is always up-to-date.

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

Why is it recommended to minimize the use of calculated attributes?

A

It is recommended to minimize the use of calculated attributes because they execute a microflow on every access of the entity impacting performance. Additionally these values cannot be used directly when querying the database.

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

What is the downside of using calculated attributes in terms of database querying?

A

Calculated attributes cannot be used directly when querying the database since their values don’t exist in the database.

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

Why should you try to store derived values in the database rather than using calculated attributes?

A

Storing derived values in the database is recommended to improve performance. Using event handlers to automatically commit new derived values when they change is a best practice to achieve this.

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

When is it appropriate to use a calculated attribute?

A

It is appropriate to use a calculated attribute when a value changes very often. The rule of thumb is: If it changes more than you look at it use a calculated attribute. If you look at it more often than the value changes store it in the database.

17
Q

How can you recognize a calculated attribute in the Domain Model?

A

A calculated attribute in the Domain Model can be recognized by the little microflow icon it has behind its name.

18
Q

For which of the following entity types does Mendix create a database table?

A

For persistable entities.

19
Q

What happens on commit of a non-persistable entity?

A

Current attribute values and association values are stored in memory.

20
Q

What would be a good situation to use a calculated attribute?

A

When a value changes more often than it is viewed.

21
Q

Where can you define cross-module associations in Mendix?

A

In the Domain Model.

22
Q

What is the purpose of dividing an app into multiple modules in Mendix?

A

To organize the app on a functional level. The System module contains basic data structures the Administration module manages accounts and other modules are used for building the app.

23
Q

What is the System module in Mendix and what does it contain?

A

The System module is essential for running the app and contains basic data structures such as users files and sessions. It is off-limits meaning developers can’t change its contents.

24
Q

How can cross-module associations be useful in Mendix?

A

Cross-module associations allow you to connect data from different modules enabling relationships between entities in separate modules.

25
Q

In the provided example how can Adrian make players have an account in Mendix?

A

Adrian can create a cross-module association from the Player entity to the Account entity.

26
Q

Besides creating cross-module associations what alternative approach can be used to connect entities from different modules?

A

Making the Player entity inherit from the Account entity.

27
Q

What is the purpose of the Administration module in Mendix?

A

The Administration module allows users to have and manage accounts.

28
Q

How many modules does a newly created Mendix app typically have?

A

A newly created Mendix app typically has three modules: System Administration and MyFirstModule.

29
Q

Can developers modify the contents of the System module in Mendix?

A

No the System module is off-limits and developers cannot change its contents.

30
Q

What are the four system members that you can store in the database in Mendix?

A
  • createdDate: The date and time that the object was created. - changedDate: The date and time that the object was last changed. - owner: The user that created the object. - changedBy: The user that last changed the object.
31
Q

Why isn’t information about system members stored in the database by default in Mendix?

A

By default this information isn’t stored in the database to avoid cluttering the database with unnecessary information especially when dealing with a large number of objects.

32
Q

How can you choose to store system members in Mendix?

A

You can choose to store system members by checking them in the properties of the entity.

33
Q

How can the owner system member be used in combination with access rules?

A

In future app iterations the owner system member can be used in combination with access rules to allow only the user who created a team to change the team’s details and players.

34
Q

When connecting 2 entities of 2 different modules how do we typically call that association?

A

Cross-module association.

35
Q

When connecting 2 entities of 2 different modules how do we typically call that association?

A

Cross-module association.

36
Q

Which of the following options list system members that can be stored as indicated in the properties of an entity?

A

Created Date Changed Date Owner ChangedBy.

37
Q

Which of the following terms is used to indicate a user that created the object of the given entity?

A

Owner.