Based on the background of RDBMS, I always had the impression “Try your best to use one query, considering it effective”, which means that it is expensive for every query you make in the database. When it comes to MongoDB, it looks like it might not be possible because you cannot join tables.
I understand that it does not have to be relational, but they also push it towards goals such as blogs, forums, and all that I can find RDBMS with.
There are some freezes that I tried to understand the effectiveness of MongoDB or NoSQL as a whole. If I wanted to get all the "messages" associated with specific users (as if they were grouped) ... using MySQL, I would probably make several joins and get them with it.
In MongoDB, assuming I need separate collections, would it be efficient to use large $ in: ['user1', 'user2', 'user3', 'user4', ...]?
After some time, does this method slow down? Should I include 1000 users? And if I needed to get a list of messages related to users of X, Y, Z, it would be efficient and / or fast to use MongoDB:
- Get an array of users
- Get user messages in an array of users
2 requests for one request. Is this bad practice in NoSQL?
database mysql mongodb nosql
Matt Kenefick Mar 01 '11 at 16:25 2011-03-01 16:25
source share