This chapter focuses on how to work with MongoDB documents that contain embedded lists (arrays) and objects. As you learned in the previous chapter, Chapter 7, Advanced MongoDB Database Design, the complex needs of Book Someplace, Inc. resulted in a database document structure built around a series of embedded documents. In addition, certain fields are stored as arrays. To further complicate application development, some fields consist of a list of objects! An example of this is the list of reviews that is associated with each property. In this chapter, you will learn how to handle create, read, update, and delete operations that involve embedded lists and objects. You will also learn how to perform queries involving embedded objects and lists.
This chapter covers the following topics:
- Inserting a document containing embedded...