CLOUD CONCEPT

Database

A database is an organized collection of data that applications can efficiently store, retrieve, update, and manage.

Cloud Concepts Hub →

What is Database

Databases give applications controlled access to persistent information, such as customer records, orders, and device readings. Choosing the right database model and operating approach affects correctness, performance, availability, security, and cost.

A database organizes information so that applications can retrieve and change it reliably. A database management system provides the software that processes queries, controls concurrent access, and enforces supported integrity rules. Although engineers often use “database” to mean both the stored data and the system managing it, a database is not simply a storage volume or a collection of files: its defining value is how it organizes and manages access to information.

Database selection starts with the data model and access patterns. Relational databases organize data into tables and support relationships, SQL queries, and transactions. For example, an ordering application can use a transaction to create an order and update inventory together. Key-value databases retrieve records by key and suit predictable lookups, such as retrieving a shopping cart by customer identifier. Document databases store document-shaped records, while graph databases represent relationships that applications need to traverse. No single model is best for every workload.

In the cloud, engineers can install database software on virtual machines or use managed database services. Self-management provides more operating-system and software control but requires responsibility for patching, backups, replication, and recovery. Managed services automate selected operational tasks, with the exact responsibilities varying by service. Customers still own data classification, access permissions, application query design, and appropriate configuration. Serverless database options further reduce capacity management, but they still have limits, configuration choices, and usage charges.

Transactional and analytical workloads have different requirements. An online checkout needs short, predictable reads and writes against current records. A reporting platform may scan millions of historical transactions to calculate trends. A data warehouse is optimized for analytical queries rather than serving as a universal replacement for an operational database. Similarly, an in-memory cache can accelerate repeated reads, but cached values may expire or become stale; it should not automatically be treated as the authoritative record.

Availability, durability, and recovery are separate concerns. Replication can support failover, while read replicas can increase read capacity where supported. Replication does not replace backups because accidental deletion or corruption can propagate to replicas. Engineers should define acceptable data loss and recovery time, configure suitable backups, and test restoration. For Amazon RDS, a traditional Multi-AZ DB instance deployment primarily provides high availability; its standby does not serve application reads. Other RDS deployment types have different read capabilities.

Scaling also involves trade-offs. Larger instances can provide more resources, while partitioning and additional replicas can distribute suitable workloads. Indexes accelerate selected queries but consume storage and add write overhead. Distributed systems may expose different consistency options, so applications must understand when a read can return an older value. NoSQL does not mean “no transactions,” and managed does not mean “no administration.”

For AWS service-identification questions, match requirements to database capabilities. Amazon RDS provides managed relational databases, and Amazon Aurora is a relational engine compatible with MySQL or PostgreSQL. Amazon DynamoDB supports key-value and document workloads. Amazon DocumentDB provides MongoDB compatibility, Amazon Neptune supports graph workloads, Amazon ElastiCache provides managed in-memory caching, and Amazon Redshift supports data warehousing and analytics. Compatibility should not be assumed to mean identical features or unrestricted application portability.

Key aspects of Database

Effective database design aligns the data model, correctness guarantees, operational responsibilities, resilience, performance, and cost with application requirements.

Data models and access patterns

Choose a relational, key-value, document, or graph model according to the queries and updates the application needs. Start with concrete operations, such as looking up an account by identifier or traversing relationships, rather than selecting a database solely because it is familiar.

Transactions and consistency

Transactions group supported changes into a unit of work, while consistency behavior determines what reads can observe. Verify the database's transaction scope and read guarantees before implementing workflows such as payments or inventory reservations.

Managed operation and shared responsibility

Managed services handle defined infrastructure and database operations, but customers remain responsible for their data, permissions, and application behavior. Confirm which patching, backup, scaling, and recovery tasks the selected service actually automates.

Availability and recoverability

Use appropriate replication and failover capabilities to reduce interruption, and use backups to recover historical data. Test restoration because a healthy replica does not protect against every logical error or accidental deletion.

Performance and scaling

Query design, indexes, partition keys, capacity, and caching all affect performance. Additional replicas usually help suitable read workloads, but they do not automatically remove write bottlenecks.

Security and cost control

Apply least-privilege access, appropriate network restrictions, encryption, and auditing. Evaluate compute, storage, requests, I/O, backup retention, and data transfer rather than comparing only instance prices.

Cloud services for Database

An application can use Amazon RDS or Amazon Aurora for relational transactions, or Amazon DynamoDB when key-based access and its scaling model fit the workload. Amazon DocumentDB supports document-oriented applications that need its MongoDB-compatible capabilities. Amazon ElastiCache can sit alongside these databases to serve frequently requested values, provided the application manages cache freshness. Data from operational systems can be transferred or replicated into Amazon Redshift for reporting and large analytical queries. These services are complementary options, not mandatory components of every architecture; use multiple databases only when their distinct benefits justify the integration and operational complexity.

Amazon RDS image Amazon RDS

Provides managed relational databases with engine-dependent capabilities for backups, maintenance, replication, and high availability. It suits applications requiring relational tables, SQL, and transactions while reducing infrastructure administration.

Open Amazon RDS →
Amazon Aurora image Amazon Aurora

A managed relational database engine offered through Amazon RDS with MySQL-compatible and PostgreSQL-compatible editions. Its distributed storage architecture and replica capabilities support relational applications requiring availability and read scaling.

Open Amazon Aurora →
Amazon DynamoDB image Amazon DynamoDB

A serverless, managed NoSQL database supporting key-value and document data models. Applications should design partition keys and indexes around access patterns; supported transactions and read-consistency options help meet correctness requirements.

Open Amazon DynamoDB →
Amazon ElastiCache image Amazon ElastiCache

Provides managed in-memory caching using engines including Valkey, Redis OSS, and Memcached. It can reduce database read traffic and application latency, but applications must handle cache misses, expiration, and invalidation.

Open Amazon ElastiCache →
Amazon Redshift image Amazon Redshift

A managed data warehouse designed for SQL analytics across large datasets. It is appropriate for reporting and aggregation rather than as the default database for individual application transactions.

Open Amazon Redshift →
Amazon DocumentDB image Amazon DocumentDB (with MongoDB compatibility)

A managed document database with MongoDB compatibility for supported APIs and workloads. Engineers should validate application compatibility and required features rather than assume it behaves identically to every MongoDB version.

Open Amazon DocumentDB (with MongoDB compatibility) →