J
J
Jemeron2014-06-10 06:18:28
MySQL
Jemeron, 2014-06-10 06:18:28

What tasks do you use MongoDB for?

I started learning Mongo, but have not yet seen much profit regarding relational databases. Yes, you do not need to specify the structure, yes, the data can be stored in a denormalized form, without joins. But it is still difficult to switch the head from one model to another for a real project. After all, for example, I can store data in Mysql in a denormalized form. Exactly as in some cases, I and for Mongo will have to describe a separate collection for some bundles (for example, a set of page tags in order to search for them and the actual tags associated with the page), which will already resemble join .
So I would like to ask, for what tasks do you use Mongo and why did you abandon the relational structure for these tasks? For example, I've heard that Mongo is good for logging.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Osher, 2014-06-10
@miraage

I have many entities with localized data like:

var feedback = {
    text: {
        ru: 'Отличная работа, доволен.',
        en: 'Great work.'
    },
    client: {
        ru: 'Вася Пупкин',
        en: 'Vasya Poupkin'
    },
    images: [
        '/img/2f3/2f32fawb5umaw95bm0a95ab2b2a09b2h.png',
        '/img/2f3/2f32fawb5umaw95bm0a95ab2b2a09b2z.png',
    ],
    shown: true
};

And for other localized data (news, promotions).
Moreover, for different subsystems there can be an arbitrary number of languages.
I do MongoCollection::createIndex in migrations, in ActiveRecord models I created scopes for locales so that only the necessary fields can be pulled through $project.

P
Puma Thailand, 2014-06-10
@opium

profit when you have a thousand inserts per second

M
Maxim Vasiliev, 2014-06-11
@qmax

mongo is a document-oriented database.
This is much more consistent with the objects of the subject area in dofig what tasks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question