NoSQL

NoSQL databases really mean No Relational Databases. These databases provide mechanism to store structure, semi-structured or unstructured data. However their key feature is not having the relation between different data the way it is maintained in relational databases. Many of these databases also support SQL like interface. And hence these databases sometimes are also referred as Not Only SQL.

Database
Database Auto-sharding, replication

Types of NoSQL Databases:

  • Key-Value: In this type, data is stored in key value format. Every item to be stored in the db is stored as an attribute – referred as “key” and associated value.
  • Graph – This type of database is useful for storing network like data such as social network.
  • Document Database – Each document is stored as key and associated data in value. The associated data could be in XML, JSON etc and could also be nested.
  • Wide-column stores

Advantages of NoSQL Databases:

  • Dynamic Schemas – NoSQL databases are built to insert data without any predefined schema and hence this works very well with parallel development, agile methodology. Developers can define their own requirements for data storage and could be completely independent of other teams to store in the same DB.
  • Auto-Sharding – NoSQL databases have built-in support to scale horizontally. Whereas relational databases usually scaled vertically.
  • Replication – Most NoSQL databases have support for replication of data across the instances. And this is transparent to the application.
  • Caching – Some of the NoSQL databases also provide caching which improves the performance even further.

Typical Use cases:

  • Personalization – Application can start collecting data incrementally and store it in NoSQL DB seamlessly. This would not be easy with RDBMS.
  • Real Time Big Data – NoSQL is optimized for distributed writes and hence serve as a good storage for real time big data.
  • Internet Of Things (IOT) – Billions of devices across the globe would be collecting humongous data. Such data would demand all the characteristics of a NoSQL DB.

Related Links:

Related Keywords:

Database, OLTP, OLAP, MongoDB

OLTP

OLTP mean On-Line Transaction Processing. This is a type of system which is used in applications involving several short transaction.

Important Features of OLTP databases:

  • Transactions involve very small amounts of data
  • Data Integrity
  • Indexed access to data
  • Performance focus is on Transactions Per Second

Examples of OLTP Databases:

  • MySQL
  • SQL Server
  • PostgreSQL

OLTP Databases are ACID compliant. It means that the database ensures that the transactions are “Atomic”, “Consistent”, “Isolated” and “Durable”.

  • Atomic means either the transaction is successfully recorded or it is rolled back. It is “all or nothing” operation. This ensures in case of the failure, database state is left unchanged.
  • Consistency means every transaction will bring database from one valid state to another. That is data written to the database should be following all the applicable DB rules. Note that this doesn’t involve application level logic.
  • Isolation means database reaches same state whether the transactions are executed in parallel or in sequential manner.
  • Durability means once a transaction committed it remains stored even if there are other issues such as power failure or crashes.

Applications of OLTP databases:

  • Banking applications
  • Retail orders

Typically large applications make use of both OLTP and OLAP (OnLine Analytical Processing) databases. OLAP focuses torwards analysis of data and may not have performance (transactions per second) as compared to OLTP databases. You can find detailed comparison here or can refer to this presentation.

Related Links:

Related Keywords

Databases, OLAP, ACID

Subscribe now. You will get relevant updates frequently. Also, please check our other terms from menu. #TermOfTheDay #ATermADay