Exercise 3: Choosing the Right Engine for Two Workloads — Possible Solution ==================================================================== WORKLOAD (a): A SMALL WORDPRESS-BASED BLOG -> MYSQL ------------------------------ Per this chapter's own "when to choose each" table, MySQL is favored for "read-heavy web apps, WordPress-style CMS workloads" specifically — this is the chapter's own explicit, named example. A small WordPress blog is a read-heavy content-serving application (most requests are simply displaying existing pages/posts, with occasional writes for new content or comments), which matches this row directly. It also benefits from the chapter's other named MySQL strength: "LAMP-stack tooling maturity and simplicity" — WordPress itself is part of that same LAMP-stack ecosystem, and its hosting/deployment tooling is built around MySQL as the default assumption. WORKLOAD (b): A COMPLEX, DEEPLY NESTED PRODUCT CATALOG WITH HEAVY JSON USAGE -> POSTGRESQL ------------------------------ Per this chapter's own table, PostgreSQL is favored for "JSON-heavy hybrid relational/document workloads" — again, an explicit, named match. A product catalog with complex, deeply nested data and heavy JSON usage is precisely the scenario the chapter identifies as Postgres's own strength, previewing this course's own postgres1-4 chapter on JSONB. The table's other PostgreSQL-favoring row — "complex queries, data-integrity-critical applications" — also applies here, since a deeply nested catalog structure likely requires more sophisticated querying than a simple content-display workload does. WHY THIS DECISION USES THE CHAPTER'S OWN CRITERIA, NOT A GENERAL PREFERENCE ------------------------------ Both decisions map directly onto specific, named rows in this chapter's own comparison table rather than a general belief that one engine is superior. Per the chapter, "this isn't 'Postgres is better'... plenty of real organizations run both simultaneously for different workloads" — which is exactly what this exercise demonstrates: the same organization could reasonably run a MySQL-backed blog and a Postgres-backed product catalog side by side, each chosen for the specific workload it actually serves. WHY THIS WORKS AS AN ANSWER ------------------------------ It matches each workload to the chapter's own explicitly named table rows rather than an unsupported general preference, and explicitly notes that choosing differently for each workload is consistent with the chapter's own "neither is universally better" framing.