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.
Some Features <strong>of</strong> Embedded Documents<br />
User<br />
Data readily available<br />
With a single query, we can grab a user’s<br />
email and <strong>the</strong>ir addresses<br />
SHELL<br />
db.users.find({},{"email": true, "favorites": true})<br />
Favorites<br />
{<br />
}<br />
"_id": ObjectId(...),<br />
"email": "azrius@example.com"<br />
"favorites": [<br />
"Newt Tonic",<br />
"Sleeping",<br />
"Love"<br />
]