I'm working on the design of a web application I'm going to be developing in Python.
I've been looking at Postgre and Mongo, and after some Wikipedia research it occured to me that I had no idea why you would choose one over the other.
From what I understand OOD better replicate real-life and work very efficienetly with OOL (like Python), but they're less efficient "when data is simple and relationships are simple." (What defines "simple?")
On the other hand, RDBs have been around longer and thus have better support and documentation, and Postgre in particular is process based which makes it a huge memory hog.
So, how would/do you decide what [type of] database to use for your project?
Page 1 of 1
2 Replies - 383 Views - Last Post: 24 January 2014 - 09:25 AM
Replies To: How to Choose Relational Versus OO?
Re: How to Choose Relational Versus OO?
Posted 24 January 2014 - 09:25 AM
In terms of the technology, I prefer the RDBMS because it is tried and true, they have been around forever. I would only use something like MongoDB if there's a specific reason for not using the RDBMS. Some applications warrant both, maybe your application stores a lot of data but there are various metrics (e.g. for a forum - post counts, view counts, etc) that would get accessed a lot and you don't want to keep calculating. You would store all of your data in the RDBMS, but store the frequently-accessed metrics inside a key/value store like memcached or Redis. You won't lose any data, because it will be secure in your RDBMS, but instead of needing to calculate those metrics for every page view, and to avoid the slower database lookup, you can store some of the data in the faster memory-based database. I would not store application-critical data in something like Redis at this point though, I would make sure I have everything saved in a persistent data store. Even if Redis writes to disk every 100 milliseconds, there's always a window for data loss.
Page 1 of 1