I’ve got my hands on a large, normalized database in MongoDB (LONG STORY for another time…).
After a few months of study I believe I have a solid grasp on how/where to appropriately denormalize data, so I’m preparing to do just that. However, as I’ve been studying the Aggregation Pipeline (shout out to the MongoDB University course! ) I’ve also been using them to create Views of data from across a bunch of collections. These Views appear sufficient to provide the (read-only) data the frontend needs to display for reports/large tables/etc…
My question: Does it make sense to take the time/effort to maintain a large & highly-denormalized database or can I get by on a few key denormalized fields + some well-aggregated Views?
For the Record: I’m using MongooseJS with ObjectID refs everywhere & more-than-less one schema Model per collection. That architecture has allowed me to use Populate when pulling small-to-medium batches of [normalized] data, easy peasy. The catch is that Populate isn’t so great for pulling huge swaths of multi-level referenced data (& MongooseJS never promised as much/I’m not pointing fingers ), so that’s why I’ve been considering denormalization–despite the notion that implementing & maintaining it could be a hassle. Then gaining a hint of AggPipeline proficiency got me curious re the effectiveness of using Views–especially for read-only data.
I understand this topic could potentially live in Drivers & ODMs but I’m not here to ask about MongooseJS or debate Populate’s effectiveness, etc. Mostly I’m curious if anyone has any input and/or if there are known pitfalls re creating a large handful of views to make querying a highly-normalized MongoDB considerably faster/more efficient.
Thank you in advance for any responses!