Databases Flashcards

1
Q

Would you use an RDS database for OLTP or OLAP?

A

For Online Transaction Processing (OLTP) workloads.
It’s not suitable for analysing large amounts of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do OLTP and OLAP stand for?

A

Online Transaction Processing
Online Analytical Processing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s the difference between OLTP and OLAP?

A

OLTP:
- Real time data
- Data processing
- Large numbers of small transactions.

OLAP:
- Historical data
- Data analysis (large amounts of data)
- Complex queries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does RDS Multi-AZ do?

A

It creates an exact copy of your production database in another AZ.
(Writes are automatically synchronised to the standby database.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which RDS type is always Multi-AZ?

A

Aurora

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

RDS Multi-AZ is for:
A: Improving performance
or
B: Disaster recovery
?

A

B: Disaster recovery

You can’t connect to the standby while the primary database is active.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What would you typically use for OLAP workloads?

A

Redshift

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

TRUE or FALSE?
RDS read replicas must be in a different AZ to the primary

A

FALSE:

They don’t have to be but they can be.

They can also be in a completely different region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

With RDS Multi-AZ, what happens if the primary fails?

A

It changes the DNS endpoint to point to another IP address (of the secondary).
i.e. it automatically fails over

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

TRUE or FALSE?
Read replicas can be promoted to be their own databases.

A

TRUE
However this breaks replication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

TRUE or FALSE?
Automatic backups must be enabled in order to deploy an RDS read replica.

A

TRUE
The replication process involves using the most recent backup to set up the read replica.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How many read replicas can you have to each RDS instance (except Aurora)?

A

5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When would you use a read replica? (2 things)

A

To get better read performance.

To take the load off the primary database for read-only workloads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What databases is Aurora compatible with?

A

MySQL and PostgresSQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How many copies of your data do you get with Aurora (minimum)?

A

6
2 copies in each AZ over 3 AZs (minimum)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the 3 types of Aurora replicas? How many read replicas can you get with each?

A

Aurora (15), MySQL (5), and PostgresSQL (5)

17
Q

TRUE or FALSE?
Backups are always enabled on Aurora

18
Q

TRUE or FALSE?
Aurora backups impact database performance

19
Q

What would you use if you need the performance of Aurora but you have spiky workloads?

A

Aurora Serverless

20
Q

TRUE or FALSE?
You can share Aurora snapshots with other AWS accounts.

21
Q

Whats the difference between eventually consistent read and strongly consistent reads?

A

Eventually - consistency reached within 1 second
Strongly - result will contain all writes prior to the read

22
Q

What is DAX?

A

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.

23
Q

What performance improvement can you get with DAX compared to using DynamoDB alone?

24
Q

What does ACID stand for?

A

Atomic
Consistent
Isolated
Durable

25
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.
26
What does DynamoDB Transactions provide?
ACID (All or nothing approach)
27
What are some use cases for DynamoDB transactions?
Financial transactions Managing orders Multi-player game engines Coordinating actions across distributed components and services
28
Exam tip: If you see a scenario question that mentions ACID requirements, think of...
DynamoDB Transactions
29
In DynamoDB, read and write capacity units are allocated based on...
partition
30
TRUE or FALSE? In DynamoDB, Point in Time Recovery is enabled by default.
FALSE
31
To use DynamoDB Global tables, make sure that ____ is enabled.
Streams
32
DynamoDB is integrated with _____ so that you can create triggers—pieces of code that automatically respond to events in DynamoDB Streams.
AWS Lambda
33
In DynamoDB, it's best practice is to choose partition keys with high cardinality.
TRUE. This way there are many unique values.
34
TRUE or FALSE? Amazon Redshift is serverless.
FALSE It uses EC2 instances.