Skip to Content

Notes from:

SQL vs. NoSQL Databases: What’s the Difference? 

SQL

Pros

  • Flexible queries: Enables support for diverse workloads. Abstracts data over underlying implementations and allows engines to optimize queries to fit on-disk representations.
  • Reduced data storage footprint: Due to normalization and other optimization opportunities, a reduced footprint maximizes database performance and resource usage.
  • Strong and well-understood data integrity semantics: Atomicity, consistency, isolation and durability, or ACID , are database properties that guarantee valid transactions.

Cons

  • Rigid data models: Requires careful up-front design to ensure adequate performance and resistance to evolution. SQL has a predefined schema, so changing it often includes downtime.

  • Limited horizontal scalability: It is either completely unsupported, supported in an ad-hoc way or only supported on relatively immature technologies.

  • Single point of failure: Non-distributed engines are mitigated by replication and failover techniques.

  • Db2 

  • MySQL 

  • PostgreSQL 

  • YugabyteDB 

  • CockroachDB 

  • Oracle Database 

  • Microsoft SQL Server 

No-SQL(Not only SQL)

( BigTable and Dynamo  ) reveals the problem of hotizontal scalability.

Pros

  • Scalable and highly available: Many NoSQL databases are designed to support seamless, online horizontal scalability without significant single points of failure.
  • Flexible data models: Most non-relational systems do not require developers to make up-front commitments to data models. Existing schemas are dynamic, so they can often be changed “on the fly.”
  • Dynamic schema for unstructured data: Documents can be created without a defined structure first, which enables each to have its own unique structure. Syntax varies per database and fields can be added as you build the document.
  • High performance: A limited database functionality range (e.g., by relaxing durability guarantees) enables high performance amongst many NoSQL databases.
  • High-level data abstractions: Beyond the “value in a cell” data model, NoSQL systems provide high-level APIs  for powerful data structures. For example, Redis includes a native-sorted set abstraction.

Cons

  • Vague interpretations of ACID constraints: Despite the widespread belief that it supports NoSQL systems, ACID interpretations can be too broad to make clear determinations about database semantics.

  • Distributed systems have distributed systems problems: Though not specific to NoSQL systems, encountering such problems is common amongst NoSQL developers and may require SME troubleshooting. Write consistency, eventual consistency and sharding

  • Lack of flexibility in access patterns: Without the abstraction found in relational databases, the on-disk representation of data leaks into the application’s queries and leaves no room for NoSQL engines to optimize queries.

  • Redis  - quick access to a key-value store without strong integrity guarantees

  • FaunaDB 

  • CouchDB 

  • MongoDB 

  • Cassandra 

  • Elasticsearch  - complex or flexible search across a lot of data

Last updated on