the-magical-marvels-of-mongodb-slides
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
More Features <strong>of</strong> Embedded Documents<br />
User<br />
Data readily available<br />
SHELL<br />
db.users.find({},{"email": true, "favorites": true})<br />
Favorites<br />
Atomic write operations<br />
SHELL<br />
db.users.insert({<br />
"username": "Azrius",<br />
"email": "azrius@example.com",<br />
"favorites": ["Newt...", "Sleeping", "Love"]<br />
})<br />
Guarantee that <strong>the</strong> document write<br />
completely happens or doesn’t at all