DynamoDB Flashcards

1
Q

DynamoDB 3 most common data types

A

B (Binary), N (Number), S (String)

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

What are table rows and columns called?

A

Items (rows) and Attributes (columns)

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

What is when DynamoDB slices your table up into smaller chunks of data? (this speeds up reads for very large tables)

A

A Partition

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

When does DynamoDB create a partition?

A
  • Every 10 GB of Data or
  • When you exceed RCUs (3000) or WCUs (1000) limits for a single partition
  • When DynamoDB sees a pattern of a hot partition, it will split that partition in an attempt to fix the issue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two types of primary key?

A
  • Simple Primary Key (Using only a Partition Key)

- Composite Primary Key (Using both a Partition and Sort Key)

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

Partition Key is also known as…

A

HASH

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

Sort Key is also known as…

A

RANGE

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

When creating a Simple Primary Key, what value must be unique?

A

the Partition Key

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

When creating a Composite Primary Key, what combination must be unique?

A

the combined Partition and Sort Key must be unique

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

What DynamoDB API calls support transaction?

A

via the TransactWriteItems and TransactGetItems API calls

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

What is the name of the feature that allows to set up a Lambda function triggered every time data is modified in a table to react to changes?

A

DynamoDB Streams

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

What two types of Indexes does DynamoDB have?

A

LSI - Local Secondary Index (supports strongly or eventual consistency reads)

GSI - Global Secondary Index (cannot provide strong consistency)

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

DynamoDB two capacity modes are…

A

Provisioned and On-Demand

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

What is the name of the maximum amount of capacity your application is allowed to read or write per second from a table or index?

A

Provisioned Throughput Capacity

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

The two methods of retrieving items?

A

scan and query

(Scan: Scans through all items in a table and then returns one or more items through filters. Avoid using this)

(Query: Find items based on primary key values)

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

How often can you switch between DynamoDB capacity modes?

A

You can switch between these modes once every 24 hours

17
Q

This is a fully managed in-memory write through cache for DynamoDB that runs in a cluster

A

DynamoDB Accelerator (DAX)

18
Q

How do you calculate Reads (RCU)?

A

A read capacity unit represents: one strongly consistent read per second, or two eventually consistent reads per second, for an item up to 4 KB in size

How to calculate RCUs for strong

  • Round data up to nearest 4
  • Divide data by 4
  • Times by number of reads

How to calculate RCUs for eventual

  • Round data up to nearest 4
  • Divide data by 4
  • Times by number of reads
  • Divide the final number by 2
  • Round up to the nearest whole number
19
Q

How do you calculate Writes (Writes)?

A

A write capacity unit represents: one write per second, for an item up to 1 KB

How to calculate Writes

  • Round data up to nearest 1
  • Times by number of writes