ER · Diagram Design

Content platform · data model

The four entities behind the site. Article is the aggregate root — everything else exists to describe or classify it. `#` marks primary keys, `→` marks foreign keys.

1 N 1 N 1 N WRITES TAGGED ENTITY Author # id uuid handle text name text bio text site_url text ENTITY · AGGREGATE ROOT Article # id uuid title text slug text · unique body_mdx text published_at timestamp → author_id uuid status enum og_image text · url ENTITY Tag # id uuid slug text · unique name text description text JOIN ArticleTag → article_id uuid → tag_id uuid LEGEND Aggregate root Entity Join table # Primary key Foreign key 1 / N Cardinality

THE HEADLINE

Article is the root

Author, Tag, and the join table only exist to describe Article. If you're thinking about a feature, start here and trace outward.

Many-to-many via a join

  • Tags aren't embedded on Article
  • ArticleTag is a pure join — no metadata
  • Dashed border signals it's not a primary entity

Cardinality over arrows

Plain lines with 1/N at the ends read cleaner than crow's feet at this size. Every relationship carries both numbers.