Hello MongoDB users,
I am also on the verge of becoming a MongoDB user...except that I have a slight problem.
TL;DR version: The other people working with me on my project have grown up with RDBMS, and I'm not able to get them to see the benefits of MongoDB. When I list the features offered by Mongo, they don't seem to be reading it properly, quoting old RDBMS lore without reference to context. At least, that's what it seems like to me. I'm wondering if any of the arguments actually make sense. Since I haven't really used Mongo yet, I'm not able to validate/counter their arguments, but maybe someone else in this community will be able to help me?
Skip the
Some Details if you wish; what I want is info about how to deal with
The Response that I'm getting. Are any of the points actually a valid concern
against using MongoDB? The main issue: how to get people to at least
look at another database?
Some DetailsHere's a brief outline of the app I'm developing. It's a program, for use in a library, to keep track of books and other items that have been borrowed. Similar to projects like OpenBiblio. (The difference is that, unlike other library management programs, this is one where the users themselves record which books they have borrowed, instead of the librarian doing all the recording). I'm developing it as a webapp using Python, Flask, and, until now, peewee+SQLite. While trying to set up the database structure, I've been running into several problems which, though not unsolvable in SQL, can be solved much more elegantly using Mongo.
One main thing is that a borrowable item can be a book, magazine, single article, or multiple other things. Each of these item types will have different fields (author and ISBN for book, issue and volume number for magazine, etc.) and yet will need to be stored in a single table as a "borrowable". The SQL solution says, "Put all the columns in one table and make the type-specific ones nullable". But this makes things very messy in the Python code, and things like DRY principles break down almost immediately. The Mongo solution of "Use one collection, but use a different set of fields on the document depending on the type" works much better, and works perfectly and Pythonically using the MongoEngine library. Then there are other features like list-fields and multi-value indexes which are going to make implementations like multiple authors and search-by-tag much easier.
If anyone is interested,
https://github.com/badrihippo/growlin. Note that I haven't uploaded my experimental Mongo code yet.
Oh, and to put things into perspective: I'm 18 and doing the actual coding; the others (including the person helping with db design) are 40+.
The ResponseHere is the kind of response I'm getting
[annotated with my thoughts]:
- On Mongo, we are not confident on meeting the performance and scalability objective that we defined earlier. [don't know about this...this is where I need help]
- Similarly, we are not confident that Mongo is aligned to the constraint that we have pertaining to easy maintenance of the application and data in future – the fact that data handling itself may require scripting is quite a challenge for future. [actually, I don't see it as a problem so much as an extra feature. I doesn't seem like I'll need to use it anytime soon, anyway]
- Our database design discussions and structure finalizations were done assuming MySQL or an RDBMS layer. If we need to move out of RDBMS, it is important to design again looking at what is the best design option for MongoDB – it doesn’t make sense to use the same DB design for Mongo – it may be suboptimal. [actually, coming from a Python/OOP background I can easily redesign the database layout for Mongo...and have already done a draft. Using ORMs for object-oriented interaction, MongoDB models come to the mind intuitively: it's actually the SQL design decisions that can sometimes seem wildly unobvious]
- Mongo is not RDBMS and we do not know if it is suited for a library application whereas any RDBMS and therein MySQL gives us the following benefits
a. RDBMS in general is proven for data handling, especially for applications like a library software. [judging by all the workarounds I've seen going into the app, it actually seems to me that RDBMS is definitely the wrong software to use!]
b. It meets the objectives and is aligned to the constraints of easy maintenance and availability of expertise
c. A proven database brings forth lot of stability
d. How to handle issues with a proven database are pretty much documented - We need to give a huge importance to the fact that we have to migrate old data from [the previously existing program] to [the new program I'm developing] – RDBMS lends to ease of migration. [so does Mongo, if you haven't noticed. Data import is more about scripting, not about the database. And I think I heard a mention of server-side scripting somewhere...]
- Decision on underlying database should never be driven by ease of development, but based on what is required for long term stability, scalability, performance and ease of handling of data. [um...but don't you think the developer, who is the one looking at the final queries, will also have a good idea about which database seems better suited for the purpose?]
My question
Are any of these points valid? Specially point 4 which seems to say "people have always used RDBMS, therefore MongoDB is bad". It'll be nice if anyone can share experiences of Mongo's performance and scalability (whether positive or negative) so that I can have concrete examples/statistics to base my arguments/decisions on.
Sorry for this sudden and long post. It seems a bit out of place with all the technical discussions going on, but, well, this is the only forum I could think of. And hopefully this different kind of issue will give you a bit of a break ;)