Database Reference
In-Depth Information
In this case, updates made by client 1 are lost. In order to avoid this, DynamoDB provides
the conditional write feature, which allows the updates only if certain conditions are ful-
filled. In this, we can put a condition such as update the topic price only if the current
book price is $20. If that is not the case, then DynamoDB will fail that operation and give
the necessary feedback to the client, as shown in the following diagram:
There might be multiple use cases where conditional writes can be useful. Suppose you
are working on some transaction data where data consistency is extremely critical, then
you can use conditional writes to avoid missed updates.
Tip
AWS supports atomic counters , which can be used to increment or decrement the value
as and when needed. This is a special feature that handles the data increment and decre-
Search WWH ::




Custom Search