Expert Developer | Architecture & Performance | Grade A
Verified | Pass Guaranteed - A+ Graded
[Section 1: Advanced Domain Modeling & Data Architecture (Q1-12)]
Q1. A Mendix 10 domain model uses a three-level inheritance hierarchy: Person
(generalization) ← Employee (specialization) ← Manager (specialization). When
retrieving all Person objects from the database, which database behavior occurs?
A. Mendix performs a single table scan on the Person table only.
B. Mendix executes a SQL UNION query across the Person, Employee, and Manager
tables to reconstruct the full inheritance tree.
C. Mendix retrieves only Person instances that are not specializations, excluding
Employee and Manager rows.
D. Mendix caches the entire hierarchy in the client memory to avoid database joins.
Correct Answer: B
Rationale: B. Mendix executes a SQL UNION query across the Person, Employee, and
Manager tables to reconstruct the full inheritance tree. [CORRECT] — In Mendix, each
entity in an inheritance hierarchy maps to its own table with a foreign key to the
generalization table. Retrieving the generalization requires querying all specialization
tables and combining results, which introduces performance overhead compared to flat
associations. Deep inheritance hierarchies should be avoided for high-volume
transactional entities.
,Q2. An application defines a before commit event handler on the Order entity that
updates an associated Customer status, which triggers a before commit event on
Customer. The microflow logic eventually commits the original Order again. What is
the most likely runtime consequence?
A. The transaction completes successfully with no side effects.
B. Mendix detects and prevents the recursive event loop automatically.
C. A stack overflow or transaction timeout occurs due to uncontrolled event handler
recursion.
D. The second commit is silently ignored because Mendix deduplicates commits on the
same object within a single transaction.
Correct Answer: C
Rationale: C. A stack overflow or transaction timeout occurs due to uncontrolled event
handler recursion. [CORRECT] — Mendix does not automatically prevent recursion
across event handlers. If a before-commit event on Entity A commits Entity B, whose
before-commit event commits Entity A again, an infinite loop can occur. Developers
must guard against recursion using static variables, state checks, or redesigning the
logic to avoid circular event triggers.
Q3. A Product entity has a calculated attribute TotalValue defined by a microflow
that multiplies Price by Quantity. The application displays a data grid with 500
Product rows. Which performance impact should the architect expect?
A. The calculated attribute is computed once at application startup and cached
indefinitely.
,B. The microflow executes once per row during page load, potentially causing 500
microflow executions and significant memory overhead.
C. The database pre-computes the value using a materialized view.
D. Mendix automatically converts calculated attributes into persistent columns after
100 retrievals.
Correct Answer: B
Rationale: B. The microflow executes once per row during page load, potentially causing
500 microflow executions and significant memory overhead. [CORRECT] —
Microflow-based calculated attributes are computed on-the-fly every time the object is
retrieved or displayed. In grids or large lists, this creates an N×M execution pattern. For
performance-critical scenarios, use stored attributes updated by event handlers or
after-commit logic instead of microflow-calculated fields.
Q4. An Invoice entity owns a one-to-many association to InvoiceLine. The delete
behavior is set to Cascade. When a user deletes an Invoice object, what happens to
the associated InvoiceLine objects?
A. The foreign key in InvoiceLine is set to null, orphaning the records.
B. The associated InvoiceLine objects are automatically deleted by the runtime.
C. The delete operation is blocked unless all InvoiceLine objects are manually
removed first.
D. The Invoice is soft-deleted, and InvoiceLine records remain unchanged.
Correct Answer: B
Rationale: B. The associated InvoiceLine objects are automatically deleted by the
runtime. [CORRECT] — Cascade delete behavior instructs the Mendix runtime to
, recursively delete all associated child objects when the parent is deleted. This ensures
referential integrity at the application level but requires caution to avoid accidental mass
deletion. The Keep option would preserve children, while Delete with constraint
would block the parent deletion if children exist.
Q5. An architect must choose between generalization and a one-to-many association
for modeling Vehicle and Car. Which factor most strongly favors using an
association instead of inheritance?
A. The need to enforce that every Car is exactly one Vehicle.
B. The requirement to query all Vehicle instances frequently without SQL UNION
overhead.
C. The desire to store Car-specific attributes in the same table as Vehicle.
D. The need for Mendix to automatically enforce type polymorphism in microflows.
Correct Answer: B
Rationale: B. The requirement to query all Vehicle instances frequently without SQL
UNION overhead. [CORRECT] — Inheritance in Mendix creates separate tables for
specializations, requiring UNION queries to retrieve the generalization. If the application
frequently retrieves all "vehicles" regardless of type, a flat entity with associations or a
single-table design avoids this performance penalty. Associations also provide more
flexible relationships (e.g., a car could change vehicle types) and avoid deep inheritance
hierarchies.
Q6. A domain model contains two entities, Department and Employee, with a
many-to-many association owned by Department. Which database structure correctly
represents this association?