Re:MongoDB, Data Durability and Improvements coming in 1.8
by megaman821 on Tuesday January 11, 2011 @12:23PM
(#2092647)
This is what views are for. If it is easier to work with the data denormalized, create a view with a few joins. Some views can even have updates directly applied to them.
Re:MongoDB, Data Durability and Improvements coming in 1.8
by steveklabnik on Tuesday January 11, 2011 @12:25PM
(#2092663)
You're not exactly helping with the "Mongo is significantly less complicated to model my data with" argument. ;)
But still, good to know. I'm bad with views. :[
Re:MongoDB, Data Durability and Improvements coming in 1.8
by lwat on Monday January 10, 2011 @07:59PM
(#2090402)
If the amount of data you're storing is so small you should definitely consider de-normalizing it until it's easy enough to work with. When you eventually scale up to millions of Foos you'll probably want to get it back to 3NF.
There is nothing wrong with denormalized data in your DB and denormalizing doesn't mean you'd have been better off with some random NoSQL solution. Especially considering that the entire rest of your DB is still very much relational data so what happens to all of that when you dump Postgre for Mongo?
Re:MongoDB, Data Durability and Improvements coming in 1.8
by steveklabnik on Monday January 10, 2011 @08:20PM
(#2090456)
It's not really random, though. I made a comment elsewhere in this thread, but Mongo is _almost_ a freaking Object database as far as Ruby is concerned. I could do it either way, but doing it with an RDBMs feels like BDSM compared to the loose and fast feel of developing with Mongo.
That said, I always try to use what's right. I don't care how easy it is to store credit card numbers is... I'll just use BrainTree's Vault product instead. ;)
In this case, I would have less than 200 types, and probably under 1000 Foo records total. Updates wouldn't have been a problem. The pain was much bigger than the upside. Especially designing the forms that would end up creating those rows...
It's not that it doesn't work. It's that it's not a 'this always fits' solution.