Database Reference
In-Depth Information
1.
Lots of drivers! A driver is a translator between a program and a platform (the
platform in this case being MongoDB). MongoDB has an official set of drivers
whose core functions, such as find( ) and update( ), are described in Chapter 4 .
In addition, the development community has many other drivers for various lan-
guages support such as for Ruby, Python, and C++. The full list of drivers appears
at http://docs.mongodb.org/ecosystem/drivers/ . This allows developers to use their
language of choice and leverage their existing skills to build MongoDB applica-
tions even faster and more efficiently.
I NSTALLING M ONGO DB
The MongoDB installation guide, http://docs.mongodb.org/manual/installation/ , has well-
written instructions on how to install MongoDB on the various operating systems. I
followed these instructions and downloaded the Windows executable from ht-
tp://www.mongodb.org/downloads . After the file finished downloading, I double-clicked
on the executable and followed the steps for installation.
After installation was complete, I set up a default directory where all of the data can be
stored. To do this, I right-clicked on the command prompt icon and chose “Run as Admin-
istrator,” and then typed this statement to set up the default directory:
mkdir -p \data\db\
Once you set up your default directory, you can start the MongoDB server. If you still have
the command prompt window open after creating the default directory, type in this state-
ment to start the MongoDB server:
C:\mongodb\bin\mongod.exe
If you need to open the command prompt window, always right-click on the command
prompt icon and choose “Run as Administrator.” I ran the above statement with no para-
meters, and therefore the MongoDB server will use the default data directory, \data\db\.
You can run both the client and server on the same machine. To run a client, just open an-
other command prompt window (also with “Run as Administrator”) and initiate the client
by typing:
C:\mongodb\bin\mongo.exe
Search WWH ::




Custom Search