DynamoDB Flashcards

1
Q

What is Dynamo DB?

A

No Sql Database in AWS

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

What does Dynamo offers for CRUD operations?

A

PutItem, GetItem, UpdateItem and DeleteItem

PI, GI, UI and DI

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

What are the Batch Operation does Dynamo offers?

A

BatchGetItem and BatchWriteItem (BGI and BWI. These are parallel operations)

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

maximum item size in DynamoDB is _____

A

400KB

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

A single BatchGetItem operation can retrieve a maximum of ___ items and can not exceed ___ in size.

A

100 and 16MB

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

A single BatchWriteItem operation can write a maximum of ___ items and can not exceed ___ in size.

A

25 and 16MB

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

You don’t need to specify full primary key value to read an item if its a composite primary key in dynamo?

A

False

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

Dynamo DB uses ______ consistent reads by default?

A

eventually

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

Dynamo Batch request does not fail unless all the requests in the batch fails?

A

True

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

Can two items in a table have same partition key value?

A

No. If so, you have to use sort key as well

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

You can modify the local secondary index in dynamo?

A

No, they gets created during the table creation and can’t be changed.

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

You can modify the Global secondary index in dynamo?

A

Yes, we can

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

What index is same partition key + different sort key in dynamo?

A

Local Secondary Index

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

What index is different partition key + different sort key in dynamo?

A

Global Secondary Index

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

Dynamo Primary Key Concept?

A
    • Single Attribute (Unique ID)
  • —> Partition Key (Hash key) of one attribute
    • Composite Key (Unique + Date Range)
  • —>Partition & Sort Key (Hash and Range) of two attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Does a Local secondary index shares provisioned throughput settings for read and write activity with the table it is indexing.

A

True

17
Q

Max dynamo db tables per Region per account

A

256

18
Q

Max default Local and Global Secondary Index

A

5 and 20 (Total 25)

19
Q

Can you request AWS to increase Local Secondary Index more than 5?

A

No, max is 5 for LSI

20
Q

Can you request AWS to increase Global Secondary Index more than 20?

A

Yes, you need to contact AWS support

21
Q

Max Size of an item Collection in dynamo db is

A

10GB

22
Q

Dynamo Accelerator

A

is used to increase the performance for read heavy workloads.

23
Q

Do you suggest to use Dynamo DAX for write heavy applications?

A
No.
DAX is not meant for
-- Strongly Consistent reads
-- Write Intense apps
-- Apps with few reads
-- Apps does not need micro second responses
24
Q

Strongly Consistent Read Capacity Formula

A

(ITEM SIZE (rounded up to the next 4KB multiplier) / 4KB) * # of items

25
Q

Write Capacity Formula

A

(ITEM SIZE (rounded up to the next 1KB multiplier) / 1KB) * # of items

26
Q

We have an item size of 3 KB and we want to read 80 (strongly consistent read) items per second per table. What is the read capacity required?

A

The formula to determine the total number of read operations is the ITEM SIZE (rounded up to the next multiple of 4 KB, since, again, we can’t group multiple items together) / 4 KB. In this example, we take 3, round it up to 4, and divide it by 4, which gives us 1 read capacity. However, we want to read 80 of these 3 KB items at the same time, so we need to multiply our result by 80, and we end up with 80 for our read throughput capacity.

So:

80 * (3KB (round up to 4) / 4KB)
80 * 1 = 80 required provisioned read throughput

27
Q

Eventual Consistent Read Capacity Formula

A

((ITEM SIZE (rounded up to the next 4KB multiplier) / 4KB) * # of items)/2

OR
Strongly Consistent Read Capacity Formula / 2

28
Q

We need 10 writes per second, and we have an item of size 1.5KB, how much throughput is required?

A

Let’s take our item size of 1.5 KB, and round it up to 2KB, then divide that by 1KB. We take that result, which is 2, and we multiply it by the number of items of that size we want to write per second. In this case, that’s 2 times 10, which gives us 20 write capacity units.

SO,

•(ITEM SIZE (1.5KB) / 1 KB) x 10 = 20 capacity units
This is even simpler than reads, because we don’t have to worry about eventually consistent or strongly consistent.

29
Q

What is the use of TTL in Dynamo?

A

To delete the expired data automatically

30
Q

When does the records be deleted after marking to be deleted in Dynamo?

A

24-48 hours

31
Q

Dynamo data supporting formats?

A

JSON, XML and HTML