Showing posts with label MongoDB. Show all posts
Showing posts with label MongoDB. Show all posts

Saturday, October 15, 2011

My Experience of Installing MongoDB on Ubuntu

In my last post I have write some very basic and initial points related to MongoDB. That was my initial observation of what MongoDB is and what are its basic features.

This article does not contains the detailed step by step tutorial of how to install MongoDB on Ubuntu. There are already lots of articles available on the installation of MongoDB on Ubuntu &Windows operating systems. In this post I am going to write my experience of Installing MongoDB on Ubuntu.

There are two common ways of installing any kind of software on Ubuntu. One is by using the "Ubuntu Software Center" and other is to download the package and install it manually. Option one is commonly used by users as it is very simple and it automatically download and install the target software on Ubuntu. In the case of MongoDB both option can be used for installation.

For testing purpose I have installed MongoDB using the Software Center (you can also use apt-get command that also download and install package from Software Center). Initially it works good by using it from terminal. I can able to start and stop MongoDB and execute different types of queries. The problem begins when I try to use MongoDB programmaticaly. I cannot able to connect with MongoDB using Java and Eclipse IDE even MongoDB is running and can be used from terminal. So, I have removed all the packages of MongoDB and install it manually. After that I am able to use it via terminal as well as programmatically.

This seems to be something related to version issue as also mentioned on this link. If someone knows what is the actual reason of this different behavior on different installation options do comment here. This is what I have experienced when installing and using MongoDB on Ubuntu.

rizzz86

Sunday, October 9, 2011

MongoDB: {name:"mongo", type:"DB"}

“MongoDB” as the name suggest, is a database that can be used to store data and apply other operations on the data later on. It is not a relational database like (MySQL, Oracle, MSSQL etc), but it provides all the basic operations that eases developer’s life in playing with the stored content. The name is a bit funny for me when I first heard it, but really it is built on some serious concept that opens number of questions of something alternative of relational databases. The concept is of NoSql / non-relational database.

MongoDB (from "humongous") is a scalable, high-performance, open source, document-oriented database. Written in C++

RDBMS has ruled the database world alone for a long time and always remains the only option for most of the software industry to go for it as their first option. Yes, lots of questions are there to choose which RDBMS to use and how the data will be structured within it. With some powerful concept of querying, maintain the integrity, indexing of data etc within RDBMS how come MongoDB’s concept will compete with it? What is the concept on which MongoDB is built? Is MongoDB fully replaceable to RDBMS? Are there other databases built on the same concept? Many more questions are there in this debate, so just have a look how MongoDB is different from relational databases.

MongoDB store data in documents. Yes, a document that have key-value pair. There is a predefined structure of MongoDB that starts with Database -> Collections -> Documents & -> Fields. So there is not any brainstorming sessions on how to structure our data. Just answer How many collections do we have, and what are they?.

One of the most important features of MongoDB is that it provided Indexing on data. This feature makes it different from other No SQL databases. It also support to query data from database. 

 If you're moving to MongoDB from a relational database, you'll find that many SQL queries translate easily to MongoDB's document-based query language. 

Other important features include Replication, Auto-Sharding, Batch Processing etc. Detail of each feature will be part of other posts as soon as I explore them and create some examples.


rizzz86