InterviewSolution
Saved Bookmarks
| 1. |
When “fast reads” are a key criteria, what is the best recommended modeling to represent relationships like one-to-one and one-to-many in MongoDB? |
|
Answer» Once selected, the shard key can't be changed LATER automatically. Hence it should be chosen after a lot of consideration. The distribution of the documents of a collection between the cluster shards is based on the shard key. EFFECTIVENESS of the chunk distribution is important for the efficient QUERYING and WRITING of the MongoDB database and this effectiveness of the chunk distribution is directly related to the shard key. That is why choosing of the right shard key up front is of utmost importance. |
|