Which Database Choose?

This Article about choose the NOSQL database based on application requirement. Different NoSQL DB’s available, there are three primary concerns you must balance when choosing a data management system: consistency, availability, and partition tolerance.

 

* Consistency means that each client always has the same view of the data. * Availability means that all clients can always read and write.

* Partition tolerance means that the system works well across physical network partitions.

 

Chose the Database system based on your application requirement.

 Example Comparing MongoDB and CouchDB.

As you can see in the diagram, MongoDB and CouchDB are built with a slightly different focus. Both scale across multiple nodes easily, but MongoDB favours consistency while CouchDB favours availability.

In the MongoDB replication model, a group of database nodes host the same data set and are defined as a Replica set. One of the nodes in the set will act as primary and the others will be secondary nodes. The primary node is used for all write operations, and by default all read operations as well. This means that replica sets provide strict consistency. Replication is used to provide redundancy - to recover from hardware failure or service interruptions.

CouchDB uses a replication model called Eventual consistency. In this system, clients can write data to one node of the database without waiting for other nodes to come into agreement. The system incrementally copies document changes between nodes, meaning that they will eventually be in sync.

Which system you go for would normally be determined by the priorities of your project. If your app involves trading in financial data or online commerce, you might want to ensure that all clients have a consistent view of the data. In other applications, the high availability offered by CouchDB might be more important, even if some clients are seeing data which is slightly out of date.

My use case is likely to only involve a single database node and I’m not expecting particularly high database traffic. With these relatively flexible constraints, I would expect that either MongoDB or CouchDB would be able to meet my use case without any problems. In the rest of this post I’ll look at how easy both systems were to use and I’ll make my decision based on that. CAP-NoSQL_2.png
0

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month