Databases Flashcards
Databased
Structured
Enables efficiency with query and searching through the data
Defined relationships
Relational Database
Like excel spreadsheets.
Links between them
Can use SQL to perform queries or lookups
NoSQL databases
Non relational databases.
Built for specific purpose with specific data model in mind.
Flexible Schema / Shape.
Benefit is flexibility. Easy to make it evolve.
Scalable with distributed servers.
High performance
Highly functional
Examples:
Key- Value
Graph Database
In-memory
Search databases
NoSQL- data example
JSON format
JSON
JavaScript Object Notation
JSON
Common way to describe data.
Data can be nested
Fields can change over time.
Support for new types (arrays etc)
Databases Shared Responsibility Model
AWS offers use to manage different databases
Benefits include:
Quick provisioning
High availability
Vertical and horizontal scaling
Automated backup and restore, operations and upgrades
Operating System Patching is handled by AWS
Monitoring and Alerting
If run on EC2 instance, you need to handle resiliency, backup, patching, high availability, fault tolerance, scaling, etc.
RDS
Relational Database Service
RDS Overview
Relational Database
Managed DB
Uses SQL
Create databases in cloud that are managed by AWS
Postgres
MySQL
MariaDB
Oracle
Microsoft SQL Server
IDM DB2
Aurora
DB
database
RDS vs EC2
managed vs not
Automated provisioning and patching
continuous backups and restore
monitoring dashboards
read replicas
multi AZ setup for DR (disaster recovery)
Scaling capability
Storage backed by EBS
CANNOT SSH into your instances
RDS Solution Architecture
Elastic Load Balancer -> EC2 Instances <—> Amazon RDS
Run as managed Service
Amazon Aurora
Proprietary to AWS
supports PostgreSQL and MySQL
Cloud optimized
Storages grows automatically in increments of 10gb up to 128 TB
20% more efficient than RDS
Not in free tier
AWS Aurora Serverless
Automated database instantiation and auto-scaling based on actual use.
PostgreSQL and MySQL are both supported
No capacity planning needed
Least management overhead
Pay per second, can be more cost effective
Use cases: good for infrequent intermittent or unpredictable workload
RDS Deployment
Read Replicas
Multi-AZ
Multi-Region
Read Replicas
Up to 15 read replicas
Multi-AZ
Failover in case of AZ outage (high availability)
Multi-Region
Elastic Cache
Managed Redis
Memcached
Dynamo DB
Dynamo DB Global Tables
Redshift
EMR Overview
Athena Overview