Database Reference
In-Depth Information
51.915288,
4.472786
]
}
}
}
],
"stats" : {
"time" : 6,
"nscanned" : 3,
"avgDistance" : 75868.7847632543,
"maxDistance" : 125006.87383713324
},
"ok" : 1
}
That completes our introduction to geospatial information for now; however, you'll see a few more examples that
show you how to leverage geospatial functions in this topic's upcoming chapters.
Using MongoDB in the Real World
Now that you have MongoDB and its associated plug-ins installed, and you have gained an understanding of the data
model, it's time to get to work. In the next five chapters of the topic, you will learn how to build, query, and otherwise
manipulate a variety of sample MongoDB databases (see Table 3-1 for a quick view of the topics to come). Each
chapter will stick primarily to using a single database that is unique to that chapter; we took this approach to make it
easier to read this topic in a modular fashion.
Table 3-1. MongoDB Sample Databases Covered in This Topic
Chapter
Database Name
Topic
4
Library
Working with data and indexes
5
Test
GridFS
6
Contacts
PHP and MongoDB
7
Inventory
Python and MongoDB
8
Test
Advanced Queries
Summary
In this chapter, we looked at what's happening in the background of your database. We also explored the primary
concepts of collections and documents in more depth; and we covered the datatypes supported in MongoDB, as well
as how to embed and reference data.
Next, we examined what indexes do, including when and why they should be used (or not).
We also touched on the concepts of geospatial indexing. For example, we covered how geospatial data can be
stored; we also explained how you can search for such data using either the regular find() function or the more
geospatially based geoNear database command.
In the next chapter, we'll take a closer look at how the MongoDB shell works, including which functions can be
used to insert, find, update, or delete your data. We will also explore how conditional operators can help you with all
of these functions.
 
Search WWH ::




Custom Search