Mongodb with rails
Mongodb Rails 3.
.
Mongodb:
--> Mongodb is an open source document -oriented database system.
--> Its the type of NoSQL .document oriented means it storing data as JSON format , so all we have here json format , simply key ,value pairs , generally we can see in relational database all the data is stored in tables and we mantains relationships among the tables we called these as relational databases.
--> One of the greater advantage of document oriented databases is it does not store the unused data . Here is small example so that we can understand more deeply
{
Name: “Ratnakar”,
Hobby: “Playing Guitar”
}
this is we call document . As I said before document contains key , value where each key represents one column in relational database. And i have another record(document) which stores some more extra fields
{
Name: “Ratnakar”,
Hobby: “Playing Guitar”
}
{
Name: “Ratnakar”,
Hobby: “Playing Guitar”
Designation : Developement Engineer,
Location : AP
}
so if we observe clearly the difference between relational and document oriented databases , unlike the relational databases where each record would have the same set of fields and unused fields might be kept empty,there are no empty fields in documents
--> No need of joins becoz documents and arrays reduces need of joins and many of advantages are there .
Document oriented Relational based
----------------------------------- -----------------------------------
collections databases
documents tables
filelds (key ,value) row and column
I hope this will give some sort of idea to start learning mongodb ..I welcome your comments on this article so that i can improve further .thank you
Cheers,Ratnakar
0 comments: