AWS DynamoDB  changed the database game in Serverless and continues to do so, as its design repeatedly proves its huge value. This guide takes you through everything there is to know about DynamoDB so you can rest assured you’re using the service in its best way and reaping all of the benefits.

What Is AWS DynamoDB?

DynamoDB is a key-value and document database with single-digit millisecond response times at any scale. It’s a fully managed durable database with built-in security, backup and restore capabilities.

A keyword you’ll often hear with DynamoDB is that it is a NoSQL database, which simply means it doesn’t use the traditional SQL query language used in relational databases. Its design is to reduce complexity between tables by consolidating objects into a common collection or “schemaless” table in a NoSQL database. These objects are then grouped together based on common themes, which will meet the conditions of the common queries of the application that you set.

Key Concepts:

  • Table: as a collection that can hold a virtually infinite number of items, it may also have secondary indexes associated
  • Secondary Index: duplicates table items using a different primary-key and sort-key
  • Primary Key: a special form of attribute that is used to reference items, similarly to an item ID
  • Sort Key: another special form of attribute that is used to organize items in a different sorting order
  • Item: the most basic unit in AWS DynamoDB, it holds the data attributes structured in a JSON
  • Attribute: a key-value pair that contains informational data-points about an item in the database table
  • Streams: a constant stream of state-changing operations executed against a table
  • Query: operation to retrieve a particular item (or set of items)
  • Scan: operation to scan the entire table or a section of it
  • Filter: rules to apply after a query or scan has executed, but before results are returned to the requester

Relational Database Systems (RDBMS) vs NoSQL Database

While a relational database still has its place such as when flexibility is needed, as computing costs have increasingly become the main consumer of a business’ budget, the world needs faster speeds to match scaling demands. RDBMS can also see query performance become unpredictable and highly variable, and as more data is loaded in, it can also degrade.

When it comes to NoSQL design, data can be queried efficiently however only in a finite amount of ways. Therefore, it’s important to understand the specific questions it’ll be answering before any design takes place. Also to note, unlike with RDBMS, your aim should be to have as few tables as possible.

#database #microservices #aws #cloud computing #serverless #dynamodb

The Ultimate Guide to AWS DynamoDB
1.25 GEEK