Personal Catalogue: React, Express & MongoDB — Chapter 2, Exercise 2 ===================================================================== TASK Explain why this course chose Mongoose discriminators over four separate MongoDB collections (one per item type), and name the one real feature that choice specifically simplifies. SOLUTION Four separate collections (books, cds, dvds, blurays) would be a perfectly workable MongoDB design on its own — each collection could have exactly the fields its own item type needs, with no shared schema to negotiate. The real cost shows up the moment the app needs to answer this project's own core question: "do I already own this?" across every item type at once. With four separate collections, that search has to run four separate queries — one per collection — and merge the results together in application code afterward. Discriminators avoid that cost directly, because every item type still writes into one shared underlying collection. A search across the whole catalogue is a single Item.find({ ... }) query, not four queries merged by hand — exactly the same real benefit Chapter 1's own tip-box promised before discriminators were actually built. The one real feature this specifically simplifies is cross-type search and browsing — the single most common real action in a personal catalogue app ("what do I own that matches this?"). Anything that only ever needs to look at one item type in isolation (like Chapter 5's own book-only tag filtering) doesn't benefit from this the same way, since querying a single discriminator model like Book.find() is no simpler or harder than querying a dedicated books collection would have been. WHY THIS WORKS AS AN ANSWER ---------------------------- It names the real, concrete cost of the rejected alternative (a four-way query merge) rather than a vague "collections are worse" claim, identifies the specific real feature (cross-type search) that discriminators exist to simplify, and is honest that the benefit isn't universal — some queries don't care either way.