Max offers up his entry as a challenge to the“relational-is-always-best set”, asking them to prove thatthe complexity of storing data in a relational form is worth thetrouble, at least for the scenario he describes.
Given that I’ve been anointed as an anti-NoSQL crusader on a number of occasions, I feel obligatedto argue on behalf of the relational model, which I will do in alater entry.
Despite being a big fan of MongoDB. As Ihave done many times in the past I encourage everyone to downloadand play around with the excellent MongoDB product. Do yourselfa favour by running through thetutorial.
All things have a place.
Recognizing the MySpace Angle And Its Inverse
I once sat in a meeting where a peer described the purportedlyintractable complexity of a task they were failing at. They didthis by drawing the various actors on the whiteboard and thendetailing their many complex relationships.
Image the best path-finding algorithm. Now imagine the opposite:The least efficient, most unnecessarily sloppy routingimaginable.
That was how complexity was deceptively exaggerated, withabsurdly circuitous relationship lines weaving to and fro. It wascomical.
That memory came to mind, and how the deception goes both ways,while reading Max’s entry, and again when reading the linkedentry by MongoDBer Kyle Banker.
When comparing the document model with the relational model,many if not all examples seem to contrast a complex relationalmodel – one that encapsulates an end-to-end platform for a wholedomain – against a trivial island of a tiny subset of data in adocument structure. The former usually built to support entireoperations and systems, while the latter tends to be crafted forone single purpose (like “allow customer services to look at anorder”, as was used in Max’s scenario).
Max highlights relational complexity by pointing to an Oracleend-to-end order reference platform containing “126 tables”.Kyle does the same thing when comparing a simplecould-be-one-single-row document (which humorous includes fourrelationships, which to resolve would require four expensiveround-trips to the MongoDB server given the platform’s bizarre lackof server joins) against a complex catalogue schema. Both explaintheir arguably deceptive comparisons with statements like “Ofcourse, this is not a complete representation of aproduct”…
I would argue that in such a case such a comparison shouldn’t bemade at all. Why contrast an incomplete example of a document-basedimplementation – simplistic in its useless innocence – against afully scoped relational platform?
It is the “MySpaceangle” used to hide the ugly reality of technology. If you havea MongoDB simile of the compared product, have at it, but simplyhiding the ugly details and zooming in on a non-functional,cherry-picked subset just misleads potential suitors.
Realtors use this trick when taking photos of homes, showingjust enough of the grass while avoiding nearby structures. Yourmind naturally extrapolates; imagining expanses of lush greenfields, when in reality there’s usually another house imposingitself four feet over.
In Defense of Relational Databases
I have a full workload right now, but in the near future, duringa mental lull, I will respond to Max. There is a very compellingcounterargument to be made.