Databases Flashcards
Would you use an RDS database for OLTP or OLAP?
For Online Transaction Processing (OLTP) workloads.
It’s not suitable for analysing large amounts of data.
What do OLTP and OLAP stand for?
Online Transaction Processing
Online Analytical Processing
What’s the difference between OLTP and OLAP?
OLTP:
- Real time data
- Data processing
- Large numbers of small transactions.
OLAP:
- Historical data
- Data analysis (large amounts of data)
- Complex queries
What does RDS Multi-AZ do?
It creates an exact copy of your production database in another AZ.
(Writes are automatically synchronised to the standby database.)
Which RDS type is always Multi-AZ?
Aurora
RDS Multi-AZ is for:
A: Improving performance
or
B: Disaster recovery
?
B: Disaster recovery
You can’t connect to the standby while the primary database is active.
What would you typically use for OLAP workloads?
Redshift
TRUE or FALSE?
RDS read replicas must be in a different AZ to the primary
FALSE:
They don’t have to be but they can be.
They can also be in a completely different region.
With RDS Multi-AZ, what happens if the primary fails?
It changes the DNS endpoint to point to another IP address (of the secondary).
i.e. it automatically fails over
TRUE or FALSE?
Read replicas can be promoted to be their own databases.
TRUE
However this breaks replication.
TRUE or FALSE?
Automatic backups must be enabled in order to deploy an RDS read replica.
TRUE
The replication process involves using the most recent backup to set up the read replica.
How many read replicas can you have to each RDS instance (except Aurora)?
5
When would you use a read replica? (2 things)
To get better read performance.
To take the load off the primary database for read-only workloads.
What databases is Aurora compatible with?
MySQL and PostgresSQL
How many copies of your data do you get with Aurora (minimum)?
6
2 copies in each AZ over 3 AZs (minimum)
What are the 3 types of Aurora replicas? How many read replicas can you get with each?
Aurora (15), MySQL (5), and PostgresSQL (5)
TRUE or FALSE?
Backups are always enabled on Aurora
TRUE
TRUE or FALSE?
Aurora backups impact database performance
FALSE
What would you use if you need the performance of Aurora but you have spiky workloads?
Aurora Serverless
TRUE or FALSE?
You can share Aurora snapshots with other AWS accounts.
TRUE
Whats the difference between eventually consistent read and strongly consistent reads?
Eventually - consistency reached within 1 second
Strongly - result will contain all writes prior to the read
What is DAX?
An in-memory caching service for DynamoDB.
It improves performance as the application doesn’t need to try the cache first, it queries DAX directly.
What performance improvement can you get with DAX compared to using DynamoDB alone?
Up to 10x
What does ACID stand for?
Atomic
Consistent
Isolated
Durable
What is the ACID methodology?
A set of properties that guarantee reliability and consistency in database transactions.
It basically means all or nothing. Either a transaction succeeds or it doesn’t.
What does DynamoDB Transactions provide?
ACID
(All or nothing approach)
What are some use cases for DynamoDB transactions?
Financial transactions
Managing orders
Multi-player game engines
Coordinating actions across distributed components and services
Exam tip: If you see a scenario question that mentions ACID requirements, think of…
DynamoDB Transactions
In DynamoDB, read and write capacity units are allocated based on…
partition
TRUE or FALSE?
In DynamoDB, Point in Time Recovery is enabled by default.
FALSE
To use DynamoDB Global tables, make sure that ____ is enabled.
Streams
DynamoDB is integrated with _____ so that you can createtriggers—pieces of code that automatically respond to events in DynamoDB Streams.
AWS Lambda
In DynamoDB, it’s best practice is to choose partition keys with high cardinality.
TRUE. This way there are many unique values.
TRUE or FALSE?
Amazon Redshift is serverless.
FALSE
It uses EC2 instances.