Introduction to DynamoDB

Learn the fundamentals of DynamoDB.

The database world is huge and it is possible to find different types of storage for our systems. A good choice depends on the requirements of the system. There are relational and non relational databases, serverless and non-serverless computing, and different types of schemas such as documents, columns, and key-values.

What is DynamoDB?

DynamoDB is a fully managed NoSQL database developed by Amazon Web Services (AWS). It stores information based on key-value pairs where each column is the key and a row is its value. It is possible to store a JSON document with DynamoDB.

This simple but powerful database consists of only one table, in which it’s possible to store thousands even millions of records with many columns. It’s worth mentioning that columns across records can be different. To be clear, let’s see the image below where there are different records and each one has different columns. This is the way DynamoDB stores information:

As AWS is serverless, it guarantees scalability and tolerates any load a company can have. The companies don’t have to worry about adding or removing capacity.

How to connect to DynamoDB

AWS provides different ways to interact with its services. They give us the following tools, which will be explored in more detail in the coming lessons:

  • Software Development Kit (SDK): This is a component that allows us to interact with DynamoDB with any programming language, as there is an SDK for every popular language.
  • Command Line Interface (CLI): An interface that can be used in bash, PowerShell and others.

  • Web console: This is a web interface, where it is possible to execute everything that is needed to use DynamoDB.

AWS console
AWS console

Pricing

DynamoDB changes the way that payment is carried out. In terms of databases, users are charged based on the storage that the database is using. When looking at DynamoDB, it has two charging methods:

  • On-demand capacity: In this mode, AWS charges you based on the resources the database is consuming.
  • Provisioned capacity: In this mode, AWS charges you based on the number of reads and writes per second that someone gives to DynamoDB.

Key takeaways

DynamoDB is a powerful NoSQL database that AWS provides as part of its database services. This database is serverless, which means that AWS guarantees the availability, scalability and maintainability of adjacent infrastructure.