MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values of fields may include other documents, arrays, and arrays of documents.
The advantages of using documents are:
MongoDB provides high performance data persistence. In particular,
Yes, it is faster than RDBMS database. With same hardware spesification, MongoDB can operate faster than RDBMS database. I prove my selft after longtime ago using PostgeSQL, MS SQL and MySQL. Response time reduce very significant event I’m using ORM base frameworks.
I’m done a lot of queries for MongoDB database from programming language. It’s all depend on algoritmh in programming language it self and customizeable. It’s a litte different than using Stored Procedure or Function on RDMS that will eat a lot of hardware resources.
MongoDB supports a rich query language to support read and write operations as well as:
MongoDB’s replication facility, called replica set, provides:
A replica set is a group of MongoDB servers that maintain the same data set, providing redundancy and increasing data availability.
MongoDB provides horizontal scalability as part of its core functionality:
MongoDB supports multiple storage engines:
In addition, MongoDB provides pluggable storage engine API that allows third parties to develop storage engines for MongoDB.
Install MongoDB on ubuntu is very easy using apt-get. Here’s the step:
1. Import public key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
2. Create list for MongoDB
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
3. Reload local package
sudo apt-get update
4. Install MongoDB Packages
sudo apt-get install -y mongodb-org
That it, you just can run your newly installed MongoDB.
1. To manually start MongoDB server
$ sudo service mongodb start
2. Run MongoDB console
$ mongo
And now you can start populate data in your MongoDB. To stop MongoDB, simply hold alt+C or run
$sudo service mongodb stop
#MongoDB #databases #webdev