Database Reference
In-Depth Information
Surveying the Installation Layout
After you install or extract MongoDB successfully, you will have the applications shown in Table 2-1 available in the
bin directory (in both Linux and Windows).
Table 2-1. The Included MongoDB Applications
Application
Function
-- bsondump
Reads contents of BSON-formatted rollback files.
-- mongo
The database shell.
-- mongod
The core database server.
-- mongodump
Database backup utility.
-- mongoexport
Export utility (JSON, CSV, TSV), not reliable for backup.
-- mongofiles
Manipulates files in GridFS objects.
-- mongoimport
Import utility (JSON, CSV, TSV), not reliable for recoveries.
-- mongooplog
Pulls oplog entries from another mongod instance.
-- mongoperf
Check disk I/O performance.
--mongorestore
Database backup restore utility.
--mongos
Mongodb shard process.
--mongosniff
Sniff/traces MongoDB database activity in real time, Unix-like systems only.
--mongostat
Returns counters of database operation.
--mongotop
Tracks/reports MongoDB read/write activities.
-- mongorestore
Restore/import utility.
Note: All applications are within the --bin directory.
The installed software includes 15 applications (or 14, under Microsoft Windows) that you will be using in
conjunction with your MongoDB databases. The two “most important” applications are the mongo and mongod
applications. The mongo application allows you to use the database shell; this shell enables you to accomplish
practically anything you'd want to do with MongoDB.
The mongod application starts the service or daemon , as it's also called. There are also many flags you can set
when launching the MongoDB applications. For example, the service lets you specify the path where the database is
located ( --dbpath ), show version information ( --version ), and even print some diagnostic system information
(with the --sysinfo flag)! You can view the entire list of options by including the --help flag when you launch the
service. For now, you can just use the defaults and start the service by typing mongod in your shell or command prompt.
Using the MongoDB Shell
Once you create the database directory and start the mongod database application successfully, you're ready to fire up
the shell and take a sneak peak at the powers of MongoDB.
Fire up your shell (Unix) or your command prompt (Windows); when you do so, make sure you are in the correct
location, so that the mongo executable can be found. You can start the shell by typing mongo at the command prompt
and hitting the Return key. You will be immediately presented with a blank window and a blinking cursor (see Figure 2-1 ).
Ladies and gentlemen, welcome to MongoDB!
 
Search WWH ::




Custom Search