MongoDB
25.5k 5.5kWhat is MongoDB ?
MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need.
Components
mongod- The database server.mongos- Sharding router.mongo- The database shell (uses interactive javascript).
Download MongoDB
- https://www.mongodb.com/try/download/community
- Using homebrew
brew tap mongodb/brew - Using docker image
docker pull mongo
Building
See Building MongoDB.
Running
For command line options invoke:
$ ./mongod --helpTo run a single server database:
$ sudo mkdir -p /data/db$ ./mongod$$ # The mongo javascript shell connects to localhost and test database by default:$ ./mongo> helpInstalling Compass
You can install compass using the install_compass script packaged with MongoDB:
$ ./install_compassThis will download the appropriate MongoDB Compass package for your platform and install it.
Drivers
Client drivers for most programming languages are available at
https://docs.mongodb.com/manual/applications/drivers
Use the shell (mongo) for administrative tasks.
Packaging
Packages are created dynamically by the `buildscripts/packager.py“ script. This will generate RPM and Debian packages.
Learn MongoDB
- Documentation - https://docs.mongodb.com/manual/
- Developer Center - https://www.mongodb.com/developer/
- MongoDB University - https://learn.mongodb.com