vendredi 30 janvier 2015

Using MongoDB with circular object references


Please forgive me from the beginning. I am brand new to document oriented databases and I am sure that I will need guidance to reform the question in order to get answers.


I am looking to use MongoDB for an application built in php. As part of the object specification, some objects reference their parents. From what I have read, this is an issue with performing updates on a document in Mongo, as it stores a copy of the object in the page rather than a reference. I understand that this provides for a significant performance increase on read, but that it can cause a significant penalty on writes/updates as each copy of the object needs to be updated. Also, if it stores a complete copy of the parent object, then does that not cause infinite recursion?


Maybe I am missing something of how Mongo manages the references, or maybe I am doing something wrong with the schema design, but it seems like I am missing something.


Thank you in advance for your guidance and advice!





Aucun commentaire:

Enregistrer un commentaire