0
0
DynamoDBquery~20 mins

DynamoDB vs MongoDB vs Cassandra - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
NoSQL Mastery: DynamoDB vs MongoDB vs Cassandra
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Primary Data Model Differences
Which database uses a wide-column store model primarily designed for handling large volumes of data across many commodity servers?
AMongoDB
BCassandra
CDynamoDB
DAll three use the same data model
Attempts:
2 left
💡 Hint
Think about which database is known for its column family storage and scalability.
query_result
intermediate
2:00remaining
Query Consistency Behavior
If you perform a read operation immediately after a write in DynamoDB with default settings, what consistency guarantee do you get?
AStrong consistency, always returns the latest write
BRead operations are not supported in DynamoDB
CNo consistency guarantees
DEventual consistency, may return stale data
Attempts:
2 left
💡 Hint
Consider the default read consistency mode in DynamoDB.
📝 Syntax
advanced
2:30remaining
DynamoDB Query Syntax for Filtering
Which of the following DynamoDB query expressions correctly filters items where the attribute 'status' equals 'active'?
DynamoDB
Table.query(
  KeyConditionExpression=Key('userId').eq('123'),
  FilterExpression=???
)
AAttr('status').eq('active')
BKey('status').eq('active')
CFilter('status').equals('active')
DAttr('status').equals('active')
Attempts:
2 left
💡 Hint
Use the correct class for filtering non-key attributes in DynamoDB queries.
optimization
advanced
3:00remaining
Optimizing Write Throughput in Cassandra
Which approach best improves write throughput in Cassandra when handling a high volume of writes?
AUse batch writes sparingly and avoid large partitions
BIncrease the replication factor to 5
CUse a single partition key for all writes
DDisable commit log to speed up writes
Attempts:
2 left
💡 Hint
Think about partition size and batch write best practices in Cassandra.
🔧 Debug
expert
3:00remaining
Troubleshooting DynamoDB Query Errors
You run this DynamoDB query but get a ValidationException error:

Table.query(KeyConditionExpression=Key('userId').eq('123') & Attr('status').eq('active'))

What is the cause of the error?
AMissing quotes around '123' in the Key condition
BKeyConditionExpression requires a FilterExpression for non-key attributes
CUsing & operator between Key and Attr expressions is invalid in KeyConditionExpression
DAttr cannot be used in FilterExpression
Attempts:
2 left
💡 Hint
Check how KeyConditionExpression and FilterExpression are used in DynamoDB queries.