O'Reilly logo

MongoDB in Action by Kyle Banker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Queries and aggregation

 

In this chapter
  • Querying an e-commerce data model
  • The MongoDB query language in detail
  • Aggregation with map-reduce and group

 

MongoDB doesn’t use SQL. Rather, it features its own JSON-like query language. We’ve been exploring this language throughout the book, but here we turn to some meatier, real-world examples. In particular, we’re going to revisit the e-commerce data model introduced in the last chapter and present a variety of queries against it. Among the queries you’ll practice are _id lookups, ranges, ordering, and projections. We’ll also survey the MongoDB query language as a whole, looking at each available query operator in detail.

In addition to queries, we’ll cover the related topic of aggregation. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required