NoSQL Database - What is NoSQL?
An overview for getting started
What are NoSQL databases?
NoSQL databases are interchangeably referred to as “nonrelational,” “NoSQL DBs,” or “non-SQL” to highlight the fact that they can handle huge volumes of rapidly changing, unstructured data in different ways than a relational (SQL) database with rows and tables.
NoSQL technologies have been around since the 1960s, under various names, but are enjoying a surge in popularity as the data landscape shifts and developers need to adapt to handle the sheer volume and vast array of data generated from the cloud, mobile, social media, and big data.
From viral celebrity tweets to life-saving information in electronic medical records, new data and data types are being generated at a dizzying pace. NoSQL databases have evolved to help developers quickly create database systems to store the new information and make it readily available for search, consolidation, and analysis.
The benefits of NoSQL databases (NoSQL DBs)
NoSQL databases help IT pros and developers manage the new challenges of ever-expanding diversity of data types and models and are highly effective at handling unpredictable data, often with blazing-fast query speeds. They also provide a smooth database migration to the cloud for existing NoSQL workloads.
Develop with agility
With the ability to respond to unplanned situations, NoSQL DBs cater to frequent software release cycles and are suitable for faster and more agile app development.
Handle data with flexibility
NoSQL gives developers more freedom, speed, and flexibility to change both schema and queries to adapt to data requirements. Information stored as an aggregate makes it easier for quick iterative improvements— without having to do up-front schema design.
Operate at any scale
NoSQL DBs can provide compelling operational advantages and savings with the ability to scale "out" horizontally—or add less expensive servers without having to upgrade. They can scale to handle more data or hold a single, large database within a highly distributable clusters of servers.
Types of data models with NoSQL databases
Most nonrelational, high-performance databases, sometimes called “not only SQL,” can also handle highly structured data—they just aren’t limited to fixed data models like relational (SQL) databases.
The four most common types of NoSQL databases are:
Key-value stores pair keys and values using a hash table. Key-value types are best when a key is known and the associated value for the key is unknown.
Document databases extend the concept of the key-value database by organising entire documents into groups called collections. They support nested key-value pairs and allow queries on any attribute within a document.
Columnar, wide-column, or column-family databases efficiently store data and query across rows of sparse data and are advantageous when querying across specific columns in the database.
Graph databases use a model based on nodes and edges to represent interconnected data—such as relationships between people in a social network—and offer simplified storage and navigation through complex relationships.
How to choose between relational (SQL) and nonrelational (NoSQL) databases
|NoSQL or nonrelational||SQL or relational|
|Learn more about nonrelational data models||Learn more about relational data models|
How do I evaluate a NoSQL DB?
Choose a data model
Many NoSQL databases are oriented toward aggregates—a collection of data that you interact with as a unit. This makes them a much more natural fit for modern, object-oriented programming languages. When choosing a NoSQL DB, you’ll probably want to start by choosing a data model—and then evaluate the NoSQL databases that support it, along with the programming languages and SDKs that each database supports.Learn more about programming models and APIs
Weigh the trade-offs of consistency
Most NoSQL DBs let you choose from either end of a consistency spectrum, from strong consistency – where you’ll get the latest data, but you may need to wait – to eventual consistency where you’ll get a fast response, but the data may be stale. There are also many NoSQL databases that support other consistency levels that typically fall more in the middle of these extremes. Choose the NoSQL DB that gives you the most flexibility and control in consistency models for your needs.Learn more about consistency, availability, and partition tolerance
Consider the cloud and database migration
With their distributed nature and horizontal scalability, NoSQL DBs are an ideal fit for cloud computing, although you can also find many NoSQL database systems designed to run on-premises or in hybrid scenarios.
In evaluating your cloud options, consider the following:
- Supported data models. Does the cloud provider support all the data models you might want to use?
- Deployment and operations. How easily can you deploy your database and replicate it to other regions, if needed?
- Geographic presence. Where are the cloud provider’s data centres? Can you put your data where you want it? How will you keep compliant with global data privacy regulations, such as the European Union’s GDPR?
- Ease of replication. What’s the process for replicating your database to a different geographic region?
- Scalability. Do the NoSQL database resources let you ensure adequate performance, as well as scale for growth? Will you be able to scale up, down, or horizontally?
- High availability. What will happen in the event of an unexpected failure? Does the service offer built-in high availability and disaster recovery?
- Service levels. What levels of availability or latency guarantees are offered?
- Ecosystem. Is the database tightly integrated with the rest of the cloud platform and can it be stitched quickly to make new solutions?
Ways to use NoSQL database systems
Using data models based on NoSQL are a great fit for companies that want to build mobile, web, Internet of Things (IoT), and gaming apps that require flexible, scalable, high-performance, and highly functional databases to provide great user experiences—whether it’s gaming, e-commerce, big data analytics, or real-time web apps and beyond.
Globally distribute your apps
Gain more users, wherever they are in the world, with the improved app performance from high availability and disaster recovery.
Offer real-time customer experiences
Deliver personalisation, real-time recommendations and improved user experience with the NoSQL DBs.
Accommodate diverse IoT workloads
Scale instantly and elastically to handle sustained, write-heavy data ingestion with improved query performance for IoT apps.
Enhance your e-commerce apps
With flexible schemas and hierarchical data, NoSQL is well-suited for storing product catalogue data where diverse products have different attributes.
Engage gamers with new content
Deliver personalised experiences with content such as in-game stats, social media integration and leaderboards. Low latency and elastic scalability support traffic spikes during game launches and tournaments.
Build serverless apps
Seamlessly scale data ingestion, throughput, and data volumes with immediate availability, automatic indexing, stable ingestion rates, and query performance.
Get better insights from big data
Implement machine learning at scale across rapidly changing, high-volume data and get more from your analytics.
Migrate existing NoSQL workloads to the cloud
Spend less time managing an on-premises database with a migration to the cloud, while still using your existing tools, drivers, libraries, and SDKs.
Get started with NoSQL and database migration to the cloud
Learn how to develop your apps with new agility, flexibility and scalability in managing your database systems and diverse data types, as well as a cloud database migration for existing NoSQL workloads. Get a technical overview of Azure Cosmos DB for developers and find out more about native support for NoSQL in a globally distributed, massively scalable, and multi-model database service.