NoSQL/DynamoDB Flashcards
What is a partition key in DynamoDB?
Can act as a primary key. Determines what data is stored together.
What is a sort key in DDB?
Determines sort order of partitions. Optionally part of composite PK along with partition key.
1 WCU means you can write ___ of data per second
1 KB
1 RCU means you can read ____ of data per second.
4 KB
What are the two types of backups for DDB?
On Demand and Point In Time Recovery.
When do on demand backups get deleted?
When you delete them, no automatic deletion.
When are point in time recovery snapshots deleted?
Auto after 35 days
How far behind are point in time recovery backups?
One second
How are WCUs and RCUs handled in on demand tables?
You pay a price per million RCUs or WCUs. Scaling done for you automatically.
How are WCUs and RCUs handled with a Provisioned table?
RCU and WCU set per table.
What are the two ways to read data from DynamoDB?
Query and Scan
What is the advantage of Query in DDB?
Capacity consumed is only on what is returned by query.
What is the disadvantage of Query in DDB?
Not flexible, can only query on PK or PK/SK
What is the advantage of Scan in DynamoDB?
You can query on any attribute
What is the disadvantage of Scan in DDB?
Capacity consumed for every item scanned through
What is a Local Secondary Index?
Alternative view of table that uses an alternative sort key
When can LSI’s be created?
Only when table is created
What is a Global Secondary Index?
Alternative partition key or partition key/sort key combination for a table
When can GSI’s be created?
Any time
What is a stream in DDB?
A 24 hour rolling time ordered list of item changes in a table
In DDB, what is the primary use of a trigger?
When an attribute for an item is changed, we can send an event using streams to a lambda function to take some sort of action.
What is the purpose of a Global table?
Allow for global high availability and global disaster recovery and business continuity.
How is DAX highly available?
There is a primary node and read replicas distributed across multiple A Z ‘s within a VPC.
What is the primary use of DAX?
Allows for caching of reads from DynamoDB table. This can speed up reads and allow for better scaling.
What is Elasticache?
An in-memory, high performance database (cache) that lives within an application.
What is the main use of Athena?
Read data that is stored in S3 using SQL queries
Where is Redshift data backed up to?
S3
How often do automatic backups of redshift occur?
Every 8 hours or 5 GB of data consumed