Codementor Events

Top Benefits of Amazon DynamoDB

Published Jul 04, 2019Last updated Dec 14, 2020
Top Benefits of Amazon DynamoDB

Pixabay

In the information age, each bit of data is a gemstone that can be mined, processed and stored for further use or trade. Amazon DynamoDB, like other NoSQL databases, was created for the purpose of helping organizations gain control of the huge amounts of data streaming from digital devices and ecosystems.

A NoSQL database isn’t restricted to organized SQL models, making it ideal for storing huge amounts of data. DynamoDB uses the key-value and document data models to provide data administrators with the ability to organize and sort through their data without creating complicated architectures. Read on to learn how more about DynamoDB.

What Is Amazon DynamoDB?

Amazon DynamoDB is a fully managed NoSQL Database as a service (DBaaS) offered by Amazon Web Services (AWS). DynamoDB combines the easy storage enabled by the key-value model with the organizational convenience of the document model.

DynamoDB supports Scalar data types such as Number, String, Binary, and Boolean, and collection data types such as Set, List, and Map. DynamoDB is programmed to store data on SSD storage and distribute data across three regions. It’s a great solution if your project requires low-latency data access at scale.

What Is the Data Model of DynamoDB?

DynamoDB runs on a key-value and document-oriented data model.

When you use a key-value NoSQL data model, you assign values to keys. Each value contains a blob of data, and all the database has to do is store it. A strictly key-value database doesn’t understand the meaning of the values. This “dumb” method of storage enables fast writes and reads, which is often a necessity in big data projects and business intelligence.

The document data model helps DynamoDB makes sense of the data it stores through the use of three basic data model units:

  • Tables—collections of items you want to store together. For example, a list of books or student information. Unlike tables in relational databases, the tables in DynamoDB don’t have associated fixed schemas. To create a table, you need to define a primary key. Then you’ll be able to add items into your table with a dynamic set of attributes.
  • Items—collections of attributes. Items in DynamoDB can be compared to rows in SQL. Like tables, items require a primary key. If your table contains a list of books, then each item will contain all the information about the book. For example, book title, author, ISBN, publisher name.
  • Attributes—each attribute is a basic unit of information, like columns or fields in SQL. In the example above, each different information unit is an attribute. If you’re storing information from an e-commerce website, you’ll add in the product ID, whether it’s a book, a movie, or a pair of socks. Each identifier is an attribute you can store in an item.

For each unit, you can choose between two types of keys:

  • Primary key—is a partition key that contains one attribute. You can use the identifier as a key or any other attribute that can help you identify the item (a product ID).
  • Composite primary key—contains two keys that represent two attributes. In each composite key, the partition key will contain an attribute that will help you identify the data (a product ID), and the sort key will contain an attribute that will help you filter the data (publisher name).

It is advisable to choose unique and sparse keys.

Top Benefits of Amazon DynamoDB

The following features and capabilities make DynamoDB an ideal data store service for new apps and small scale operations that are expected to grow in predictable stages.

1. The advantages of using a fully-managed database service—DynamoDB saves you the costs and labor of setting up your own data operation. The good folks at AWS have already taken care of the hardware provisioning, configuration, and network connectivity. For your convenience, DynamoDB’s features—such as encryption at rest, automatic data replication, cluster scaling, backup and recovery—are built into a user-friendly system. To take full advantage, you should keep up to date with the latest features of Amazon DynamoDB.

2. Linear scalability for growing datasets—DynamoDB uses auto-sharding and load-balancing to help users gain more visibility into how data is stored and distributed. When you can see and control data capacity, you can grow at scale. There’s no data limit, which means that you can continuously expand your data store.
3. Integration with the AWS Ecosystem—DynamoDB was created by AWS and comes integrated with any of the AWS services. You can easily backup data to Amazon Simple Storage Service (Amazon S3), export data and analyze it in Elastic MapReduce (EMR). The AWS Identity and Access Management (IAM) tool gives you controls for securing the connections between the AWS platforms of your choice.

DynamoDB and The CAP Theorem

According to Eric Brewer’s CAP Theorem (Consistency, Availability, and Partition Tolerance), distributed data stores can’t offer more than two of the three CAP elements simultaneously. The element of consistency ensures that the database remains consistent at all times, availability ensures there are no downtimes, and partition tolerance keeps the system working even if the communication between servers becomes unreliable.

DynamoDB is configured to choose availability and partition tolerance with eventual write consistency. While DynamoDB supports eventually consistent and strongly consistent reads, the latter function can often fail during partitions and network delays. This type of inconsistency is not optimal for global applications.

Additionally, since DynamoDB is set up to provide only consistency and durability, you will need to take care of the rest of the ACID (Atomicity, Consistency, Isolation, Durability) criteria to achieve compliance. To this end, you can use the ACID transactions module at no additional cost.

Discover and read more posts from Gilad David Maayan
get started
post commentsBe the first to share your opinion
Noel Martin Llevares
4 years ago

What do you mean by

you can use the ACID transactions module at no additional cost.

?

Show more replies