Answer the question
In order to leave comments, you need to log in
In what case will MongoDB be more productive?
In which of the two cases will MongoDB perform better?
There are accounts and transactions, each transaction has an amount and a link to the account.
It is necessary to display information to the user for each of his accounts, how much was spent, how much was earned, the balance.
The first option is to display information using the agreggation framework.
The second option is to keep fields on the account, earned, spent, total .... and update them when adding/changing a transaction. When displaying information to the user, a simple find'om will display the object.
Which option is better and more efficient?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question