Pages

MongoDB - A Document-Oriented database (Part 1)

Introduction
MongoDB is a powerful, flexible and salable data store. It have some features such as secondary indexes, range queries, sorting as well as built in support for MapReduce-style aggregation.
MongoDB is a document oriented database, not a relational one.
Document oriented database have more features than relational databases. The basic idea is to replace the concept of a 'row' with more flexible model 'document'.  Also mongodb is schema free database, No joins and lot easier to handle data.


  • Document is basic unit of data in MongoDB, like row in a relational database.
  • Collection is like a table in relational database.
  • MongoDB comes with a simple but most powerful Javascript shell .
  • Every documet has a special key called "_id".

Setup MongoDB
  • Download the appropriate version : http://www.mongodb.org/downloads
    • Windows version
      • Extract downloaded zip file. (Ex: C:\my_mongo_dir)
      • Go to bin directory and start the mongodb server by double clicking  the mongod.exe (Before that create data/db folder inside the C:\ drive) 
      • After that start the mongo shell by double clicking the mongo.exe (It will start a shell and you can type commands)
    • Linux Version
      • Extract downloaded tar file.
      • Create /data/db in root path.
      • ./mongod to start the mongo server.
      • ./mongo to start the mongo shell.

In the next part I'll show some basic commands such as creating, remove and update documents and collections in mongoDB.

1 comment:


  1. We provides focus and result-oriented training session, which equipped you with skill development to getting best career option in the industries. We offer basic to advance level

    Oracle Fusion HCM Training

    ReplyDelete