Databases - DynamoDB Flashcards
What is DynamoDB
fast and flexible NoSQL database service for all apps that need consistent, single-digit millisecond latency at any scale.
Is DynamoDB fully managed?
Yes
What models does DynamoDB support?
Document, key-value
Uses for DynamoDB
mobile, web, gaming, ad-tech, IoT
Where is data in DynamoDB stored?
SSD Storage
Where is DynamoDB spread?
across 3 geographically distinct data centers (not AZs)
Default consistency model for DynamoDB
Eventual Consistent Reads. Strongly consistent reads is the other
Eventual Consistent Reads
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)
Strongly Consistent Reads
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.
If low latency is important
pick Eventual consistent reads. Otherwise, pick strongly consistent reads
DynamoDB pricing
Provisioned throughput capacity, reading, writing and storage of data in tables
How expensive is DynamoDB?
Expensive for writes, cheap for reads
Use case for DynamoDB
If DB is read-heavy, scalabilty and good performance are important, SQL is not necessary
default read and write capacity units when creating a DynamoDB table
5, 5
can you purchase reserved capacity?
Yes, 1 or 3-year terms
Item
Row
Important metrics to know
Read capacity Units, Write capacity units (both provisioned/consumed)
What are some key security features?
Encryption at rest using KMS, AES-256 encryption; authentication and authorization
What are tables?
a collection of items that are schema less with a limit of 256 tables per region
What are items?
a collection of attributes that used primary keys to uniquely identify each item in a table and secondary indexes to provide more querying flexibility.
What are attributes?
a fundamental data element
What is a primary key?
uniquely ids each item in a table and no two items can have the same key
What the different types of primary keys?
A simple partition key with on attribute and a composite partition/sort key with two attributes
What are secondary indexes?
Query data in a table using an alternate key, in addition to queries of primary
What is a global secondary key?
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.
What is a local secondary key?
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.
What is a DynamoDB stream?
a feature that captures data modification events in tables.
What is name convention for a DynamoDB stream?
streams.dynamodb.amazonaws.com
What is a stream record?
each modification event is represented as a stream record. Contains a table name, timestamp and other metadata. Streams last for 24 hours.
What is a shard?
A group of stream records that acts a container of the required information to access and iterate through these records.
What is DAX?
fully managed, HA, in-memory cache for DDB. Useful for read-intensive workloads, but not write.
Why use DAX?
microsecond response times for access eventually consistent data. Very heavy duty loads and scaling on-demand
What are DAX use cases?
fastest possible response for reads; app that read a small number of items more frequently than others.
How does Dynamo differ from RDS?
NoSQL; millisecond performance; supports tables in any size;
How is DDB replication?
replicates across 3 AZs of your choice.
How is maintenance conducted?
No maintenance since DynamoDB is serverless
What are the popular use cases for DynamoDB?
Internet-scale applications, real-time bidding, shopping carts, and customer preferences, content management, personalization and mobile applications.