DynamoDB Flashcards
How many facilities in a region is DynamoDB replicated
3
Eventual Consistent Reads vs. Strongly
Eventual (Default) consistency is usually reached in under 1 second and has the best performance. Strongly requires that the data has been completely written prior to the read.
What components are part of DynamoDB
Tables, Items (think rows), Attributes (think column of data in a row)
Type of primary key that is a single attribute (think unique id) Partition key a.k.a Hash key
Single Attribute
Type of primary key that composed of two attributes
Composite - Partition Key and Sort Key (Hash and Range)
What does DD use to determine the physical location where the data is stored
Partition Key - used as an input to an internal hash function to determine location
How are multliple items with the same Partition Key stored together
Using a different sort key. For example same userid creating multiple posts to a forum.
What type of Index can only be created when creating the table, cannot be removed or modified, and has the SAME partition key, different sort key.
Local Secondary Index
What type of index has a different partition key and different sort key and can be created at any time
Global Secondary Index
What is more efficient to use, Scan or Query
Query, since it find items in a table using only primary key attribute values.
What are DynamoDB streams used for?
To capture any kind of modification and then take certain action on those changes
What changes are captured by DynamoDB Streams during an update?
The before and after image of any attributes that were modified in the item
What changes are captured by DynamoDB Streams during an item delete from a table?
An image of the complete item before it was deleted
What is the lifetime of a Stream
24 hours and then the data is subject to trimming (removal) at any given time
How can you make a Scan operation more efficient?
Use the ProjectionExpression parameter which is like a filter