V
V
Vitaly2016-11-18 08:39:51
MongoDB
Vitaly, 2016-11-18 08:39:51

What problems and risks do you know, and how to solve them in nosql?

In particular, we are talking about MongoDB. I know 3 most famous problems:
1. lack of transactions
2. lack of join
3. non-blocking access
Next, I will briefly talk about what I managed to dig up.
We will omit data connectivity, because it is usually more convenient to set it programmatically, besides, there are ORM frameworks. Instead of transactions, it would be possible to record all document changes at once, but this does not allow ORM frameworks to show up ... although, maybe I don't know about the implementation of transactions in mongoose? Join with a one-to-many relationship is not needed at all, but if there are many-to-many relationships, you can work through id and again create a connection programmatically.
What scares me the most is that the database does not block read access when overwriting is in progress (and vice versa). Perhaps you can suggest competent solutions to the listed problems and add new ones that I missed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bnytiki, 2016-11-18
@bnytiki

1. There are transactions there. Not as advanced as in RDBMS, but there are quite a few atomic operations. It is possible to make also "sample update" for one step - than not transaction.
2. Join is not needed. If you are like Mongo with relational DBMS approaches, everything will be bad. In Mongo, it's easier to keep an extra copy of the data in the object/table itself (to avoid Join) for faster fetching
3. Since when is this a disadvantage? Oracle - the richest corporation has been for many years. Their RDBMS of the same name is non-blocking.
ORM frameworks?
Why are they with Mongo?
Do you know what the letter R stands for in the ORM name?
They are not needed.
As for what scared you - learn the "language" of Mongo. There it is possible to make both reading and processing and record in one atomic operation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question