Difference between MongoDB, CouchDB and MySQL

MongoDB is most popular database now days in software and web development. MongoDB (from “humongous”) is a scalable, high-performance, open source NoSQL database. This is Written in C++ languages.In this tutorial we will discuss features of mongoDB comparison between MongoDB vs CouchDB and MySQL.

Main featured of mongo db
Document-oriented
  • Documents (objects) map nicely to programming language data types
  • Embedded documents and arrays reduce need for joins
  • Dynamically-typed (schemaless) for easy schema evolution
  • No joins and no multi-document transactions for high performance and easy scalability
High performance
  • No joins and embedding makes reads and writes fast
  • Indexes including indexing of keys from embedded documents and arrays
  • Optional streaming writes (no acknowledgements)
High availability
  • Replicated servers with automatic master failover
Easy scalability
  • Automatic sharding (auto-partitioning of data across servers)
  • Reads and writes are distributed over shards
  • No joins or multi-document transactions make distributed queries easy and fast
  • Eventually-consistent reads can be distributed over replicated servers

Checkout other Recommended Tutorials,

  • Top 6 RESTful API Frameworks for PHP
  • MongoDB vs CouchDB vs MySQL Comparison Chart

    Difference between MongoDB vs CouchDB vs MySQL

      CouchDB MongoDB MySQL
    Data Model Document-Oriented ( JSON) Document-Oriented BSON) Relational
    Data Types string,number,boolean,array,object string, int, double, boolean, date, bytearray, object, array, others link
    Large Objects (Files) Yes (attachments) Yes (GridFS) Blobs
    Horizontal partitioning scheme CouchDB Lounge Auto-sharding Partitioning
    Replication Master-master (with developer supplied conflict resolution) Master-slave and replica sets Master-slave, multi-master, and circular replication
    Object(row) Storage One large repository Collection-based Table-based
    Query Method Map/reduce of javascript functions to lazily build an index per query Dynamic; object-based query language Dynamic; SQL
    Secondary Indexes Yes Yes Yes
    Atomicity Single document Single document Yes – advanced
    Interface REST Native drivers; REST add-on Native drivers
    Server-side batch data manipulation ? Map/Reduce, server-side javascript Yes (SQL)
    Written in Erlang C++ C++
    Concurrency Control MVCC Update in Place  
    Geospatial Indexes GeoCouch Yes Spatial extensions
    Distributed Consistency Model Eventually consistent (master-master replication with versioning and version reconciliation) Strong consistency.  Eventually consistent reads from secondaries are available. Strong consistency.  Eventually consistent reads from secondaries are available.

One thought on “Difference between MongoDB, CouchDB and MySQL

Leave a Reply

Your email address will not be published. Required fields are marked *