Database Reference
In-Depth Information
Figure 2-5. The Python shell
You can use the import command to tell Python to start using the freshly installed extension:
>>> import pymongo
>>>
Note
You must use the import pymongo command each time you want to use pyMongo.
If all went well, you will not see a thing, and you can start firing off some fancy MongoDB commands. If you
received an error message, however, something went wrong, and you might need to review the steps just taken to
discover where the error occurred.
Summary
In this chapter, we examined how to obtain the MongoDB software, including how to select the correct version you
need for your environment. We also discussed the version numbers, how to install and run MongoDB, and how to
install and run its prerequisites. Next, we covered how to establish a connection to a database through a combination
of the shell, PHP, and Python.
We also explored how to expand MongoDB so it will work with your favorite programming languages, as well as
how to confirm whether the language-specific drivers have installed correctly.
In the next chapter, we will explore how to design and structure MongoDB databases and data properly. Along
the way, you'll learn how to index information to speed up queries, how to reference data, and how to leverage a fancy
new feature called geospatial indexing .
 
 
Search WWH ::




Custom Search