Microsoft DP-800 Practice Test 16
Question 150
BrightPath Studios is responsible for an Azure SQL or Microsoft SQL workload. A trigger updates the same table that fires it. Operational evidence: Unexpected recursive firing causes repeated work. What operational condition would provide the earliest useful regression warning?
- Monitor nested trigger failures and recursion errors
- Monitor uncommitted transactions and reconciliation errors
- Monitor procedure version compatibility and failures
- Monitor trigger duration and log growth
Explanation
Correct Answer
A:
Unexpected recursive firing causes repeated work. Monitor nested trigger failures and recursion errors. A trigger that writes back into its source table may fire again under allowed nesting. Check recursion settings and ensure its logic is idempotent.
Incorrect Answers
B:
“Monitor uncommitted transactions and reconciliation errors” concerns Partial updates violate business invariants; the reported problem instead is Unexpected recursive firing causes repeated work. Monitor nested trigger failures and recursion errors. A trigger that writes back into its source table may fire again under allowed nesting. Check recursion settings and ensure its logic is idempotent.
C:
“Monitor procedure version compatibility and failures” concerns Client parses messages rather than explicit output fields; the reported problem instead is Unexpected recursive firing causes repeated work. Monitor nested trigger failures and recursion errors. A trigger that writes back into its source table may fire again under allowed nesting. Check recursion settings and ensure its logic is idempotent.
D:
“Monitor trigger duration and log growth” concerns Trigger was written assuming a single row in inserted; the reported problem instead is Unexpected recursive firing causes repeated work. Monitor nested trigger failures and recursion errors. A trigger that writes back into its source table may fire again under allowed nesting. Check recursion settings and ensure its logic is idempotent.
Question 151
At Lakeview Services, an org chart needs managers several levels above employees. The observed constraint is: Single self-join only returns one level. What initial check best narrows the technical cause without altering business data?
- Inspect the JSON path and scalar type expectation
- Inspect parent-child keys and potential cycles
- Inspect array structure and declared types
- Inspect nullability and exclusion matching keys
Explanation
Correct Answer
B:
Single self-join only returns one level. Inspect parent-child keys and potential cycles. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Incorrect Answers
A:
“Inspect the JSON path and scalar type expectation” concerns SQL filter needs one scalar region field; the reported problem instead is Single self-join only returns one level. Inspect parent-child keys and potential cycles. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
C:
“Inspect array structure and declared types” concerns Business logic needs one relational row per array element; the reported problem instead is Single self-join only returns one level. Inspect parent-child keys and potential cycles. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
D:
“Inspect nullability and exclusion matching keys” concerns A NOT IN subquery can behave unexpectedly with NULL values; the reported problem instead is Single self-join only returns one level. Inspect parent-child keys and potential cycles. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Question 152
A database engineer at Crownridge Travel is investigating this case: An org chart needs managers several levels above employees. The relevant finding is: Single self-join only returns one level. Which proposed change is the most suitable response to the observed constraint?
- Use REGEXP_REPLACE with reviewed expression where supported
- Use JSON_VALUE with a validated scalar path and appropriate conversion
- Use a recursive CTE with safe termination and cycle controls
- Use OPENJSON with a WITH schema to project item rows
Explanation
Correct Answer
C:
Single self-join only returns one level. Use a recursive CTE with safe termination and cycle controls. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Incorrect Answers
A:
“Use REGEXP_REPLACE with reviewed expression where supported” concerns Need a controlled transformation without naive substring edits; the reported problem instead is Single self-join only returns one level. Use a recursive CTE with safe termination and cycle controls. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
B:
“Use JSON_VALUE with a validated scalar path and appropriate conversion” concerns SQL filter needs one scalar region field; the reported problem instead is Single self-join only returns one level. Use a recursive CTE with safe termination and cycle controls. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
D:
“Use OPENJSON with a WITH schema to project item rows” concerns Business logic needs one relational row per array element; the reported problem instead is Single self-join only returns one level. Use a recursive CTE with safe termination and cycle controls. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Question 153
Oakridge Advisors is responsible for an Azure SQL or Microsoft SQL workload. An org chart needs managers several levels above employees. Operational evidence: Single self-join only returns one level. What isolated pilot would provide the strongest evidence before rollout?
- Compare known similar and dissimilar synthetic names
- Test a small tree with a known hierarchy depth
- Query a tiny network with a known valid route
- Compare known 50th/95th percentile test samples
Explanation
Correct Answer
B:
Single self-join only returns one level. Test a small tree with a known hierarchy depth. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Incorrect Answers
A:
“Compare known similar and dissimilar synthetic names” concerns Exact equality misses likely matches; the reported problem instead is Single self-join only returns one level. Test a small tree with a known hierarchy depth. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
C:
“Query a tiny network with a known valid route” concerns Need to find direct relationships between connected facilities; the reported problem instead is Single self-join only returns one level. Test a small tree with a known hierarchy depth. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
D:
“Compare known 50th/95th percentile test samples” concerns Average obscures slow tail requests; the reported problem instead is Single self-join only returns one level. Test a small tree with a known hierarchy depth. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Question 154
At Horizon Communications, an org chart needs managers several levels above employees. The observed constraint is: Single self-join only returns one level. Which acceptance result most directly demonstrates the requirement has been satisfied?
- Ancestor chain is correct and recursion stays bounded
- Region extraction returns expected scalar or handled null/error
- Parsed row counts and typed fields match the payload
- Each row carries the correct cumulative amount
Explanation
Correct Answer
A:
Single self-join only returns one level. Ancestor chain is correct and recursion stays bounded. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Incorrect Answers
B:
“Region extraction returns expected scalar or handled null/error” concerns SQL filter needs one scalar region field; the reported problem instead is Single self-join only returns one level. Ancestor chain is correct and recursion stays bounded. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
C:
“Parsed row counts and typed fields match the payload” concerns Business logic needs one relational row per array element; the reported problem instead is Single self-join only returns one level. Ancestor chain is correct and recursion stays bounded. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
D:
“Each row carries the correct cumulative amount” concerns A GROUP BY removes per-day running context; the reported problem instead is Single self-join only returns one level. Ancestor chain is correct and recursion stays bounded. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Question 155
A database engineer at Brookfield Labs is investigating this case: An org chart needs managers several levels above employees. The relevant finding is: Single self-join only returns one level. What operational condition would provide the earliest useful regression warning?
- Monitor downstream schema changes
- Monitor malformed arrays and conversion errors
- Monitor deep hierarchies and MAXRECURSION incidents
- Monitor schema drift and invalid JSON
Explanation
Correct Answer
C:
Single self-join only returns one level. Monitor deep hierarchies and MAXRECURSION incidents. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Incorrect Answers
A:
“Monitor downstream schema changes” concerns Application currently concatenates JSON strings manually; the reported problem instead is Single self-join only returns one level. Monitor deep hierarchies and MAXRECURSION incidents. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
B:
“Monitor malformed arrays and conversion errors” concerns Business logic needs one relational row per array element; the reported problem instead is Single self-join only returns one level. Monitor deep hierarchies and MAXRECURSION incidents. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
D:
“Monitor schema drift and invalid JSON” concerns SQL filter needs one scalar region field; the reported problem instead is Single self-join only returns one level. Monitor deep hierarchies and MAXRECURSION incidents. A recursive CTE can follow parent-child relationships beyond one join, but must handle cycles and safe termination.
Question 156
Cascade Manufacturing needs the latest status row per device without deleting its complete event history. Multiple updates for the SAME device may share the same event timestamp; an EventSequence column uniquely orders those ties. Before writing a ROW_NUMBER filter, which investigation ensures a deterministic latest-row choice?
- Inspect timestamps across all sensors without partitioning by DeviceId or checking the unique EventSequence tie-breaker
- Confirm engine version and ordering expectations
- Check date ordering and treatment of missing dates
- Inspect partition key and deterministic tie-break ordering
Explanation
Correct Answer
D:
Inspect the proposed ROW_NUMBER partition by device and its ORDER BY, including event time descending and a stable EventSequence tie-breaker. When two updates share a timestamp, a unique sequence or comparable deterministic key decides which is latest. The raw event history remains intact; only the selected result is filtered to rank one.
Incorrect Answers
A:
Ordering all sensor events without partitioning by device can rank one device’s update against a different device, and ignoring EventSequence leaves equal timestamps tied. For latest-per-device ROW_NUMBER, inspect the partition key and a deterministic ORDER BY with the stable sequence ID.
B:
Confirming the SQL engine version cannot establish deterministic ROW_NUMBER ranking for a device. Two updates can share EventTime; partition by DeviceId and order by EventTime descending plus unique EventSequence so the selected row is reproducibly the newest.
C:
Checking whether dates are missing is not enough when two updates have the same timestamp. ROW_NUMBER must partition by DeviceId and use EventSequence as a stable secondary order; otherwise the latest row can vary between executions.
Question 157
At Clearwater Utilities, an event stream contains repeated status updates for the same device. The observed constraint is: Need latest row per device without discarding event history. Which proposed change is the most suitable response to the observed constraint?
- Use LAG over device and event time for previous reading
- Use deterministic unique ordering and consider keyset pagination
- Use ROW_NUMBER partitioned by device ordered by event timestamp and unique key
- Use SUM OVER with ordered window frame for running totals
Explanation
Correct Answer
C:
Need latest row per device without discarding event history. Use ROW_NUMBER partitioned by device ordered by event timestamp and unique key. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
Incorrect Answers
A:
“Use LAG over device and event time for previous reading” concerns Self-joins create expensive predecessor lookup; the reported problem instead is Need latest row per device without discarding event history. Use ROW_NUMBER partitioned by device ordered by event timestamp and unique key. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
B:
“Use deterministic unique ordering and consider keyset pagination” concerns Offset-only pages skip or repeat records under changes; the reported problem instead is Need latest row per device without discarding event history. Use ROW_NUMBER partitioned by device ordered by event timestamp and unique key. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
D:
“Use SUM OVER with ordered window frame for running totals” concerns A GROUP BY removes per-day running context; the reported problem instead is Need latest row per device without discarding event history. Use ROW_NUMBER partitioned by device ordered by event timestamp and unique key. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
Question 158
A database engineer at Cedarbridge Health is investigating this case: An event stream contains repeated status updates for the same device. The relevant finding is: Need latest row per device without discarding event history. What isolated pilot would provide the strongest evidence before rollout?
- Load out-of-order duplicates and query row number one
- Load synthetic items including missing optional properties
- Query a tiny network with a known valid route
- Query valid, absent and malformed test payloads
Explanation
Correct Answer
A:
Need latest row per device without discarding event history. Load out-of-order duplicates and query row number one. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
Incorrect Answers
B:
“Load synthetic items including missing optional properties” concerns Business logic needs one relational row per array element; the reported problem instead is Need latest row per device without discarding event history. Load out-of-order duplicates and query row number one. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
C:
“Query a tiny network with a known valid route” concerns Need to find direct relationships between connected facilities; the reported problem instead is Need latest row per device without discarding event history. Load out-of-order duplicates and query row number one. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
D:
“Query valid, absent and malformed test payloads” concerns SQL filter needs one scalar region field; the reported problem instead is Need latest row per device without discarding event history. Load out-of-order duplicates and query row number one. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
Question 159
Ashwood Solutions is responsible for an Azure SQL or Microsoft SQL workload. An event stream contains repeated status updates for the same device. Operational evidence: Need latest row per device without discarding event history. Which acceptance result most directly demonstrates the requirement has been satisfied?
- Parsed row counts and typed fields match the payload
- Exactly newest deterministic row per device is selected
- Each row carries the correct cumulative amount
- Delta values match the preceding observation per device
Explanation
Correct Answer
B:
Need latest row per device without discarding event history. Exactly newest deterministic row per device is selected. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
Incorrect Answers
A:
“Parsed row counts and typed fields match the payload” concerns Business logic needs one relational row per array element; the reported problem instead is Need latest row per device without discarding event history. Exactly newest deterministic row per device is selected. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
C:
“Each row carries the correct cumulative amount” concerns A GROUP BY removes per-day running context; the reported problem instead is Need latest row per device without discarding event history. Exactly newest deterministic row per device is selected. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
D:
“Delta values match the preceding observation per device” concerns Self-joins create expensive predecessor lookup; the reported problem instead is Need latest row per device without discarding event history. Exactly newest deterministic row per device is selected. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
Question 160
At Seabrook University, an event stream contains repeated status updates for the same device. The observed constraint is: Need latest row per device without discarding event history. What operational condition would provide the earliest useful regression warning?
- Monitor duplicate rates and tie-breaking edge cases
- Monitor duplicate/missing IDs across pages
- Monitor malformed arrays and conversion errors
- Monitor query expansion and edge integrity
Explanation
Correct Answer
A:
Need latest row per device without discarding event history. Monitor duplicate rates and tie-breaking edge cases. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
Incorrect Answers
B:
“Monitor duplicate/missing IDs across pages” concerns Offset-only pages skip or repeat records under changes; the reported problem instead is Need latest row per device without discarding event history. Monitor duplicate rates and tie-breaking edge cases. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
C:
“Monitor malformed arrays and conversion errors” concerns Business logic needs one relational row per array element; the reported problem instead is Need latest row per device without discarding event history. Monitor duplicate rates and tie-breaking edge cases. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.
D:
“Monitor query expansion and edge integrity” concerns Need to find direct relationships between connected facilities; the reported problem instead is Need latest row per device without discarding event history. Monitor duplicate rates and tie-breaking edge cases. ROW_NUMBER with PARTITION BY device and a deterministic descending timestamp selects the latest event while retaining the full underlying history.