Sample Header Ad - 728x90

NoSQL- automatically cache and update references to other documents as embedded

1 vote
1 answer
642 views
To avoid having to look up referenced documents, one practice is to embed them (e.g. https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-many-relationships-between-documents/) . Is there a way to have those embedded documents actually be separate and be referenced yet be "automatically embedded" like by some sort of functionality which automatically stores their data in the document which is referencing them - almost like an automatic "embedding cache" of sorts. I'm not referring to them being automatically retrieved by reference, but an actual copy being stored and updated automatically. I know this could be built manually, but I'm wondering what may exist already which can do this, preferably something inherent to MongoDB, but it doesn't have to be. While I'm asking this about MongoDB in particular, if someone knows of something like this for other NoSQL databases, I'd be interested to hear about that as well as an answer.
Asked by g491 (121 rep)
Mar 9, 2017, 05:13 PM
Last activity: Apr 3, 2025, 12:04 PM