A company is running a MySQL database on Amazon RDS and needs to store JSON documents that are frequently queried by fields within the JSON. The company wants to reduce development complexity and improve query performance. Which RDS MySQL feature should the database specialist recommend?
MySQL's JSON data type allows efficient storage and querying using JSON path expressions and indexes.
Why this answer
Option B is correct because MySQL 8.0's native JSON data type stores JSON documents in an optimized binary format, enabling efficient indexing and querying via JSON path expressions (e.g., `JSON_EXTRACT`, `->`, `->>`). This reduces development complexity by allowing direct SQL access to JSON fields without application-level parsing, and improves query performance through generated columns and virtual indexes.
Exam trap
The trap here is that candidates may assume DynamoDB (Option A) is the only way to handle JSON efficiently, overlooking MySQL 8.0's native JSON support which avoids cross-service complexity while providing comparable query capabilities.
How to eliminate wrong answers
Option A is wrong because migrating to DynamoDB introduces a separate NoSQL service, increasing architectural complexity and requiring application changes, whereas the requirement is to stay within RDS MySQL. Option C is wrong because storing JSON in VARCHAR(MAX) and using LIKE operations is inefficient—LIKE cannot leverage indexes for JSON field queries and requires full table scans, degrading performance. Option D is wrong because storing JSON as BLOBs and parsing in application code offloads query logic to the client, increasing development complexity and preventing server-side indexing or optimization of JSON fields.