Databases - DynamoDB Flashcards

1
Q

What is DynamoDB

A

fast and flexible NoSQL database service for all apps that need consistent, single-digit millisecond latency at any scale.

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

Is DynamoDB fully managed?

A

Yes

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

What models does DynamoDB support?

A

Document, key-value

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

Uses for DynamoDB

A

mobile, web, gaming, ad-tech, IoT

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

Where is data in DynamoDB stored?

A

SSD Storage

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

Where is DynamoDB spread?

A

across 3 geographically distinct data centers (not AZs)

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

Default consistency model for DynamoDB

A

Eventual Consistent Reads. Strongly consistent reads is the other

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

Eventual Consistent Reads

A

Consistency across all copies of data is usually reached within 1 second. repeating a read after a short time should return the updated data (best read performance)

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

Strongly Consistent Reads

A

returns the result that reflects all writes that received a successful response prior to the read. May not be available if there is an outage or delay. Not supported across AWS regions.

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

If low latency is important

A

pick Eventual consistent reads. Otherwise, pick strongly consistent reads

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

DynamoDB pricing

A

Provisioned throughput capacity, reading, writing and storage of data in tables

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

How expensive is DynamoDB?

A

Expensive for writes, cheap for reads

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

Use case for DynamoDB

A

If DB is read-heavy, scalabilty and good performance are important, SQL is not necessary

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

default read and write capacity units when creating a DynamoDB table

A

5, 5

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

can you purchase reserved capacity?

A

Yes, 1 or 3-year terms

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

Item

A

Row

17
Q

Important metrics to know

A

Read capacity Units, Write capacity units (both provisioned/consumed)

18
Q

What are some key security features?

A

Encryption at rest using KMS, AES-256 encryption; authentication and authorization

19
Q

What are tables?

A

a collection of items that are schema less with a limit of 256 tables per region

20
Q

What are items?

A

a collection of attributes that used primary keys to uniquely identify each item in a table and secondary indexes to provide more querying flexibility.

21
Q

What are attributes?

A

a fundamental data element

22
Q

What is a primary key?

A

uniquely ids each item in a table and no two items can have the same key

23
Q

What the different types of primary keys?

A

A simple partition key with on attribute and a composite partition/sort key with two attributes

24
Q

What are secondary indexes?

A

Query data in a table using an alternate key, in addition to queries of primary

25
Q

What is a global secondary key?

A

Partition and sort key that can be different than the base table. Primary key can be partition key or sort key. Up to 20 GSI can be defined.

26
Q

What is a local secondary key?

A

Partition has the same partition key as the base table but as different sort key. Must be partition/sort key. Up to 5 LSIs can be defined.

27
Q

What is a DynamoDB stream?

A

a feature that captures data modification events in tables.

28
Q

What is name convention for a DynamoDB stream?

A

streams.dynamodb.amazonaws.com

29
Q

What is a stream record?

A

each modification event is represented as a stream record. Contains a table name, timestamp and other metadata. Streams last for 24 hours.

30
Q

What is a shard?

A

A group of stream records that acts a container of the required information to access and iterate through these records.

31
Q

What is DAX?

A

fully managed, HA, in-memory cache for DDB. Useful for read-intensive workloads, but not write.

32
Q

Why use DAX?

A

microsecond response times for access eventually consistent data. Very heavy duty loads and scaling on-demand

33
Q

What are DAX use cases?

A

fastest possible response for reads; app that read a small number of items more frequently than others.

34
Q

How does Dynamo differ from RDS?

A

NoSQL; millisecond performance; supports tables in any size;

35
Q

How is DDB replication?

A

replicates across 3 AZs of your choice.

36
Q

How is maintenance conducted?

A

No maintenance since DynamoDB is serverless

37
Q

What are the popular use cases for DynamoDB?

A

Internet-scale applications, real-time bidding, shopping carts, and customer preferences, content management, personalization and mobile applications.