E
E
Eugene2017-07-03 22:35:44
MongoDB
Eugene, 2017-07-03 22:35:44

MongoDB database design?

Good evening!
I recently started learning MongoDB and I can't get used to the SQL approach. I read a bunch of articles on habré and foreign resources, it seems that everything is clear with examples, but in reality it’s not.
For example, let's imagine that you need to design a database for a browser-based RPG. We have collections Users(id, name, pass), Characters(id, users_id, char_name, char_level), NPC(id, name), Quests(id, name, quest_giver_npc, quest_complete_npc), Completed_Qestst(id, quest_id, char_id) .
Something like this, for example. There are no problems with MySQL. But how to design such a database with monge.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mountaineer, 2017-07-13
@nimfai

Take a course in M101J: MongoDB for ... Developers
You don't read articles from habr like that right off the bat.
Main idea: denormalization.
Characters put in Users as an array
Completed_Qestst put in Users as an array
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question