DynamoDB Questions Flashcards

1
Q

What is a row called in DynamoDB

A

Item

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

Do items needs to share the same number of attributes?

A

No

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

Are there columns in DynamoDB

A

No

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

Can each Item in a table can be expressed as a tuple?

A

Yes

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

What is the maximum size of an item?

A

400K

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

Can it be provisioned to scale on the fly

A

Yes

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

Is this data model suited for storing data in used for serialization?

A

Yes

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

Is this data model suited for storing data in messaging in distributed systems

A

Yes

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

Are attributes in name/value pairs?

A

Yes

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

What is used to perform DDL operations?

A

Dynamo DB API

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

What is used to perform DML operations?

A

object-oriented code

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

Does dynamo DB support SQL?

A

No

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

Can data be queried ?

A

Yes, programmatically through API

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

What data can it store well?

A

cookie states, session data, application state, personalization data, access control data, JSON, sensor and log data.

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

What type of latency can be expected?

A

single digit millisecond

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

Is this suited for horizontal scaling?

A

Yes

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

How would you scale horizontally on a RDMS?

A

Sharding

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

What are the two consistency models supported?

A

Strong consistency and eventual consistency

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

If you choose strong consistency, can you use a standard EBS?

A

No, you must use provisioned IOPS

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

What is strong consistency?

A

The updates of one user must be seen by all other users. Similar to ACID consistency.

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

Should classic entity-relationship model be implemented in DynamoDB?

A

No, data should be denormalized and flattened.

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

Are adh-hoc queries suitable?

A

No

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

Are OLAP queries suitable?

A

No, use redshift for OLAP

24
Q

Are BLOBS suitable?

A

No, you can store pointers to S3. Although binary objects can be stored, the item limit of 400K makes it impractical.

25
Q

Is there a concept such as a table join in DynamoDB?

A

No.

26
Q

If you wanted run a query equivalent, what would you need to do?

A

Use EMR and Hive

27
Q

Does DynmoDB require a primary key?

A

Yes

28
Q

What must the primary key contain?

A

A hash key, and optionally a range key.

29
Q

When is a range key required?

A

When the hashkey is not sufficiently to uniquely identify an item?

30
Q

When migrating to DynamoDB what should be done to the data model?

A

The DM should be denormalized?

31
Q

What can you tell me about the ideal hash key?

A

It is uniformly distributed across the items in a table.

32
Q

Should reference data be used as a hash key?

A

Generally, no because it is not uniformly distributed

33
Q

How does DynamoDB search for data that is not in the primary key?

A

It uses local indices, global indices, and scans.

34
Q

How does a local secondary index differ from a primary index?

A

It uses the same hash key as defined on the table, but a different attribute as the range key.

35
Q

How does a global secondary index differ?

A

It can use any scalar attribute as the hash key or range key.

36
Q

How many local secondary indices can you have?

A

5

37
Q

How many global secondary indices can you have

A

5

38
Q

What are global secondary indices similar to in RDMS world?

A

Covering indices, that contain the data they need in the index.

39
Q

How are reads in local secondary indices different from global secondary indices?

A

Reads on global secondary indices are always eventually consistent, whereas local secondary indices support eventual or strong consistency

40
Q

What is a “read unit”?

A

The amount of data read from a DynamoDB table or index. 4K

41
Q

What is a “write unit?”

A

The amount of data written to a DynamoDB table or index. 1K

42
Q

Why are the read and write units important?

A

They determined the provisioned IO of the table.

43
Q

What is “throttling”?

A

Dynamo’s DB queuing of the read/write operations because incorrectly provisioned I/O.

44
Q

Why is throttling to be avoided?

A

Because it degrades performance and can throw an exception.

45
Q

Can provisioned I/O be altered on an existing table?

A

Yes

46
Q

How does a tradition RDMS and DynamoDB vary in terms of I/O?

A

DynamoDb can scale up or down the provisioned I/O, whereas a RDMS has fixed I/O

47
Q

What are the 5 states for migrating?

A

Planning, Data Analysis, Data Modeling, Testing, Migration

48
Q

What is the purpose of the planning phase?

A

Identify the data migration goals

49
Q

What is the purpose of the data analysis phase?

A

Understand the composition of the source data and identify the data access patterns

50
Q

What is the purpose of the modeling phase?

A

Define the indices and tables that will be needed in Dynamo DB.

51
Q

In what phase use the data be profiled?

A

In the data analysis phase, in order to understand the data distribution needed in the modeling phase.

52
Q

Why is the data access pattern important?

A

It will determine the provisioned I/O, performance and cost.

53
Q

What are common patterns for data access?

A

Write Only, Fetches by distinct values, Queries across a range of values.

54
Q

Should a randomly generated number ID be used as a hash key?

A

Yes

55
Q

What elements are needed to calculate DynamoDB costs?

A

Number of Items, item size, write units, read units

56
Q

What scalar types are supported by DynamoDB?

A

String, number, binary

57
Q

DynamoDB Dax

A

Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement – from milliseconds to microseconds – even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management. Now you can focus on building great applications for your customers without worrying about performance at scale. You do not need to modify application logic, since DAX is compatible with existing DynamoDB API calls. You can enable DAX with just a few clicks in the AWS Management Console or using the AWS SDK. Just as with DynamoDB, you only pay for the capacity you provision.