What is DynamoDB and how it works?

22 July,2022 by Rambler

Question: I'm currently using MongoDB on-premises and reviewing alternative options for storing NoSQL data. Our usage of MongoDB is very limited from a development pov , and looking for a much lighter weight NoSQL setup. What is DynamoDB and how does it work?

Answer:  DynamoDB is a managed NOSQL Service offered by AWS. The AWS documentation is very comprehensive   and should be referenced for detailed information .    Tables , Items & Attributes are essential concepts . 

A table is a collection of items 

Every item is a collection of attributes. 

Primary keys are used as unique identifiers 

Secondary Indexes are used to enhance queries

DynamoDB streams can be used  for data modification Events

 

To create a DynamoDB table you can use different interfaces , either through the AWS Console or Terraform 

Open the DynamoDB console at https://console.aws.amazon.com/dynamodb/.

Choose Create Table.

In the Create DynamoDB table screen, do the following:

On the Table name box, enter  "my table name"

For the Primary key, in the Partition key box, enter "my Id". Set the data type 

When the settings are as you want them, choose Create.

 

Create_DynamoDB_table

 

Once you have the DynamoDB table setup , need to think about the backup requirements - check out AWS Backup Service

The AWS Backup Service supports DynamoDB as one of the Resource types . 

 

To start adding items to DynamoDB ,  use either the DynamoDB API, or PartiQL , a SQL-compatible query language, to add an item to a table. There is a new feature in the AWS Console for DynamoDB called PartiQL Editor , allowing you to edit data in the DynamoDB table. Another option is to use the Console - where you can create an Item and attach attributes. 

 

 

 

 


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on What is DynamoDB and how it works?


dba-ninja.com