The scenario
A journaling application needs a relational schema to track users, their journals and entries, tags, and file attachments.
What is in this drawing
Read the decisions behind it.
01
Composite primary key in EntryTag models many-to-many between entries and tags.
02
Attachments reference entries directly for one-to-many attachments.
03
User ownership cascades through journals to entries instead of direct user-entry link.
When to reuse: any personal journaling, note-taking, or content-collection app needing tags and attachments.
More like this