Presentation is loading. Please wait.

Presentation is loading. Please wait.

NOSQL and CAP Theorem.

Similar presentations


Presentation on theme: "NOSQL and CAP Theorem."— Presentation transcript:

1 NOSQL and CAP Theorem

2 NOSQL NOSQL - Not Only SQL
SQL (and with it relational databases) have dominated the database market for the last 30 years. Relational databases offer an appealing compromise between performance and the ACID principles making them reliable and performant. The NOSQL movement is a push for non- relational databases in circumstances that traditional databases are failing.

3 NOSQL Variety There isn't one type of NOSQL database.
NOSQL is defined by what it isn't. Is CSV NOSQL? Sure (but most wouldn't call it that). This week, we'll be talking about different Non-SQL databases, how to use them, and their performance and other tradeoffs. One of the biggest tradeoffs (that we have mentioned before) are related to the CAP theorem.

4 CAP Theorem - Pick 2 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.

5 What CAP properties do traditional, relational databases optimize?
1. Consistency 2. Availability 3. Partition Tolerance 4. My Project 5 implementation is terrible, so None.

6

7 Types of Databases Relational - (MySQL, Postgres, SQLite) stores data in rigid schemas and because of that an service complicated queries (involving joins) quickly Column-Based - (Google's BigTable, Apache's Hbase) stores huge amounts of data efficiently Key-Value - (Amazon's DynamoDB, Facebook's Cassandra) meant for extremely fast retrievals of small amounts of information Document-Stores - (MongoDB, CouchDB) used as an alternative to relational tables with less rigidity and hierarchical structured objects Graph-Based - (Neo4J, GraphBase) stores billions of nodes and the edges between them for efficient network/graph traversals. These types are neither exclusive, nor comprehensive, and some DBMSs transcend each category.

8 Why you should not use NOSQL
SQL is well understood, interoperable between DBMSs, performant for many circumstances, and stable. Almost every different NOSQL DBMS has its own language, data format restrictions, hardware/OS compatibilities issues, and quirks. Most of the time, a relational database (like SQLite) is a simpler, faster and better than NOSQL alternatives. But, there are times when NOSQL is better, but I want to combat some of the hype. NOSQL is generally built for scale, but most of the time, you don't need scale, or you can shift when you do.


Download ppt "NOSQL and CAP Theorem."

Similar presentations


Ads by Google