DynamoDB - Overview

DynamoDB - Overview

DynamoDB is a fully managed NoSQL database service designed for fast and predictable performance. It takes the Dynamo model to the essence of its design and improves upon these features. It all started with us solving a website scalability issue related to holiday load.

DynamoDB allows users to create databases that can store and retrieve any amount of data and serve any amount of traffic. It automatically distributes data and traffic across servers to dynamically manage per-client requests while also maintaining high performance.

DynamoDB vs. RDBMS

DynamoDB uses the NoSQL model, which means it uses a non-relational system. The following table lists the differences between DynamoDB and RDBMS.

General Tasks RDBMS DynamoDB
Connect to source It uses a persistent connection and SQL commands. It uses HTTP requests and API operations
Create table Its fundamental structures are tables and must be defined. It only uses primary keys and not a schema when created. It uses various data sources.
Get information about a table All table information remains available Only primary keys are revealed.
Load table data Rows from columns are used. Tables use elements from attributes
Read table data It uses SELECT statements and filtering statements. It uses GetItem, Query and Scan.
Index Management It uses standard indexes created with SQL statements. Modifications to it occur automatically when the table changes. It uses a secondary index to achieve the same function. Specifications (partition key and sort key) are required.
Change table data It uses the UPDATE statement. It uses the UpdateItem operation.
Delete table data It uses the DELETE statement. It uses the DeleteItem operation.
Delete table It uses the DROP TABLE statement. It uses the DeleteTable operation.

Benefits

The two main advantages of DynamoDB are scalability and flexibility. It does not require the use of a specific data source and structure, allowing users to work with almost anything, but in a consistent way.

Its design also supports a wide range of uses, from lighter tasks and operations to demanding enterprise functionality. It also makes it easy to use multiple languages: Ruby, Java, Python, C#, Erlang, PHP, and Perl.

Restrictions

DynamoDB does suffer from certain limitations, however these limitations do not necessarily create huge problems or hinder solid development.

You can view them from the following points −

Capacity unit sizes - A read capacity unit is a single consistent read per second for items no larger than 4 KB. The write capacity is one write per second for items no larger than 1 KB.

Granted bandwidth min / max. - All tables and global secondary indexes have at least one read unit and one write capacity unit. Maximums vary by region. In the US, the 40 KB read/write limit remains capped per table (80 KB per account), while other regions have a 10 KB per table limit of 20 KB.

Allowed increase and decrease in throughput - You can increase this as often as needed, but the decrease remains limited to no more than four times per day per table.

Table size and count per account - Table sizes have no limit, but accounts have a limit of 256 tables unless you request a higher limit

Secondary indexes per table - five local and five global are allowed.

Predictable secondary index attributes per table - DynamoDB allows 20 attributes.

The length of a key's key and its value - their minimum length is 1 byte and their maximum length is 2048 bytes, however DynamoDB does not set limits on the values.

Sort Key Length and Values â€‹â€‹- Its minimum length is 1 byte and its maximum length is 1024 bytes, with no limit on values ​​unless the table uses a local secondary index.

Table and secondary index names. Names must be at least 3 characters long and no longer than 255. They use the following characters: AZ, az, 0-9, "_", "-", and "." ,

Attribute names - One character remains the minimum and 64K is the maximum, excluding keys and certain attributes.

Reserved Words - DynamoDB does not prohibit the use of reserved words as names.

Expression Length - Expression strings have a 4 KB limit. Attribute expressions have a 255 byte limit. Expression substitution variables have a 2 MB limit.