Classification

Key value

Usage

Redis

ACID (partly)

caching, queing, stats

persistence: in-memory (but snapshoting and append only log) replication: master-slave (for read scalability) clustering is supported

Memcached

no ACID

HTML page cache, SQL result cache

only in-memory, replication it is common to use consistent hashing and client-side sharding to distribute data across multiple Memcached servers. This approach requires the application to manage data distribution and handle server failures.

Wide Column

No schema, no joins

Usecase: time series, historical records, high frequent writes low frequent reads

Best for: queries by primary keys, highly partitionable

Cassandra

HBase

Document based

Mongo DB

Couchbase

Dynamo DB

Types of Data Models in DBMS

Hierarchical data

Tree-like form. One-to-many relationship. Parent-child relationship. Deletion problem (when parent is deleted all child nodes follow suit). Pointers.

Relational model

Two-dimensional tables (rows and columns).

Object-oriented model

Group of objects. Images and other media types (that cannot be kept in relational db). Any object can link to any object. Not the best option for numerical analysis.

Network model

Hierarchical model + many-to-many relationships (multiple parent records).

Float data model

One two-dimensional array of data elements makes up the float data model. The whole table is read to access data. Efficient for minor models only.

Entity-relationship (ER) model

Relationships are established in this database model by classifying the object of interest as an entity, and its properties as attributes and these relationships are used to connect various entities. ER diagram is used to show the database’s logical structure simply.

Semi-structured data model

Generalised version of the relational model that enables flexible data representation, it is impossible to distinguish between data and schema in this model because some entities may lack one or more attributes. In contrast, other entities may have additional characteristics that simplify updating the database’s schema.

DBMS examples

  • PostgreSQL

  • MySQL

  • MongoDB

SQL vs NoSQL classification

SQL

NoSQL

  • Couchbase

    • NoSQL distributed document database (JSON) with many of the best features of a relational DBMS: SQL, distributed ACID transactions, and more

newSQL

These are SQL databases that scale and distribute globally while still providing transactional processing.

  • CockroachDB

    • CockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It scales horizontally; survives disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports strongly-consistent ACID transactions; and provides a familiar SQL API for structuring, manipulating, and querying data.

      CockroachDB is inspired by Google's Spanner and F1 technologies, and the source code is freely available.

  • Google Cloud Spanner

    • Fully managed relational database with unlimited scale, strong consistency, and up to 99.999% availability.

Last updated