I'm exploring whether DynamoDB is a good fit for my app, which manages recipes. Each recipe has ingredients and a series of cooking steps. These steps include text descriptions, images, and even videos used to create an appealing presentation for the users. Also, some videos might be reused across multiple recipes, like a tutorial on dicing onions effectively. My needs include retrieving a list of recipes with their names, authors, and creation dates, as well as getting the ingredients and steps for specific recipes. Given this setup, would a single table design in DynamoDB work well for my use case?
4 Answers
If you know your access patterns in advance and can set up good indexes, then a single table design could work for you. Personally, I've had some bad experiences with poorly designed DynamoDB tables, but it sounds like you're considering things carefully, so it might fit your needs. Still, I lean towards relational databases myself.
DynamoDB is certainly interesting, but it has significant drawbacks. The design can get complicated since it prioritizes performance over developer productivity. Plus, it's a proprietary solution, so you'll need a team familiar with it. Pricing can also be tricky—if your design isn't solid, it could become expensive. For now, it sounds like your dataset isn't huge, so maybe it's manageable.
That's a good point! I found using DynamoDB was more about performance optimization. I've used it before, but I often wish I had stuck with Postgres, especially for more complex queries.
If you're asking about using DynamoDB for this, I'd suggest sticking with a relational database instead. You might run into edge cases that make things complicated later on.
Why not give it a shot? You won't really understand how to use DynamoDB until you try it out. There are plenty of libraries available to help with single table design. But if you're looking for a quick and easy solution, a SQL database might be better overall.

I agree! Knowing how you're going to access the data ahead of time is crucial for DynamoDB to work well.