Database Types and Engine Selection on AWS
This content is from the lesson "3.3.1 Database Types and Engine Selection" in our comprehensive course.
View full course: AWS Solutions Architect Associate Study Notes
Database Types and Engine Selection are crucial for designing high-performing database solutions.
This blog covers database types and services, database engines, global infrastructure considerations, and how to design effective database architectures.
____
How It Works & Core Attributes:
Database Types and Services:
Relational Databases: Store data in structured tables with relationships between them. Relational databases are ideal for applications that require ACID compliance, complex queries, and data consistency.
Amazon RDS (Relational Database Service): A managed relational database service that supports multiple database engines. RDS handles database administration tasks like backups, patching, and monitoring.
Amazon Aurora: A MySQL and PostgreSQL-compatible relational database built for the cloud. Aurora provides high performance, availability, and durability with automatic scaling.
Non-Relational Databases: Store data in flexible, schema-less formats. Non-relational databases are ideal for applications that need high scalability, flexibility, and performance for specific use cases.
Amazon DynamoDB: A fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB is ideal for applications that need high throughput and low latency.
__
Database Engines with Appropriate Use Cases:
MySQL: An open-source relational database engine that is widely used for web applications. MySQL is known for its reliability, ease of use, and compatibility with many applications.
PostgreSQL: An advanced open-source relational database engine with advanced features. PostgreSQL supports complex data types, advanced indexing, and extensibility.
MySQL vs PostgreSQL: MySQL is simpler and faster for read-heavy workloads, while PostgreSQL provides more advanced features and better support for complex queries and data types.
Heterogeneous Migrations: Migrating between different database engines (e.g., from MySQL to PostgreSQL). Heterogeneous migrations require data transformation and application changes.
Homogeneous Migrations: Migrating between the same database engine (e.g., from on-premises MySQL to RDS MySQL). Homogeneous migrations are simpler and require fewer changes.
__
AWS Global Infrastructure Considerations:
Availability Zones: Multiple isolated locations within each AWS region. Deploying databases across multiple Availability Zones provides high availability and fault tolerance.
Multi-Region Deployments: Deploying databases in multiple regions for disaster recovery and global performance. Multi-region deployments provide low-latency access for users worldwide.
Read Replicas: Copies of your primary database that can handle read traffic. Read replicas improve performance by distributing read load and can be deployed in different regions.
Global Tables: DynamoDB Global Tables provide multi-region, multi-master replication. Global Tables enable applications to read and write data in any region with low latency.
Cross-Region Replication: Automatically replicating data between regions for disaster recovery and compliance. Cross-region replication provides data protection and global availability.
__
Database Architecture Design:
Primary-Secondary Architecture: A database architecture with one primary database for writes and multiple secondary databases for reads. This architecture improves performance and availability.
Sharding: Distributing data across multiple databases to improve performance and scalability. Sharding involves partitioning data based on a key and distributing partitions across multiple databases.
Microservices Database Pattern: Each microservice has its own database. This pattern provides data isolation and allows services to use the most appropriate database type.
Database Federation: Combining multiple databases into a single logical database. Database federation provides a unified view of data distributed across multiple databases.
Event Sourcing: Storing all changes to application state as a sequence of events. Event sourcing provides audit trails and enables temporal queries.
__
Database Engine Selection:
Performance Requirements: Consider the performance characteristics of different database engines. Some engines are optimized for read-heavy workloads, while others are optimized for write-heavy workloads.
Feature Requirements: Consider the features provided by different database engines. Some engines provide advanced features like JSON support, full-text search, or geographic data types.
Compatibility Requirements: Consider the compatibility of database engines with your existing applications and tools. Some applications may require specific database engines.
Operational Complexity: Consider the operational complexity of different database engines. Some engines require more administration and maintenance than others.
Cost Considerations: Consider the cost of different database engines, including licensing, storage, and compute costs.
____
Analogy: Building a Comprehensive Library System
Imagine you're designing a massive library system that serves a diverse community with different information needs.
Relational Databases: You have traditional library sections with organized bookshelves, catalog systems, and structured relationships. Your fiction section connects authors to books, your reference section links topics to resources.
Non-Relational Databases: You also have flexible storage areas that can adapt to different types of content. Your multimedia section stores videos, audio files, and interactive content in various formats.
Database Engines: You have different library management systems for different needs. Your main library uses a comprehensive system that handles complex queries and advanced search features.
Global Infrastructure: Your library has branches across multiple cities, each serving local communities while sharing resources globally. Students in Tokyo can access the same research materials as students in New York.
Database Architecture: You've designed your library system to handle different types of access patterns. Your popular fiction section has multiple copies for high-demand books, your rare book collection has specialized storage.
Engine Selection: You choose the right management system for each library branch based on its specific needs. A small community library gets a simple, cost-effective system, a university library gets a powerful system.
____
Common Applications:
- Web Applications: Using RDS MySQL or PostgreSQL for transactional data
- E-commerce: Using DynamoDB for product catalogs and user sessions
- Analytics: Using Aurora for data warehousing and analytics
- IoT Applications: Using DynamoDB for time-series data and device state
____
Quick Note: The "Database Foundation"
- Choose database types based on your data model and access patterns
- Select database engines based on performance, features, and compatibility requirements
- Design database architectures for high availability and scalability
- Consider global infrastructure for multi-region deployments
TAGS
Want to learn more?
Check out these related courses to dive deeper into this topic

Cloud Fundamentals Study Notes
Learn the basic fundamentals of Cloud Computing.

AWS Solutions Architect Associate Study Notes

AWS Developer Associate Study Notes

AWS Solutions Architect Associate Practice Exam Sets
3 Practice sets [195Qs] domain wise to prepare for AWS Solutions Architect Associate Certification exam
