P
P
PAJCH2015-12-28 14:45:55
MongoDB
PAJCH, 2015-12-28 14:45:55

What is the best way to implement the mongodb structure?

Hello, such a question: "For example, I have 1.000.000 users on the service. And every day the total number of messages reaches 1.000.000. What is the best way to implement the database structure:
1) When registering a user, automatically create a collection for him?
2) Store all messages (in a year there will be about half a billion of them) in one collection, for example messages"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timur Shemsedinov, 2015-12-28
@PAJCH

In one, of course, do not invent tricks, read the monga documentation section about data modeling https://docs.mongodb.org/v3.0/core/data-modeling-i... and create indexes. So it will be much more convenient to work with data, search for it, backup and manipulate it.

D
Dimonchik, 2015-12-28
@dimonchik2013

you can in one
www.hi-lo.ru/article/mongodb-architecture-4
but in general these guys share well on the topic
habrahabr.ru/company/badoo/blog

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question