Quick Start on DynamoDB: Part 1
This brief article explores DynamoDB and looks at terminology mapping, naming conventions, and more.
Join the DZone community and get the full member experience.Join For Free
My intention is to make it loud and clear that learning Dynamo DB is simple and easy to use. Before we jump right into it, I would like to familiarize you with the following. This article can be considered a quick reference for the DynamoDB starters.
You may also like: Should You Use DynamoDB? (Part 1)
This will help to unlearn the RDBMS mindset and give you enough torque for learning and implementing this quickly.
- AWS NoSQL database
- Fast and flexible
- Highly scalable
- Secure and fault-tolerant
Terminology Mapping to RDBMS
Multicolumn – Primary
Mandatory Primary Key
Local Secondary Indexes
Global Secondary Indexes
Dynamo DB supports the following data types:
Since Dynamo DB does not allow multiple database concept like RDBMS, we should follow some naming convention to identify the tables related to each project otherwise it will be difficult to maintain
We always suggest prefixing the table name with product.
A strongly consistent is used to read and return a result that reflects all the writes that was received as a successful response prior to the read.
- Up to date
The eventual consistency option is used to maximize the read throughput. Consistency across all copies of data is usually reached within a second. Repeating a read after a short time should return the updated data.
- 50% Cheaper
- May or may not reflect the latest copy of data
- Default consistency for all operations
The read/write capacity mode controls how you are charged for read and write throughput and how you manage capacity. You can set the read/write capacity mode while creating a table. You can change it later.
Used to control r/w throughput
Support Auto Scaling
1 Capacity unit = 1 req/sec
Read Capacity Unit
1 RCU = 1 strongly consistent table read / sec
1 RCU = 2 eventually consistent table read / sec
In block of 4 kb
Write Capacity Unit
1 WCU = 1 table write / sec
In block of 1 kb
In the next article, we will see about Partition key, indexing, and creating tables using AWS consoles. Hope this helps.
Opinions expressed by DZone contributors are their own.