Thank you for the informative video. I have a question perhaps you can shed some light on... Assume I'm using a singe table design and I have two different item types that use the same partition key. For example, my PK might be USER#, but then I'll vary the SK for different items such as SK#type1 and SK#type2. If I query only specifying the PK, the result set I get back will contain the two different item types (type1 and type2). Is there a best practice or strategy on how to handle the fact that the query result will contain two different item types? Or is it just a brute force approach where my code has to look at the value of the SK to know the type of item? Or perhaps I'm missing something and am not doing it correctly.
Thank you for this! And looking forward to the rest of the series. I recently implemented a single table design so I’m really interested to learn tips and how to improve my setup. I would like to see how you handle the code for it if you use an ORM or not. I was looking at dynamoose but not sure if it’s worth it
I don't use anything - just the AWS SDK. I put all my calls to the sdk and dynamo in a model and then interact from my app with that, so it is easy to build tests and develop with it.
Naguara Chama, Great video. I'm starting to understand this new world. very useful to getting started with Single Table Design.
Great background story and an awesome quick explanation. Thanks Marcia!
Glad you liked it!
By the way, would be awesome to see some dynamodb model migration video
Great video, just wat I needed!
Happy that you like it ☺️
Thank you for the informative video. I have a question perhaps you can shed some light on...
Assume I'm using a singe table design and I have two different item types that use the same partition key. For example, my PK might be USER#, but then I'll vary the SK for different items such as SK#type1 and SK#type2. If I query only specifying the PK, the result set I get back will contain the two different item types (type1 and type2).
Is there a best practice or strategy on how to handle the fact that the query result will contain two different item types? Or is it just a brute force approach where my code has to look at the value of the SK to know the type of item?
Or perhaps I'm missing something and am not doing it correctly.
Use begins_with for the search key first few characters assuming you know the type and are looking for it
👏
Where can I buy "Code is a liability" merch?
I will make a merch store 😅
Thank you for this! And looking forward to the rest of the series. I recently implemented a single table design so I’m really interested to learn tips and how to improve my setup. I would like to see how you handle the code for it if you use an ORM or not. I was looking at dynamoose but not sure if it’s worth it
I don't use anything - just the AWS SDK. I put all my calls to the sdk and dynamo in a model and then interact from my app with that, so it is easy to build tests and develop with it.