Introduction to AWS Databases
Explore the foundational concepts and types of AWS databases, including relational databases and specialized options like DynamoDB and Neptune. Understand key database terms such as transactions, indexing, and ACID properties to help you choose the right database solutions for different business needs.
We'll cover the following...
Databases play an important role in application development and designing business logic. Irrespective of the application’s size, a database is the architecture’s backbone. The architecture of the database, the type, and the data structures are crutial in selecting the right database for our business.
AWS provides several database solutions in almost all famous categories of databases. We have different options for relational databases with various popular database engines. AWS has a wide range of purpose-built NoSQL, in-memory, ledger, and key-value databases. In this chapter, we’ll learn about different database options offered by Amazon Web Services and how they help us in different business scenarios.
We’ll start with relational databases and explore available options and their important features. We’ll discuss DynamoDB, Neptune, DocumentDB, and Keyspaces for Apache Cassandra databases. We’ll also see the ledger database, in-memory primary database, and cache solutions.
Key terminologies
Before moving to the details of the database, let’s have a quick look at common terminologies:
Transaction: A logical unit of work that is performed on the database to retrieve or modify the data. A transaction can consist of multiple operations, which will be considered complete when all the operations are successful. It must comply with the ACID (Atomicity, Consistency, Isolation, and Durability) properties.
Indexing: A technique used to optimize data retrieval by reducing the number of accesses to the database. It creates indexes of the frequently accessed columns, which makes it easy to locate and access data in the database.
Partitioning: Dividing the data into smaller datasets to improve performance.
Sharding: Distributing the data across several servers to enhance performance and scalability.
ACID: A group of properties that are used to check database operations in a transaction. ACID stands for Atomicity, Consistency, Isolation, and Durability. These properties ensure the database is always valid, even if an unexpected event occurs.
Atomicity ensures that a single transaction always results in either success or failure. There can’t be a case when one part of the transaction is successful and another part fails. If this happens, the complete transaction is rolled back.
Consistency ensures that the database before and after the execution of the transaction is always consistent.
Isolation ensures the independent execution of multiple transactions. No transaction interferes with another, so the database remains consistent after the transactions are completed.
Durability ensures that once a transaction is completed, the changes made by the transaction are permanent even if the database crashes.