Use case for storing pages of text like articles as key:value pairs

Hi @anjanesh,

This is a great use case for MongoDB, but I would encourage you to think about how your data model might be adjusted to take advantage of MongoDB’s indexing and flexible schema rather than doing a direct 1:1 translation of an existing SQL schema. You could start with a direct translation, but this typically misses out on some benefits like easier querying and better performance.

A general difference in approach with MongoDB is that you should think about how your data will commonly be used rather than how the data will be stored. This is the opposite of traditional RBDMS data model design, where you first design a highly normalised schema and then work out how to write and optimise your queries.

For example, if your word application is built around finding synonyms and antonyms, it might make sense to combine related data in a single MongoDB collection instead of requiring multiple queries or $lookup aggregation to join data. You originally mentioned searching strings in text, so I’m guessing there is a specific subset of data (and type of searching) that you’d like to optimise.

The resources I suggested earlier will be helpful, and you should also check out some of the talks from our recent MongoDB.live conference. I’ve highlighted some of the interesting talks I’ve seen so far in another forum topic (see: MongoDB.live session highlights) and the first two talks happen to be about data modelling:

Regards,
Stennie