Single Table Design Pattern - Fetch only selected entities by giving begins_with or starts_with sort key
banandh opened this issue · comments
Describe the feature
Dynamo DB Java SDK batchGetItemRequest to support sort key starts_with/begins_with format also.
Use Case
SIngle Table design patter for a person is designed to store address, name, emails, phones, ids as separate entities which means PersonId is the sortKey and each address of that person will be added with different sort keys.The same way emails, phones and all the other person related entities are stored in table.
In one of the scenario, I need to pull person's all email and phone alone based on person Id. I will just have the person ID (PK) and email, Phone's sort key format alone not the exact sort key. so how to fetch selective entities based on PK and SK starts with?? I could see options to fetch completely based on PK but it will fetch entire data or giving exact sort key and retrieving it.
Proposed Solution
No response
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS Java SDK version used
2.20.55
JDK version used
JDK17
Operating System and version
Ubuntu