Paths Subjects Questions Quizzes Pricing Search
Advanced Open Pro

Single-Table Design for a Blog Platform

A blogging platform needs to serve, from DynamoDB: (a) get a post by post_id; (b) list an author's posts, newest first; (c) list the comments on a post, oldest first; (d) get an author's profile.

  1. Design a single-table PK/SK scheme that serves (a)–(d), noting which are served by the base table and which need a GSI.
  2. Why is single-table design preferred over one DynamoDB table per entity type in this kind of system?
  3. A new requirement arrives: "show the 10 most recent comments across the whole platform, for moderation." How would you serve it without breaking the existing design?

Share this question

← Back to SQL vs NoSQL & Data Modeling for Scale practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.