i try to research about MongoDB, today i use MySQL 5.5.
i have a SaaS services and need one database there can handle a lost of data, rows and more, and its need to be fast.
What i can read is MongoDB is DB in the servers memery if its true, what happen if server go down?
in MySQL all its storge on the harddrive, but the database can handle more then server allow, else you need somthink like cluster database and autoload balance.
What i have read the MongoDB its easy to setup to run on more computers, but is that true?
I hobe on somthink help here, maby its not MySQL or MongoDB i need, maby its a 3 database setup?
MongoDB is a non-relational database. no joins, no rows, no columns. It’s Document based.
MySQL is a relation database.
For example: We have some servers. Each server has a name, ip, admins, and OS. But some servers have extra data ‘master’.
If is_slave == true: print name of the master server.
In MongoDB (without index; it’s not relevant here):
You can see the master field is not required, so you don’t need to define it in each document instead of
null/0values. And you can define an Array (admins) instead of related tables. In master field: we define an object with two properties: name (for print name of the server) and a reference (we can create a link withdoc['master']['server']['$id']or we can fetch with an other query the full document of the master server).In MySQL we need a servers, an admins and a server_admins table (least) and some unnecessary fields whose value is
null.MongoDB and MySQL is not same category. MongoDB is a non-relational, MySQL is a relational database. Completely different logic and attitude need to MongoDB or MySQL.
A perfect compare grid: MongoDB, CouchDB, MySQL Compare Grid at http://www.mongodb.org