- Ad hoc queries
Any field in a MongoDB document can be indexed (indexes in MongoDB are conceptually similar to those in RDBMSs). Secondary indices are also available.
MongoDB provides high availability and increased throughput with replica sets. A replica set consists of two or more copies of the data. Each replica may act in the role of primary or secondary replica at any time. The primary replica performs all writes and reads by default. Secondary replicas maintain a copy of the data on the primary using built-in replication. When a primary replica fails, the replica set automatically conducts an election process to determine which secondary should become the primary. Secondaries can also perform read operations, but the data is eventually consistent by default.
- File storage
MongoDB can be used as a file system, taking advantage of load balancing and data replication features over multiple machines for storing files.
- Capped collections
MongoDB supports fixed-size collections called capped collections. This type of collection maintains insertion order and, once the specified size has been reached, behaves like a circular queue.
- These are some of the features of MongoDB. MongoDB offers more features.
Adding MongoDB PGP key.
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv 7F0CEB10
Add MongoDB repository to ‘/etc/apt/sources.list.d’ folder.
echo ‘deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen’ | sudo tee /etc/apt/sources.list.d/mongodb.list
update local package database.
sudo apt-get update
Installing latest version of MongoDB available for Debian.
sudo apt-get install mongodb-org
Access MongoDB shell.
We now have MongoDB installed on your Debian Server. If you have any problem feel free to leave a comment below.