Databases Flashcards
Does DynamoDB have query join capability?
No
Does DynamoDB support aggregations such as SUM or AVG?
No
How do NoSQL databases scale?
Horizontally
Instead of rows and columns, what is the lexicon used in Dynamo DB?
Items = Rows
Attributes = columns
What is the maximum size for an item in DynamoDB?
400KB
Using DynamoDB, what is the accepted solution to store BLOB data?
Store the object in S3 and store the metadata
What is provisioned mode in DynamoDB?
You specify the number of reads and writes and pay for the provisioned capacity regardless if it is all used.
Can you auto-scale using DynamoDB provisioned capacity mode?
No. You must use on-demand mode.
What is cheaper, DynamoDB provisioned or on-Demand mode?
Provisioned mode.
What can be used in DynamoDB provisioned capacity to temporarily exceed throughput?
Burst capacity. Once exceeded, a ProvisionedThroughputExceededException will be thrown.
When reaching a ProvisionedThroughputExceededException error in DynamoDB, what is the prferred solution?
An exponential backoff retry
In DynamodDB, how large is 1 WCU?
1 WCU = 1 write up to 1KB in size per second.
What are the two types of reads in DynamoDb?
Strongly consistent and eventually consistent reads.
What is an eventually consistent read in DynamoDB?
A read that has the potential to get stale data because the write has not replicated to all the servers on the backend yet.
What is a strongly consistent read in dynamoDB?
It returns data only after it has been fully replicated on the backend.
How do you set a strongly consistent read in DynamoDB?
Set the consistentRead parameter to TRUE in API calls.
How many RCUs is a strongly consistent read?
It is twice the cost of an eventually consistent read.
In DynamoDB, how large is 1RCU?
One strongly consistent read or two eventually consistent reads per second for items up to 4KB in size.
In DynamoDB, how are WCUs and RCUs spread?
evenly amongst all partitions
In DynamoDB, what is a projectedExpression?
It can be specified to only retrieve certain attributes.
Can a FilterExpression be used with key attributes in DynamoDB?
No, You cannot use this with HASH or Range Attributes.
In DynamoDB, what is the max value of data allowed to be returned in a Query API call?
1MB
How does the SCAN operation work in DynamoDB?
It loads the entire table and then filters out the data you want. This is inefficient.
How can you improve DynamoDB scan performance if you must use it?
Parallel Scans
Can you retry Items that fail in Batch operations in DynamoDB?
Yes
How many PutItem or DeleteItems can be present in 1 batchWriteItem API request
25 items or 16MB of data. Still has a 400KB per item maximum
What is PartiQL in DynamoDB?
It is a SQL compatible query language for dynamodDB. It can only handle CRUD. Joins are still not possible.
Are dynamoDB filters performed on the server or client side.
Client side.
What is an LSI in Dynamo DB?
It uses the same partition key as the base table, but you get an additional sort key.
Up to 5 LSI per table
Must be defined at table creation
What is an GSI in Dynamo DB?
It uses an alternative primary key.
Requires WCU and RCU
Can be added AFTER table creation
What happens in DynamoDB when the GSI is throttled?
The main table will also be throttled.
When it comes to WCU and RCU with LSI and GSI, what is the big difference?
GSI has provisioned capacity
LSI uses the RCU AND WCU of the main table
What is DynamoDB DAX?
Seamless in-memory cache for DynamoDB.. Solves HOT key problem.
How many DynamoDB DAX nodes can be in a cluster?
10
How many AZs should you use for production?
A minimum of three
When would you use Elasticache instead of DAX with DynamoDB?
When you have an aggregate cached result.
What is DynamoDB Streams?
It is an ordered stream of item-level modifications.
What AWS services can consume a DynamoDB stream?
Lambda, Kinesis Data Streams, Kinesis Client Library
What is the max retention for DynamoDB Streams?
24 hours
What are the DynamoDB stream types?
KEYS_ONLY - Key attributes of the modified item
NEW_IMAGE - Entire Item as it appears after it was modified
OLD_IMAGE -Entire Item as it appears before it was modified
NEW_AND_OLD_IMAGES - Both new and old images of the item
What is the max time an expired item is held in DynamoDB?
48 hours
Does DynamoDB have backup and restore capability?
Yes. It has PITR like RDS
What are DynamoDB Global Tables?
Multi-Region, Multi-Active, fully replicated tables.
What is DynamoDB Local?
Allows you to develop and test apps locally without accessing the web service.
Does DynamoDB support Federated Logins?
Yes.
Is RDS ACID compliant?
Yes. All database services are compliant
What is the maximum database volume size in Aurora?
128TB
What is the maximum amount of read replicas in Aurora?
15