A cloud database is a database system deployed, operated, or delivered through cloud infrastructure rather than being exclusively dependent on traditional on-premises servers.
Instead of purchasing physical database servers, installing storage systems, configuring hardware RAID, maintaining cooling systems, and manually replacing failed components, organizations can consume database infrastructure as a cloud service.
This is one of the most important changes introduced by modern cloud computing.
However, cloud databases are not simply “databases on someone else’s server.”
A production cloud database involves multiple architectural layers:
Understanding these layers is essential when designing modern applications.
If you are new to cloud infrastructure, start with our comprehensive guide to Cloud Computing Explained before continuing.
A typical modern application can be represented as:
Users
│
▼
DNS
│
▼
Load Balancer
│
▼
Application Servers
│
├───────────────┐
▼ ▼
Cache Cloud Database
│
┌───────┴────────┐
▼ ▼
Primary Replica
│ │
└───────┬────────┘
▼
Backups
The database is therefore only one component of a larger architecture.
For a deeper understanding of the networking layer supporting this architecture, see our guide to Cloud Networking Explained.
The application may communicate with the database through:
This means database architecture and network architecture cannot be designed independently.
The fundamental difference is not necessarily the database engine itself.
You can run PostgreSQL, MySQL, SQL Server, or another database both on-premises and in the cloud.
The difference is primarily how infrastructure is provisioned, operated, scaled, and managed.
| Area | Traditional Database | Cloud Database |
|---|---|---|
| Hardware | Owned/leased | Cloud provider infrastructure |
| Provisioning | Manual | API/console/automation |
| Scaling | Hardware changes | Resize or scale services |
| Backups | Customer-managed | Often managed service feature |
| High availability | Customer-designed | Managed options available |
| Monitoring | Customer-operated | Integrated cloud monitoring |
| Networking | Physical/virtual network | VPC/VNet/private networking |
| Security | Customer-controlled | Shared responsibility |
| Automation | Scripts/tools | APIs/IaC/cloud automation |
| Geographic expansion | Complex | Multi-region capabilities available |
However, managed services do not eliminate operational responsibility.
For example, AWS states that Amazon RDS automates tasks such as provisioning, patching, backups, and scaling, while customers still remain responsible for areas such as query performance and application behavior.
That distinction is critical.
One of the first architectural decisions is whether an application needs a relational database or a non-relational model.
The simplified distinction is:
Cloud Database
│
┌────────────┴────────────┐
│ │
SQL NoSQL
│ │
Tables / Relations Flexible Data Models
│ │
Transactions Horizontal Scaling
Joins Documents
Constraints Key-Value
Structured Schema Wide Column
Graph
Neither category is universally better.
The correct choice depends on:
A SQL database is generally a relational database that stores information in tables composed of rows and columns.
For example:
customers
+----+-----------+----------------------+
| id | name | email |
+----+-----------+----------------------+
| 1 | Alice | alice@example.com |
| 2 | Bob | bob@example.com |
+----+-----------+----------------------+
Another table might contain orders:
orders
+----+-------------+--------+
| id | customer_id | total |
+----+-------------+--------+
| 10 | 1 | 99.00 |
| 11 | 2 | 45.00 |
+----+-------------+--------+
The relationship between these tables allows applications to model structured business data.
Typical relational database engines include:
Cloud platforms provide managed versions of several of these systems.
For example, Amazon RDS documentation describes managed support for engines including PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Db2, and Aurora.
Microsoft’s Azure SQL documentation covers Azure SQL Database, Azure SQL Managed Instance, and SQL Server running on Azure virtual machines.
Relational databases are particularly useful when applications require:
Consider a banking transaction.
The system may need to:
If one critical operation fails, the system may need to roll back the transaction.
This is where transactional database architecture becomes extremely important.
Relational database systems commonly use the ACID model.
ACID stands for:
A transaction should be treated as one logical operation.
Transfer $100
Debit Account A
+
Credit Account B
↓
Both succeed
OR
Both roll back
The database should move from one valid state to another according to its defined constraints.
Concurrent transactions should not improperly interfere with each other.
Once a committed transaction is successfully persisted, it should survive appropriate failures.
These properties are especially important for:
NoSQL is a broad category covering database models that do not follow the traditional relational-table model as their primary abstraction.
Common models include:
For example, a document database might store:
{
"customer_id": 1001,
"name": "Alice",
"country": "Morocco",
"preferences": {
"language": "English",
"notifications": true
}
}
This model can be useful when application data has a flexible or evolving structure.
Data is commonly stored as JSON-like documents.
Useful for:
The simplest conceptual model is:
key → value
Example:
user:1001 → session-data
cart:5521 → shopping-cart-data
This model is often useful for high-speed access patterns.
Wide-column databases organize data using rows and column families.
They are designed for particular large-scale distributed workloads.
Google Cloud’s Bigtable documentation, for example, describes SQL access to Bigtable and its column-family-based data model.
Graph databases model:
Nodes + Relationships
Example:
User
│
├── follows ──► User
│
├── purchased ──► Product
│
└── belongs_to ──► Organization
This can be particularly useful when relationships themselves are central to the application.
The comparison should focus on workload rather than popularity.
| Requirement | SQL | NoSQL |
|---|---|---|
| Structured schema | Strong fit | Depends on model |
| Complex joins | Strong fit | Usually limited/different |
| ACID transactions | Strong fit | Depends on service |
| Flexible schema | Less flexible | Often strong |
| Horizontal scaling | Available but architecture-dependent | Common design goal |
| Complex relational data | Strong fit | Often less natural |
| Document workloads | Possible | Strong fit |
| Graph relationships | Possible | Graph DBs specialize |
| Large distributed workloads | Possible | Many systems specialize |
| Analytics | Strong with appropriate systems | Depends on platform |
The key lesson is simple:
Choose the database model according to the application’s access patterns, consistency requirements, and scalability model.
A managed database is a database service where the cloud provider handles significant portions of the underlying operational infrastructure.
Depending on the service, this can include:
For example, AWS describes Amazon RDS as a managed service designed to simplify deployment and management of relational databases.
The managed approach can dramatically reduce infrastructure administration.
But it does not mean:
“The provider manages everything.”
Instead, think of it as:
Cloud Provider
│
├── Infrastructure
├── Managed Service
├── Hardware
├── Platform Operations
└── Some Availability Features
│
▼
Your Responsibility
│
├── Schema
├── Queries
├── Application
├── Access Policies
├── Data Classification
└── Architecture
This is part of the broader shared responsibility model.
Not every cloud database needs to be a managed database service.
You can install PostgreSQL, MySQL, MongoDB, or another engine on a virtual machine.
Architecture:
Cloud VM
│
├── Operating System
│
├── Database Engine
│
├── Configuration
│
├── Storage
│
├── Backup
│
├── Monitoring
│
└── Security
This provides much greater control.
But it also increases operational responsibility.
You may need to manage:
For background on the infrastructure underneath this model, see Virtualization Explained.
| Factor | Managed | Self-Managed |
|---|---|---|
| Infrastructure | Provider | Customer |
| OS management | Usually provider | Customer |
| Database configuration | Shared | Customer |
| Control | Lower | Higher |
| Operational effort | Lower | Higher |
| Customization | Service-dependent | High |
| Portability | Can vary | Usually higher |
| Maintenance | Simplified | Customer-managed |
| HA options | Usually integrated | Customer-designed |
A managed database is not automatically the correct answer.
Highly specialized workloads may require more control than a managed service provides.
Replication means maintaining copies of database data across multiple database instances or locations.
A simplified architecture is:
Primary
│
┌────────┴────────┐
▼ ▼
Replica 1 Replica 2
Replication can provide:
But replication introduces architectural questions.
For example:
These details matter more than simply counting replicas.
The system waits for required replicas to acknowledge data before considering the operation complete.
Conceptually:
Application
│
▼
Primary
│
├────► Replica A
│
└────► Replica B
│
▼
Confirm
This can improve consistency characteristics but may increase latency.
The primary can acknowledge the write before every replica has received it.
Application
│
▼
Primary ──────► Replica
│
└── ACK
This can reduce write latency but introduces a replication lag window.
High availability means designing a system so that failures of individual components do not unnecessarily make the entire application unavailable.
A basic architecture might be:
Application
│
▼
DB Endpoint
│
┌───────┴───────┐
▼ ▼
Primary Standby
│ │
└───────┬───────┘
▼
Storage
Cloud platforms may provide managed availability mechanisms.
Amazon RDS, for example, documents Multi-AZ deployments as part of its architecture and features.
The exact behavior varies by service, so database architecture should always be evaluated against the provider’s current documentation.
For globally distributed applications, one database region may not be enough.
A conceptual architecture is:
Global Users
│
┌──────────┼──────────┐
▼ ▼ ▼
Region A Region B Region C
│ │ │
└──────────┼──────────┘
│
Replicated Data
Multi-region architectures can improve:
But they also introduce complexity:
Google Cloud Spanner, for example, is documented as a managed database with automatic synchronous replication and global-scale transactional capabilities.
Azure Cosmos DB similarly provides global distribution and partitioning capabilities for distributed workloads.
Cloud databases can scale in different ways.
Increase resources:
8 CPU
32 GB RAM
↓
32 CPU
128 GB RAM
This is relatively straightforward but has limits.
Add additional database nodes or partitions.
Database
│
┌──────┼──────┐
▼ ▼ ▼
DB1 DB2 DB3
Horizontal scaling can support large workloads but requires careful architecture.
Sharding divides data across multiple database partitions.
Example:
Users 1–1,000,000
│
├── Shard A
│
├── Shard B
│
└── Shard C
A common strategy is hash-based distribution:
shard = hash(user_id) % N
However, sharding creates difficult engineering problems.
Poor shard-key selection can cause:
Therefore, horizontal scaling should not be treated as simply “add more servers.”
Partitioning divides data into logical sections.
Possible partitioning strategies include:
For example:
Orders
│
├── 2024
├── 2025
└── 2026
Partitioning can improve:
But incorrect partitioning can make queries more complicated.
An index allows the database to locate data more efficiently.
Without an appropriate index:
Query
│
▼
Scan millions of rows
With an appropriate index:
Query
│
▼
Index
│
▼
Relevant rows
For example:
CREATE INDEX idx_users_email
ON users(email);
Now:
SELECT *
FROM users
WHERE email = 'alice@example.com';
can use the index depending on the database engine and query plan.
But indexes are not free.
They consume:
Too many indexes can therefore hurt write performance.
Database performance is often limited by the query rather than the underlying cloud infrastructure.
A useful troubleshooting process is:
Slow Application
│
▼
Measure Query Latency
│
▼
Inspect Query Plan
│
▼
Check Indexes
│
▼
Check Data Volume
│
▼
Check Locking
│
▼
Check CPU / Memory / I/O
Never assume that increasing the database instance size is automatically the solution.
First determine the bottleneck.
Applications frequently establish database connections.
Creating too many connections can overwhelm a database.
Instead, applications commonly use a connection pool:
Application
│
▼
Connection Pool
┌─┬─┬─┬─┬─┐
│ │ │ │ │ │
▼ ▼ ▼ ▼ ▼ ▼
Database
A pool reuses existing connections.
Important parameters include:
Poorly configured pooling can produce:
Application instances ↑
│
▼
Connections ↑
│
▼
Database overloaded
This becomes especially important in auto-scaling cloud environments.
A cloud database should never be treated as an isolated resource.
Security must cover multiple layers:
Database Security
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
Network Identity Data
│ │ │
Firewall IAM Encryption
Private subnet Roles Backups
Segmentation MFA Keys
│ │ │
└───────────────────┼───────────────────┘
▼
Monitoring
Your database should generally be protected by:
For broader infrastructure protection, connect this architecture with our guides on Network Security Basics and Firewalls Explained.
In many application architectures, the database should not be directly exposed to the public Internet.
A common design is:
Internet
│
▼
Load Balancer
│
▼
Application Layer
│
▼
Private Network
│
▼
Database
Instead of:
Internet
│
▼
Database
Private networking reduces the exposed attack surface.
The exact architecture depends on the cloud provider and workload, but database connectivity should be deliberately designed rather than exposed by default.
Our Cloud Networking Explained guide covers the VPC/VNet, subnet, routing, firewall, and private-networking concepts that support this architecture.
Encryption at rest protects stored data.
Conceptually:
Application
│
▼
Database
│
▼
Encrypted Storage
If an attacker gains unauthorized access to raw storage media, encrypted data is significantly harder to use without the appropriate cryptographic keys.
Important considerations include:
Data traveling between application and database should normally be protected using encrypted connections.
Conceptually:
Application
│
│ TLS
▼
Database
Without transport encryption, credentials and sensitive data may be exposed to network interception.
This is particularly important across:
Database security should not depend exclusively on a username and password.
Modern architectures increasingly integrate:
A useful principle is:
Every database identity should have only the permissions required to perform its function.
For example:
Web Application
│
└── READ + LIMITED WRITE
Analytics Service
│
└── READ ONLY
Database Administrator
│
└── Administrative Access
This limits the blast radius of compromised credentials.
This distinction is frequently misunderstood.
Replication:
Primary ─────► Replica
Backup:
Database ─────► Backup Storage
Replication primarily improves availability and read distribution.
Backups primarily support recovery from:
If corrupted data is replicated immediately, the replica may also contain corrupted data.
Therefore:
High availability does not replace backup and recovery.
Point-in-time recovery allows a database to be restored to a selected moment within a supported recovery window.
Example:
10:00 ── 11:00 ── 12:00 ── 13:00
▲
│
Restore Here
This can be extremely useful after accidental changes.
A mature database strategy should define:
Two critical disaster-recovery metrics are:
How much data loss is acceptable?
Example:
RPO = 5 minutes
The organization is designing for no more than approximately five minutes of data loss under the defined scenario.
How quickly must the service recover?
Example:
RTO = 30 minutes
These requirements directly influence database architecture.
AWS offers multiple database services rather than one universal database product.
Its database portfolio includes relational, key-value, document, graph, in-memory, wide-column, time-series and other models.
For relational workloads, Amazon RDS provides managed database engines, while Amazon Aurora provides managed MySQL- and PostgreSQL-compatible relational database engines designed for cloud workloads.
A simplified architecture could be:
Route 53 / DNS
│
▼
Load Balancer
│
▼
Application Tier
│
▼
Private Subnet
│
▼
RDS / Aurora
│
├── Backup
├── Replica
└── Monitoring
For broader AWS architecture, compare this with our AWS vs Azure vs Google Cloud guide.
Microsoft Azure provides several database approaches.
For relational workloads, Azure SQL includes:
Microsoft documents these as separate options within the Azure SQL family.
For distributed NoSQL workloads, Azure Cosmos DB provides managed distributed database capabilities, including partitioning and global distribution.
A simplified architecture:
Azure Application
│
▼
Azure Networking
│
▼
Private Database Access
│
┌───┴────────┐
▼ ▼
Azure SQL Cosmos DB
Google Cloud provides several database models.
Google Cloud Spanner is designed for distributed transactional workloads and supports GoogleSQL and PostgreSQL dialects. Its documentation describes automatic synchronous replication and global-scale operation.
A conceptual architecture is:
Global Application
│
▼
Google Cloud
│
┌────┼────┐
▼ ▼ ▼
Region A B C
│ │ │
└────┼────┘
▼
Database
The correct service depends heavily on workload characteristics.
Microservices introduce another architectural question:
Should every service have its own database?
A common pattern is:
Order Service
│
▼
Orders DB
User Service
│
▼
Users DB
Inventory Service
│
▼
Inventory DB
This provides service-level ownership.
But it can make cross-service transactions and reporting more complex.
A monolithic application may instead use:
Application
│
▼
Shared Database
Neither architecture should be selected simply because it is fashionable.
The database boundary should reflect:
Containers are not databases.
A common mistake is assuming that a database should simply be deployed as a temporary container.
For stateless applications:
Container → Destroy → Recreate
is usually straightforward.
For stateful databases:
Database
│
├── Persistent Storage
├── Backup
├── Recovery
├── Replication
└── Consistency
The operational requirements are substantially different.
This is why many organizations use managed database services while running application workloads in VMs or containers.
Performance should be measured across the complete path:
User
│
▼
Application
│
▼
Network
│
▼
Connection Pool
│
▼
Database
│
▼
Storage
A database that appears slow may actually be suffering from:
Therefore database monitoring should include both infrastructure metrics and application-level metrics.
A production database should be observable.
Important signals include:
Distributed tracing can help connect:
HTTP Request
↓
Application
↓
Database Query
↓
Response
This makes it easier to determine where latency actually occurs.
For broader security monitoring, CorgiNetwork’s SIEM Explained guide provides additional context on collecting and correlating security events.
A production environment should monitor at least:
[ ] CPU
[ ] Memory
[ ] Storage utilization
[ ] Storage latency
[ ] Database connections
[ ] Query latency
[ ] Slow queries
[ ] Lock contention
[ ] Replication lag
[ ] Error rate
[ ] Authentication failures
[ ] Backup status
[ ] Recovery status
[ ] Capacity trends
Monitoring should also have alerts.
An alert without a defined response procedure is often just noise.
Database costs are not determined only by the database instance.
Consider:
A simplified cost model is:
Total Database Cost =
Compute
+ Storage
+ I/O
+ Backups
+ Replicas
+ Network
+ Monitoring
+ Licensing
Therefore, optimizing only the database instance size may not produce the largest savings.
Use private networking whenever the architecture allows it.
Separate application identities and administrative identities.
A backup that has never been restored is an assumption, not proof of recoverability.
Replication does not replace independent recovery mechanisms.
Indexes improve some queries but increase storage and write overhead.
A poorly designed query can remain inefficient on a much larger machine.
Application auto-scaling can unexpectedly multiply database connections.
Multi-region architectures may create legal, contractual, or compliance implications depending on the workload.
A strong general-purpose architecture can look like:
Internet
│
▼
DNS
│
▼
Load Balancer
│
▼
Application Layer
│
┌─────────┴─────────┐
▼ ▼
Cache API Services
│
▼
Private Network
│
┌────────┴────────┐
▼ ▼
Primary DB Replica
│
▼
Backup System
│
▼
Recovery / DR Region
Security controls should surround the architecture:
Identity
│
┌──────────┼──────────┐
▼ ▼ ▼
Network Database Data
Security Access Encryption
│ │ │
└──────────┼──────────┘
▼
Monitoring
Before selecting a database, answer these questions.
Is your data primarily:
Do you require:
Will the workload require:
What are your:
Do you need:
Do you want:
Start
│
▼
Are relationships central?
/ \
Yes No
│ │
▼ ▼
SQL Flexible Data Model?
/ \
Yes No
│ │
▼ ▼
NoSQL Evaluate Workload
But this is only a starting point.
A mature architecture considers:
Before deploying a production database:
[ ] Database is not unnecessarily public
[ ] Private networking is configured
[ ] Firewall/security rules are restrictive
[ ] TLS is enabled
[ ] Encryption at rest is enabled
[ ] Strong authentication is configured
[ ] Least privilege is applied
[ ] Administrative access is protected
[ ] Credentials are stored securely
[ ] Backups are enabled
[ ] Backup retention is defined
[ ] Recovery has been tested
[ ] Audit logging is enabled
[ ] Monitoring is enabled
[ ] Alerts are configured
[ ] Database versions are maintained
[ ] Sensitive data is classified
[ ] Disaster recovery is documented
For a broader security foundation, see Cybersecurity for Beginners and Network Security Basics.
Cloud databases are closely related to the three major cloud service models.
You manage much more of the stack.
Cloud VM
↓
Operating System
↓
Database
↓
Application
The provider manages more of the infrastructure.
Managed Database
↓
Your Schema
↓
Your Application
The database becomes part of a complete application service.
Understanding these distinctions is covered in our IaaS, PaaS and SaaS Explained guide.
Modern cloud database architectures are increasingly influenced by:
For example, current cloud database platforms increasingly integrate capabilities associated with AI and vector workloads. Microsoft documents Azure Cosmos DB as supporting vector database capabilities alongside distributed NoSQL and relational scenarios.
This does not mean every application should immediately adopt a vector database.
Architecture should still begin with the workload.
AI systems can require multiple forms of data storage.
A typical architecture may look like:
AI Application
│
├──────────────► SQL Database
│ │
│ Business Data
│
├──────────────► Object Storage
│ │
│ Documents / Files
│
└──────────────► Vector Database
│
Embeddings
This illustrates an important architectural principle:
One application does not necessarily need one database technology.
Different workloads may require different storage models.
Moving an existing database to the cloud requires more than copying data.
A migration plan may include:
Assessment
↓
Schema Analysis
↓
Dependency Mapping
↓
Target Architecture
↓
Data Migration
↓
Testing
↓
Performance Validation
↓
Security Validation
↓
Cutover
↓
Monitoring
Important questions include:
When a database-backed application fails, avoid random changes.
Use a structured process:
1. Identify the symptom
↓
2. Check application errors
↓
3. Check network connectivity
↓
4. Check authentication
↓
5. Check database availability
↓
6. Check connection count
↓
7. Check CPU / memory / storage
↓
8. Check slow queries
↓
9. Check replication
↓
10. Check recent configuration changes
For general network diagnostics, combine this methodology with our Computer Networking Explained guide.
Suppose users report:
“The application is extremely slow.”
Do not immediately increase the database size.
Check:
Application latency
↓
Database query latency
↓
Query execution plan
↓
Index usage
↓
Database CPU
↓
Memory
↓
Storage latency
↓
Connection pool
↓
Network latency
The root cause could be a single inefficient query rather than insufficient hardware.
Before placing a cloud database into production:
Cloud databases are not simply traditional databases moved to cloud servers.
They represent a broader architectural model involving:
The most important decision is not:
“Which cloud provider has the best database?”
Instead, start with:
What does the application actually require?
Then evaluate:
A technically appropriate database architecture should fit the workload rather than forcing the workload to fit a particular database product.
A cloud database is a database deployed or delivered through cloud infrastructure and services. It can be self-managed on cloud infrastructure or provided as a managed database service.
SQL databases generally use relational tables and structured schemas, while NoSQL encompasses several non-relational models such as document, key-value, wide-column, and graph databases.
They involve different trade-offs. Managed databases reduce operational work, while self-managed databases can provide greater infrastructure and configuration control.
Cloud database security depends on architecture and configuration. Encryption, access control, network isolation, authentication, monitoring, and backup protection are all important.
A database does not generally need direct public exposure when the application can access it through private networking. The correct architecture depends on the workload.
No. Replicas and backups serve different purposes. Replication primarily supports availability and read scaling, while backups support recovery from data loss or corruption.
Sharding distributes data across multiple partitions or database nodes. It can enable horizontal scaling but increases architectural complexity.
Recovery Point Objective defines the amount of data loss that an organization is prepared to tolerate under a defined recovery scenario.
Recovery Time Objective defines how quickly a service or system needs to be restored after a failure.
The answer depends on the workload, data model, transaction requirements, consistency, scale, availability, security, operational model, and budget. There is no universal database that fits every application.
Cloud databases are a fundamental component of modern application architecture.
Whether you are building a WordPress platform, SaaS application, e-commerce system, enterprise application, API platform, microservices architecture, or AI-powered product, the database often becomes one of the most important architectural decisions.
The strongest approach is to design from requirements outward:
Business Requirements
↓
Application Workload
↓
Data Model
↓
Database Architecture
↓
Network Architecture
↓
Security
↓
Availability
↓
Scaling
↓
Monitoring
↓
Disaster Recovery
Cloud providers such as AWS, Microsoft Azure, and Google Cloud now offer a wide range of managed and distributed database technologies. Their official documentation should be used to validate service-specific behavior, limits, availability models, and security configurations before production deployment.
For CorgiNetwork readers, this article also connects naturally with the site’s broader Cloud & DevOps knowledge architecture, particularly Cloud Computing Explained, Cloud Networking Explained, AWS vs Azure vs Google Cloud, Virtualization Explained, and IaaS vs PaaS vs SaaS.
Recommended next article in the Cloud & DevOps cluster:
Cloud Load Balancing Explained: L4 vs L7, Algorithms, Health Checks, High Availability and Global Traffic Distribution
Introduction Border Gateway Protocol (BGP) is the routing protocol used to exchange network reachability information…
Introduction A Linux server can experience connection failures even when its network interface is working…
Introduction TCP retransmissions are an important indicator of network reliability and performance. When a Linux…
Open Shortest Path First (OSPF) is a link-state routing protocol widely used in enterprise networks…
Group Policy is one of the most important management features in Windows Server Active Directory…
Windows DNS servers play an essential role in Active Directory environments, allowing computers, servers, applications,…