Choosing between a relational database and a NoSQL database

  • Last updated on: 2018-04-25
  • Authored by: Satyakam Mishra

This page presents information that is helpful for deciding whether to use a relational database, a NoSQL database, or a hybrid solution.

Prerequisite

For an introduction to relational databases and NoSQL databases, see Types of databases.

Features of relational databases and NoSQL databases

The following table provides a high-level comparison of the characteristics of relational and NoSQL databases:

Relational databases NoSQL databases
Moderate incoming data velocity High incoming data velocity
Data comes from one or a few locations Data comes from many locations
Primarily structured data Structured and semi-unstructured data
Nested or complex transactions Simple transactions
Protect uptime via failover or log shipping Protect uptime via architecture
High availability Continuous availability
Deploy an app to one server Deploy an app to many servers
Primarily write data to one location Write data to any location
Primary concern is scaling reads Scale writes and reads
Scale up for more users and data Scale out for more users and data
Maintain data volumes with purges High data volumes that are retained forever

The following image visualizes the structures of various types of databases, as well as the data complexity that they are designed to accommodate:

The following table compares the characteristics of relational databases and NoSQL graph databases:

Relational database Graph database (NoSQL)
Simple-to-moderate data complexity Heavy data complexity
Hundreds of potential relationships Billions of potential relationships
Moderate JOIN operations and good performance Heavy or extreme JOIN operations
Static to semi-static data changes Dynamic, constantly changing data
Primarily structured data Structured and unstructured data
Nested or complex transactions Simple transactions
Always strongly consistent Tunable consistency (eventual to strong)
Moderate incoming data velocity High incoming data velocity
High availability Continuous availability
Centralized application Distributed, location-independent application
Scale up for increased performance Scale out for increased performance

Questions to ask before choosing a NoSQL database

If you are evaluating whether a NoSQL database is appropriate for your production environment, you should address the following technical, business, and deployment considerations.

Technical considerations

Before deciding to use a NoSQL database, ask the following technical questions:

  • Can the database serve as the primary data source for the online application?
  • Does the database have features that prevent the loss of critical data? Are writes durable in nature by default so that the data is safe?
  • Is the database fault-tolerant, and is it capable of providing continuous availability?
  • Can the database easily replicate data located in the same data center, across multiple data centers, and across different cloud availability zones?
  • Does the database offer read/write anywhere capabilities? (Can any node in the cluster be written to and read from?)
  • Does the database provide a robust set of security features?
  • Does the database support backup and recovery procedures that are easy to create and manage?
  • Does the database require special caching layers?
  • Is the database capable of managing big data and delivering high performance regardless of data size?
  • Does the database offer linear scalability for adding new nodes?
  • Can new nodes be added and removed online without impacting your business?
  • Does the database support key platforms and developer languages?
  • Does the database provide a query language that is similar to SQL?
  • Can the database run on commodity hardware with no special requirements?
  • Is the database easy to implement and maintain for large deployments?
  • Does the database offer data compression that results in significant storage savings?
  • Is it easy to run analytic operations on the database?
  • Can the database easily interface with and support modern data warehouses or data lakes that use Hadoop?
  • Is it easy to carry out search operations and functions directly on the NoSQL database?
  • Can the database isolate the online, analytic, and search workloads within a single application?
  • Does the database have solid command-line and visual tools for development, administration, and performance management?

Business considerations

The following list presents business-related questions that you should ask before deciding to use a NoSQL database:

  • Is the database backed by a commercial entity?
  • If so, does the commercial entity provide 24x7 enterprise-level support and services?
  • Does the database have professional online documentation?
  • Does the database have customers across a wide range of industries that use the product in critical production environments?
  • Does the database have an attractive pricing structure?
  • If the database is open source, does it have a thriving open source community?

Deployment considerations

A NoSQL database can be used as part of a new application, to augment an existing application, or to fully replace an application. Before choosing a database, consider your deployment needs.

New applications

Many organizations begin using NoSQL on a new application. This approach enables you to avoid rewriting applications, migrating data, and performing related tasks.

Augmentations

Some organizations choose to augment an existing system by adding a NoSQL component. This often happens with applications that have outgrown a relational database due to scale problems, the need for better availability, or other issues. Parts of the existing system continue to use the existing RDBMS, while other components of the application are modified to use the NoSQL database.

Rip and replace projects

If a system is too costly or is breaking due to an increase in user concurrency, data velocity, or data volume from cloud applications, it can be fully replaced with a NoSQL database.

Guidelines for deciding between a relational database and a NoSQL database

The following questions can help you determine whether a relational database or a NoSQL database is best for your application.

  • Do you need a flexible data model that includes a combination of structured, semi-structured, and unstructured data?
  • Are complex JOIN operations overwhelming your RDBMS and slowing response times?
  • Do you care more about the value derived from the relationships between tables than the tables themselves?
  • Do you need continuous availability with redundancy in both data and function across one or more locations, rather than simple failover for the database?
  • Do you need a database that runs in multiple data centers and cloud availability zones?
  • Do you need to handle high-velocity data originating from sensors, mobile devices, and similar sources? If so, do you need to handle this data with extreme write speed and low-latency query speed?
  • Do you need to go beyond single-machine limits for scale-up? Does your system require a scale-out architecture that makes it easy to add more processing power and storage capacity?
  • Do you need to run different workloads (such as online, analytics, and search) on the same data without manually loading it onto separate systems or machines?
  • Do you need to manage a widely distributed system with minimal staff?

Get support

For more information about relational databases and NoSQL databases, see the Managed Operations FAQ. If you have further questions, contact support.

Learn more about Rackspace database services.

Share this information: