


  • Check the spelling of your keyword search.
  • Start a new search.
Contact Us Sign in to Oracle Cloud

What is NoSQL?

NoSQL defined

The term ‘NoSQL’ refers to nonrelational types of databases, and these databases store data in a format that’s different from relational tables. However, NoSQL databases can be queried using idiomatic language APIs, declarative structured query languages, and query-by example languages, which is why they are also referred to as “not only SQL” databases.

What is a NoSQL database used for?

NoSQL databases are widely used in real-time web applications and big data, because their main advantages are high scalability and high availability.

NoSQL databases are also the preferred choice of developers, as they naturally lend themselves to an agile development paradigm by rapidly adapting to changing requirements. NoSQL databases allow the data to be stored in ways that are more intuitive and easier to understand, or closer to the way the data is used by applications—with fewer transformations required when storing or retrieving using NoSQL-style APIs. Moreover, NoSQL databases can take full advantage of the cloud to deliver zero downtime.

SQL versus NoSQL

SQL databases are relational, while NoSQL databases are non-relational. The relational database management system (RDBMS) is the basis for structured query language (SQL), which lets users access and manipulate data in highly structured tables. This is foundational model for database systems such as MS SQL Server, IBM DB2, Oracle, and MySQL. But with NoSQL databases, the data access syntax can be different from database to database.

Relational database versus NoSQL database

To understand NoSQL databases, it’s important to know what the difference is between RDBMS and nonrelational types of databases.

The data in an RDBMS is stored in database objects that are called tables. A table is a collection of related data entries, and it consists of columns and rows. These databases require defining the schema upfront, that is, all of the columns and their associated datatypes must be known beforehand so applications can write data to the database. They also store information linking multiple tables through the use of keys, thus creating a relationship across multiple tables. In the simplest case, a key is used to retrieve a specific row so that it can be examined or modified.

Conversely, in NoSQL databases, data can be stored without defining the schema upfront—which means you have the ability to get moving and iterate quickly, defining the data model as you go. This can be suitable for specific business requirements, whether it’s graph-based, column-oriented, document-oriented, or as a key-value store.

Until very recently, relational databases were the most widely used models. They are still extremely ubiquitous with many businesses; however, the variety, velocity, and volume of data that’s being accessed today sometimes requires a very different database to complement the relational database. This has sparked the adoption in some areas of NoSQL databases—which are also referred to as “nonrelational databases.” Because of their ability to scale out horizontally and quickly, nonrelational databases can handle high traffic, which also makes them highly adaptable.

When to choose a NoSQL database?

With businesses and organizations needing to innovate rapidly, being able to stay agile and continue operating at any scale is the name of the game. NoSQL databases offer flexible schemas and also support a variety of data models that are ideal for building applications that require large data volumes and low latency or response times—for example, online gaming and ecommerce web applications.

When not to choose a NoSQL database?

NoSQL databases typically rely on de-normalized data, supporting the types of applications that use fewer tables (or containers) and whose data relationships are not modeled using references, but rather as embedded records (or documents). Many classic back-office business applications in finance, accounting, and enterprise resource planning rely on highly normalized data to prevent data anomalies as well as data duplication. These are the typically the types of applications that are not a good fit for a NoSQL Database.

Another distinction of NoSQL databases is query complexity. NoSQL databases work phenomenally well with queries against a single table. However, as the complexity of the queries increase, relational databases are a better choice. NoSQL database typically do not offer complex joins, sub-queries, and nesting of queries in a WHERE clause.

Sometimes, though, there doesn’t need to be a choice between relational and nonrelational databases. On many occasions, companies have opted for databases that offer a converged model, in which they are able to employ a combination of a relational and nonrelational data models. This hybrid approach offers increased flexibility in handling different types of data, while also ensuring read and write consistency without degrading performance.

What does NoSQL offer that other databases don’t?

One of the main differentiators between NoSQL databases and other types of databases is that NoSQL databases typically use unstructured storage. Developed within the last two decades, NoSQL databases were designed for fast, simple queries, vast data, and frequent application changes. In addition, these databases also make programming much simpler for developers.

Another important differentiator is that NoSQL databases rely on a process called “sharding” to scale out horizontally, which means that more machines can be added to handle data across multiple servers. The vertical scaling that’s found in other SQL databases requires adding more power and memory to the existing machine, which can be unsustainable as more and more storage is needed.

The nature of horizontal scaling with NoSQL databases means that they can handle extremely large amounts of data—even as the data is growing—in a more efficient way. It can be helpful to think of vertical scaling like adding a new floor to your house, whereas horizontal scaling is like building another house right next door to the original one.

Benefits of a NoSQL database

The unprecedented speed and scale of digital interaction and data consumption seen in the last two decades has required businesses to adopt a more modern, fluid approach to how they store data and how they access it. With users worldwide demanding an uninterrupted stream of content and functions, it’s no wonder that databases have had to adapt quickly. With this in mind, here are some of the key reasons why developers are choosing NoSQL/nonrelational databases:

  • Flexibility

    With SQL databases, data is stored in a much more rigid, predefined structure. But with NoSQL, data can be stored in a more free-form fashion without those rigid schemas. This design enables innovation and rapid application development. Developers can focus on creating systems to better serve their customers without worrying about schemas. NoSQL databases can easily handle any data format, such as structured, semi-structured, and non-structured data in a single data store.
  • Scalability

    Instead of scaling up by adding more servers, NoSQL databases can scale out by using commodity hardware. This has the ability to support increased traffic in order to meet demand with zero downtime. By scaling out, NoSQL databases can become larger and more powerful, which is why they have become the preferred option for evolving data sets.
  • High performance

    The scale-out architecture of a NoSQL database can be particularly valuable when data volume or traffic increases. As shown in the graphic below, this architecture ensures fast and predictable single-digit millisecond response times. NoSQL databases can also ingest data and deliver it quickly and reliably, which is why NoSQL databases are used in applications that collect terabytes of data every day, while also requiring a highly interactive user experience. In the graphic below, we show an incoming rate of 300 reads per second (blue line) with a 95th latency in the 3-4ms range, and an incoming rate of 150 writes per second (green line) with a 95th latency in the 4-5ms range.

    nosql database

  • Availability

    NoSQL databases automatically replicate data across multiple servers, data centers, or cloud resources. In turn, this minimizes latency for users, no matter where they’re located. This feature also works to reduce the burden of database management, which frees up time to focus on other priorities.
  • Highly Functional

    NoSQL databases are designed for distributed data stores that have extremely large data storage needs. This is what makes NoSQL the ideal choice for big data, real-time web apps, customer 360, online shopping, online gaming, Internet of things, social networks, and online advertising applications.

Types of NoSQL databases

There are four main types of NoSQL databases:

  • Key value

    This is the most flexible type of NoSQL database because the application has complete control over what is stored in the value field without any restrictions.
  • Document

    Also referred to as document store or document-oriented databases, these databases are used for storing, retrieving, and managing semi-structured data. There is no need to specify which fields a document will contain.
  • Graph

    This database organizes data as nodes and relationships, which show the connections between nodes. This supports a richer and fuller representation of data. Graph databases are applied in social networks, reservation systems, and fraud detection.
  • Wide column

    These databases store and manage data in the form of tables, rows, and columns. They are broadly deployed in applications that require a column format to capture schema-free data.

Try Oracle NoSQL Database

Oracle NoSQL Database Cloud Service makes it easy for developers to build applications using document, columnar, and key-value database models that deliver predictable single-digit millisecond response times with data replication for high availability. The service offers ACID transactions, serverless scaling, comprehensive security, and low pay-per-use pricing.

Oracle NoSQL Database Cloud service is now part of Oracle Cloud Free Tier, which includes a free, limited-time promotional trial that allows you to explore a wide range of cloud services, as well as a set of Always Free services that never expire.