The concept of NoSql
May be this could be a new idea for you..No-sql. We are gonna break all traditional database concepts with this damn Nosql. This is wonderful, easy and much faster than a relational data. That’s the only reason we can use these kind of database apps for large scale web applications. No-sql is the term which is used to indicate the databases that doesn’t use the traditional relational concepts for storing, processing and retrieve data…and here we have a good example -Apache Couch Database.. Couch DB is one of the best examples for a Nosql database…Let me share how we can use these things (or what I did it with that) ..I don’t blame anyone on using a relational database like mySql, but I can assure you that, if you use a No-sql stuff then you will be free from unwanted schema structure and all that comes in relationship with a relational database. And no doubt it will help you to fast-up your webapp if you are planning for a big scale web app ..
More about Apache CouchDB
How we define Apache CouchDB? I like to tell what it does more than defining it
- CouchDB is a kind of no-sql database server aka Document Database server accessible througn JSON API’s
- It is schema free and completely ad-hoc, you can access them via post methods
- It works distributed, robustness in performance incremental replication along with bi-directional conflict detection and management
- It is index-able, Query-able easy to use with jQuery and PHP(which is the best part for developers )
CouchDB manages the data as Couch documents. And each document contains different fields and their values. These documents are json based structure and easy to send data via http methods.
Let me show one simple example to a couch Document
"Name" : "Josemon",
Installing CouchDB on your server
Here I am gonna use my Ubuntu machine, which I use as my experimental server. That is much simpler to do.
First of all install some pre-requirements (open up the terminal and use each of the following commands)
sudo apt-get install g++
sudo apt-get install erlang-base erlang-dev erlang-eunit erlang-nox
sudo apt-get install libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool
sudo apt-get install curl
Now download the sources from couchDB website. navigate to the folder where couchDB source is located via terminal and use the following commands to configure it
sudo make install
That’s it, now you can start the couch db using the following command
Did you get this message ??
Apache CouchDB 1.2.0 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.32.0>] Apache CouchDB has started on http://127.0.0.1:5984/
You have it successfully in your Ubuntu.