In my previous article I have given the information about the DynamoDB database with its core concepts. I have also tried to give the multiple limitations using DynamoDB as well. In this article I would like to cover topic which gives you information about attributes in DynamoDB with examples. These attributes of DynamoDB are most important attributes helps to improve the performance of the database. Now a days the performance tuning of database is more required in real industry. Using these attributes one can fasten up the database by default.
What is DynamoDB and attributes in DynamoDB ?
A fully managed NoSQL database service, Amazon DynamoDB offers quick and reliable performance along with seamless scaling. The administrative costs of running and maintaining a distributed database can be offloaded thanks to DynamoDB, so you no longer have to worry about hardware provisioning, setup, replication, software patching, or cluster growth. The attributes in DynamoBD helps to improve performance of database transactions.
What are attributes in DynamoDB ?
In this section I would like to give you different key attributes in DynamoDB which helps to improve the performance of overall database. There are slight changes in the architecture part of DynamoDB.
1.Primary Key :
Secondary indexes offer query flexibility, and Primary Keys act as the way of ensuring that each database item may be uniquely identified. By making changes to the table data, DynamoDB streams capture events.
Two types of primary keys:
Partition Key – The “partition key” is the only property that makes up this straightforward primary key. In order to select storage, DynamoDB internally uses the key value as input for a hash function.
Partition Key and Sort Key – The “Composite Primary Key” is the other name of this key, which has two attributes ( Primary Key and Sort Key ).
2.Secondary Indexes :
We can use an alternative key to query table data thanks to these indexes. DynamoDB does not need their use, however they do improve queries. There are two types of secondary key.
Global Secondary Index – Partition and sort keys for this index can be different from table keys.
Local Secondary Index – This index has a partition key that is the same as the table’s, but it has a different sort key.
DynamoDB provides API operations for the control plane, data plane (such as creation, reading, updating, and deleting), and streams. We can create and manage tables by the following tools – Create, List, Describe, Update and Delete Tables.
Advantages of DynamoDB :
- Unstructured or partially structured data can be handled by DynamoDB.
- High Performance.
- Resource usage and performance indicators can be observed using the AWS Management Console.
- The use case is more on-demand-based.
- Highly automated
Disadvantages of DynamoDB :
- Cannot use Table Joins
- Any data archiving for an endpoint is complicated.
- Lack of some functionalities will force extra data to be loaded from the drive and in-memory operations. It will cause the database to lag.
- DynamoDB is not preferred to store financial data.
- The absence of a transaction mechanism may compromise crucial data.
I hope you like this article on Attributes in DynamoDB with advantages and disadvantages of the same. If you like this article or if you have any issues with the same kindly comment in comments section.