NoSQL is a term used to describe high-performance, non-relational databases. NoSQL databases utilize a variety of data models, including document, graph, key-value, and columnar. NoSQL databases are widely recognized for ease of development, scalable performance, high availability, and resilience. Below are several resources to help you get started using NoSQL databases.
Introduction to Amazon DynamoDB
[/fusion_title]
SQL vs NoSQL Database Comparison
[/fusion_title]
Relational database | NoSQL database | |
Data model | The relational model normalizes data into tabular structures known as tables, which consist of rows and columns. A schema strictly defines the tables, columns, indexes, relationships between tables, and other database elements. | Non-relational (NoSQL) databases typically do not enforce a schema. A partition key is generally used to retrieve values, column sets, or semi-structured JSON, XML, or other documents containing related item attributes. |
ACID properties | Traditional relational database management systems (RDBMS) support a set of properties defined by the acronym ACID: Atomicity, Consistency, Isolation, and Durability. Atomicity means “all or nothing” – a transaction executes completely or not at all. Consistency means once a transaction has been committed, the data must conform to the database schema. Isolation requires that concurrent transactions execute separately from one another. Durability is the ability to recover from an unexpected system failure or power outage to the last known state. | NoSQL databases often trade some ACID properties of traditional relational database management systems (RDBMS) for a more flexible data model that scales horizontally. These characteristics make NoSQL databases an excellent choice in situations where traditional RDBMS encounter architectural challenges to overcome some combination of performance bottlenecks, scalability, operational complexity, and increasing administration and support costs. |
Performance | Performance is generally dependent on the disk subsystem. Optimization of queries, indexes, and table structure is required to achieve peak performance. | Performance is generally a function of the underlying hardware cluster size, network latency, and the calling application. |
Scale | Easiest to scale “up” with faster hardware. Additional investments are required for relational tables to span a distributed system. | Designed to scale “out” using distributed clusters of low-cost hardware to increase throughput without increasing latency. |
APIs | Requests to store and retrieve data are communicated using queries which conform to a structured query language (SQL). These queries are parsed and executed by relational database management systems (RDBMS). | Object-based APIs allow app developers to easily store and retrieve in-memory data structures. Partition keys let apps look up key-value pairs, column sets, or semi-structured documents containing serialized app objects and attributes. |
Tools | SQL databases generally offer a rich set of tools for simplifying the development of database-driven applications. | NoSQL databases generally offer tools to manage clusters and scaling. Applications are the primary interface to the underlying data. |
[fusion_separator style_type=”single solid” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” sep_color=”#607d8b” top_margin=”50″ bottom_margin=”50″ border_size=”” icon=”” icon_circle=”” icon_circle_color=”” width=”” alignment=”center” /]
Types of NoSQL Databases on AWS
[/fusion_title]
Columnar Databases
Columnar databases are optimized for reading and writing columns of data as opposed to rows of data. Column-oriented storage for database tables is an important factor in analytic query performance because it drastically reduces the overall disk I/O requirements and reduces the amount of data you need to load from disk. Learn more »
Document Databases
Document databases are designed to store semi-structured data as documents, typically in JSON or XML format. Unlike traditional relational databases, the schema for each non-relational (NoSQL) document can vary, giving you more flexibility in organizing and storing application data and reducing storage required for optional values. Learn more »
Graph Databases
Graph databases store vertices and directed links called edges. Graphs can be built on relational (SQL) and non-relational (NoSQL) databases. Vertices and edges can each have properties associated with them. The diagram below depicts a simple graph of relationships between friends and their interests. Learn more »
In-Memory Key-Value Stores
In-memory key-value stores are NoSQL databases optimized for read-heavy application workloads (such as social networking, gaming, media sharing and Q&A portals) or compute-intensive workloads (such as a recommendation engine). In-memory caching improves application performance by storing critical pieces of data in memory for low-latency access. Learn more »
SQL vs NoSQL Terminology
[/fusion_title]
SQL |
MongoDB | DynamoDB | Cassandra | Couchbase |
Table | Collection | Table | Table | Data Bucket |
Row | Document | Item | Row | Document |
Column | Field | Attribute | Column | Field |
Primary Key | ObjectId | Primary Key | Primary Key | Document ID |
Index | Index | Secondary Index | Index | Index |
View | View | Global Secondary Index | Materialized View | View |
Nested Table or Object | Embedded Document | Map | Map | Map |
Array | Array | List | List | List |