In recent years, with the explosion in data volumes to be processed, the use of NoSQL or "not only SQL" databases has soared, with the parallel emergence of new tools to manage them. Amazon DynamoDB is one of the most ergonomic and efficient NoSQL database management software.
A NoSQL database is not based on the standard architecture of relational databases, which are traditionally interacted with using SQL. In fact, SQL enables queries to be made on tabular databases.
NoSQL databases can be of different types:
- Graph-oriented
- Document-oriented
- Key/value-oriented
- Column-oriented
SQL databases are structured in tables, which makes them more difficult to distribute across different servers. To distribute them, you need to perform “vertical scaling”, which means increasing the power of the data.
They are less scalable and perform better than NoSQL databases, as the latter support horizontal scaling, which instead of requiring a single server to be scaled up, enables data to be distributed among several servers, thus sharing performance. In this way, the number of servers to be used can be modulated according to the power required.
On paper, NoSQL databases offer greater performance and scalability. Nevertheless, they require more technical expertise, as they lack some of the automatic functions that SQL databases have, such as transactions.
For large enterprises, who need to store a large amount of data, NoSQL databases enable much greater flexibility and support for more data, with a large number of possible structures.
What is Amazon DynamoDB?
DynamoDB offers a fully managed database service, with integrated security, backup, restore and in-memory caching for Internet-scale applications.
This means that applications can be created and managed in the cloud using the software, without the need for a single server.
All this is taken care of by the application. It’s important to note that this is a multi-model database: it’s key/value-oriented, but also document-oriented.
First, a few words on the history of DynamoDB, according to Werner Vogels, AWS architect and Amazon Chief Technology Officer.
The popular e-commerce platform is made up of hundreds of decoupled services, developed and managed in a decentralized way. Each service retains its own data and has an API that other services can use. Most importantly, access to the data of a service that is not its own is not permitted. Amazon’s rapid growth meant that this database architecture was no longer adequate.
A solution had to be found to the fact that databases needed to be more scalable, and communication between data from different services was becoming essential. In response, they began to develop a set of storage and database technologies to meet the scalability and reliability requirements of the Amazon.com e-commerce platform.
According to Werner Vogels, “Dynamo was born out of our need for a highly reliable, ultra-scalable key/value database. This non-relational, or NoSQL, database was intended for use cases that were at the heart of Amazon’s e-commerce operations, such as the shopping cart and session service. We had to do something revolutionary.
After the successful launch of the first Dynamo system, we documented our experiences in an article so that others could benefit. Since then, several Dynamo clones have been built, and the Dynamo article has served as the basis for several other types of distributed database.”
How does Amazon DynamoDB work?
DynamoDB divides information into tables (which are not relational tables!), items and attributes. Each table is made up of items, each of which contains at least one attribute. Items are differentiated by the attributes they contain and the data these attributes store. Amazon DynamoDB databases are therefore not schema-driven. Each item is identified by its partition key. Each item also has a sort key, which is used to classify it with other items on partitions within tables. Queries on DynamoDB tables are only possible if one of these two keys is available.
All data is stored on SSD hard disks and replicated 3 times.
Via APIs, DynamoDB database data can be accessed directly from applications. There are 3 types of operation you need to know about:
- Data Plane: applied to tables. This operation enables data to be written and read using 4 tools: create, read, update and delete.
- Control Plane: allows you to manage and create tables in the database. It can also be used to control streams and indexes.
- DynamoDB Streams: This operation enables you to activate or deactivate a stream on a single table.
One of DynamoDB’s advantages is its compatibility with other software from its manufacturer, Amazon Web Services, which offers a wide range of services, from data analysis and machine learning tools to networking and storage. What’s more, it’s more accessible to the general public than its competitors, because it’s fully managed. Simply launch the software in your AWS console to manage your NoSQL databases, whereas a competitor like MongoDB requires you to follow a long list of instructions.
Finally, the adaptability that DynamoDB offers is undoubtedly one of its greatest advantages, with a capacity to adapt to different data volumes that enables it to support business development in the most comfortable way possible. Developers scaling cloud-based applications can start with just the capacity they need, then increase the demand capacity of a given table as their application grows in popularity. Their tables can also grow without limit as their users store increasing amounts of data.
DynamoDB also offers a brand-new data encryption tool to ensure the security of its databases. For more information on data protection and cybersecurity in general.
Would you like to learn more about NoSQL databases?
Our Data Engineer training course is for you! It will enable you to develop tools to manage large volumes of data, and make them accessible and exploitable to your entire team.
You can find out more on our website, or book an appointment directly with our training team.