Question 720
Issue 1: An application stores flexible attributes in an NVARCHAR JSON document but queries a specific scalar property thousands of times per second. Issue 2: A service expects a database API to return a nested JSON object with named attributes rather than concatenated free-text strings. Issue 3: A normalized order table must expand an incoming JSON array into rows for validation and insertion into child records. Which complete response addresses the three issues in order?
Explanation
Correct Answer
For issue 1, exposing a searchable JSON property to an index can avoid repeatedly parsing every document during selective filtering. For issue 2, JSON construction functions preserve key/value structure without brittle manual delimiter concatenation. For issue 3, OPENJSON converts array elements into tabular data suitable for relational constraints and joins.
Incorrect Answers
Validate JSON input and use appropriate supported JSON extraction with error handling for malformed payloads; Construct the response using JSON_OBJECT or the platform's supported JSON construction functions and verify the output schema; and use OPENJSON with an explicit schema for the array entries and validate keys before relational insertion: exposing a searchable JSON property to an index can avoid repeatedly parsing every document during selective filtering.
Evaluate a supported JSON indexing strategy or an indexed computed extraction for the frequently filtered property; validate JSON input and use appropriate supported JSON extraction with error handling for malformed payloads; and use OPENJSON with an explicit schema for the array entries and validate keys before relational insertion: jSON construction functions preserve key/value structure without brittle manual delimiter concatenation.
Evaluate a supported JSON indexing strategy or an indexed computed extraction for the frequently filtered property; Construct the response using JSON_OBJECT or the platform's supported JSON construction functions and verify the output schema; and validate JSON input and use appropriate supported JSON extraction with error handling for malformed payloads: oPENJSON converts array elements into tabular data suitable for relational constraints and joins.



Developing AI-Enabled Database Solutions (DP-800) Practice Tests