Answer the question
In order to leave comments, you need to log in
How to design relationships in MongoDB?
I decided to transfer the database of the card game to MongoDB, but due to working with relational databases, I don’t quite understand how to do it correctly (in terms of the least load).
There are many cards that players can create and add to their collection, all cards, among other things, are combined into groups (clans).
Given:
Answer the question
In order to leave comments, you need to log in
I decided to transfer the card game database to MongoDB
Help to understand, please.You have a relational data structure, for this you should use an RDBMS.
Here, apparently, it is worth looking at the architecture of the game server in general. For example, it may be beneficial to have this collection of maps loaded at startup and always stored in the server's memory, only synchronized with Mongo. Then you will have a list of card ids in the documents for the player, and then in the application you will associate it with the actual list of cards with parameters. For most cases this will work. then you need to look at the number of cards, users, operations with them, scaling - but this will already be the level of thousands of players online, which will be just a super-cool take-off for the game.
well, it's stupid to stuff relational data into a document-oriented mongu
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question