Database Reference
In-Depth Information
document objects contained within a collection will largely share the same
structure.
These collections can be queried through a JSON-based query language.
To improve performance, elements of each document can be indexed using
a secondary-index system. MongoDB provides a variety of interesting
indexing options that make it a popular choice for certain applications,
particularly those that deal with physical spaces, because it has
out-of-the-box support for indexing and querying geographic information.
Getting Set Up
To get set up with MongoDB, the 10gen MongoDB website has packages
available for a number of platforms at http://mongodb.org/downloads .
Unlike Redis and many other NoSQL options, MongoDB even supports
Windows as a first-class citizen. For deployment on Linux systems, Ubuntu
and Debian packages are available, making deployment to platforms like
EC2 fairly easy as well.
The MongoDB server executable is called mongod and starting it without
arguments causes it to look for a /data/db directory. You can override this
by passing the --dbpath argument on the command line:
$ mkdir db
$ ./mongod --dbpath ./db
[initandlisten] MongoDB starting : pid=6722 port=27017
dbpath=./db
[initandlisten]
[initandlisten] ** WARNING: soft rlimits too low.
Number of files is
256, should be at least 1000
[initandlisten] db version v2.4.8
[initandlisten] git version:
a350fc38922fbda2cec8d5dd842237b904eafc14
[initandlisten] build info: Darwin
bs-osx-106-x86-64-2.10gen.cc 10.8.0
Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41
PDT 2011;
root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64
BOOST_LIB_VERSION=1_49
Search WWH ::




Custom Search