Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which best fits my needs: MongoDB, CouchDB, or MySQL. Criteria defined in question

Our website needs a content management type system. For example, admins want to create promotion pages on the fly. They'll supply some text and images for the page and the url that the page needs to be on. We need a data store for this. The criteria for the data store are simple and defined below. I am not familiar with CouchDB or MongoDB, but think that they may be a better fit for this than MySQL, but am looking for someone with more knowledge of MongoDB and CouchDB to chime in.

On a scale of 1 to 10 how would you rate MongoDB, CouchDB, and MySQL for the following:

  • Java client
  • Track web clicks
  • CMS like system
  • Store uploaded files
  • Easy to setup failover
  • Support
  • Documentation

Which would you choose under these circumstances?

like image 547
Bradford Avatar asked Oct 06 '10 14:10

Bradford


People also ask

Should I use MongoDB or MySQL?

MySQL is an excellent choice if you have structured data and need a traditional relational database. MongoDB is well-suited for real-time analytics, content management, the Internet of Things, mobile, and other types of applications.

What is the difference between MySQL and MongoDB?

MongoDB is a document-based non-relational database management system. It's also called an object-based system. It was designed to supplant the MySQL structure as an easier way to work with data. On the other hand, MySQL is a table-based system (or open-source relational database).

Can MongoDB replace MySQL?

It's unlikely MongoDB will completely replace MySQL, but it's possible that both structured and unstructured databases will be used for different purposes in one environment. Developers interested in enterprise programming should learn both platforms to stay competitive in the job market.

Why MongoDB is faster than MySQL?

As MongoDB stores a large volume of unstructured data and follows a document-based storage approach, it's relatively faster than MySQL. It means MongoDB stores data in a single document for an entity and helps in faster data read or write.


1 Answers

Each one is suitable for different usecases. But in low traffic sites mysql/postgresql is better.

Java client: all of them have clients

Track web clicks : mongo and cassandra is more suitable for this high write situation

Store uploaded files : mongo with gridfs is suitable. cassandra can store up to 2gb by each column splitted into 1 mb. mysql is not suitable. storing only file location and store the file in the filesystem is preffered for cassandra and mysql.

Easy to setup failover : cassandra is the best, mongo second

Support : all have good support, mysql has the largest community, mongo is second

Documentation : 1st mysql, 2nd mongo

I prefer MongoDB for analytics (web clicks, counters, logs) (you need a 64 bit system) and mysql or postgresql for main data. on the companies using mongo page in the mongo website, you can see most of them are using mongo for analytics. mongo can be suitable for main data after version 1.8. the problem with cassandra is it's poor querying capabilities (not suitable for a cms). and the problem with mysql is not as easy scalable & HA as cassandra & mongo and also mysql is slower especially on writes. I don't recommend couchdb, it's the slowest one.

my best

Serdar Irmak

like image 117
sirmak Avatar answered Oct 25 '22 18:10

sirmak