1.

How can you relate CAP Theorem to database design?

Answer»

CAP(Consistency-Availability-Partition Tolerance) theorem says that a distributed system cannot GUARANTEE C, A and P simultaneously. It can at MAX provide any 2 of the 3 guarantees.

  • Consistency: This STATES that the data has to remain consistent after the execution of an OPERATION in the database. For example, post database updation, all queries should retrieve the same result.
  • Availability: The databases cannot have downtime and should be available and responsive always.
  • Partition Tolerance: The database system should be functioning despite the communication becoming unstable.

The following image REPRESENTS what databases guarantee what aspects of the CAP Theorem simultaneously. We see that RDBMS databases guarantee consistency and Availability simultaneously. Redis, MongoDB, Hbase databases guarantee Consistency and Partition Tolerance. Cassandra, CouchDB guarantees Availability and Partition Tolerance.



Discussion

No Comment Found