DynamoDB – Create Table
Tables are the backbone of any Relational Database Management System. Tables are used to store data in an organized form so operation on the data and retrieval of data becomes seamless. The AWS DynamoDB provides both RDBMS and Non-relational databases. This article mainly focuses on the relational part of DynamoDB.
In this article, we will look into the process of creating a table in DynamoDB through the AWS Management Console. After logging into the AWS Management console follow the below steps to create a table (Say, Music). The Music table will have the following details:
- Partition key: Artist
- Sort key: SongTitle
Follow the below steps to create a table in the DynamoDB database:
Step 1: Sign in to the AWS Management Console and open the DynamoDB console.
Step 2: In the navigation pane on the left side of the console, choose Dashboard.
Step 3: On the right side of the console, choose Create Table.
Step 4: Fill in the table details as depicted below:
Step 5: After filling in the details click on Create:
At this point your table is ready and you can start adding data into it.
Capacity management in DynamoDB:
When creating a table in DynamoDB, you can specify the capacity mode for the table and its global secondary indexes. The capacity mode determines how you pay for read and write throughput for the table and its indexes. DynamoDB offers two capacity modes: on-demand and provisioned.
In on-demand capacity mode, DynamoDB automatically scales throughput capacity based on the workload demand. You pay for the actual reads and writes that you perform on the table. This can be a good option for unpredictable workloads or for getting started with DynamoDB.
In provisioned capacity mode, you specify the number of read and write capacity units that you want to allocate for the table and its indexes. You are charged for the allocated capacity units, even if you are not using them. This can be a good option for workloads with predictable or stable performance requirements.
It is important to carefully consider the capacity mode and capacity allocation for a DynamoDB table, as it can affect the cost and performance of the table. It is recommended to monitor the performance and capacity utilization of a DynamoDB table to ensure that it is configured optimally.
Please Login to comment...