I am almost ready to work on a large application; a couple of days ago I saw Martin Fowler talk about "NOSQL". After that, I realized that I was using Mongo as a relational db, so I decided to reorganize my schema. But I heard a lot about honesty from a guy coming from the world of RDBMS; I really understand how important this is, and can data integrity be achieved in the NOSQL engine?
To be more explicit, here is a simple example:
Let's say I have the essence product, inventoryin my system,
and in my product definition inventorylink product_id,
and currently inventoryin my mongo collection it looks like this:
{'inventory' :{'product_id' : '1', 'count' : 15}}
So, I can save inventory, like this on my system:
{'inventory' :{'product' : {'id' : 1, 'name' : 'book'}, 'count' : 15}}
and still achieve data integrity? What if I change the name of the product _id : 1in the object product, then what happens - will there be a cycle for updating all collections inventory?
source
share