Database — Schema Reference

A lightweight relational model built on plain Markdown notes. Each folder is a table,
each note’s frontmatter is a row, and the song: link property acts as a foreign key
pointing at the canonical entity in Songs/.

Songs (entity / "dimension" table)
  ▲          ▲
  │ song     │ song          ← foreign keys (wikilinks)
  │          │
Lyrical Devices   Compositional Techniques   ... (add more analysis tables freely)

Tables

Songs/ — one note per song (the canonical entity)

Primary key = the note’s file name (the song title).

PropertyTypeNotes
artisttextrequired
genretextrequired
albumtextoptional
yearnumberoptional

Lyrical Devices/ — one note per lyric occurrence

PropertyTypeNotes
songlinkforeign key → Songs e.g. "[[Bohemian Rhapsody]]"
devicelistone or more: consonance, assonance, …
rhyme_schemetextoptional, e.g. xxaa
lyrictextthe excerpt

Compositional Techniques/ — one note per technique occurrence

PropertyTypeNotes
songlinkforeign key → Songs
techniqueliste.g. through-composed, modal-mixture
sectiontextoptional, e.g. “bridge”
notestextfree analysis

Relationships

  • A song has many lyrical-device occurrences and many compositional-technique occurrences.
  • An occurrence belongs to exactly one song (via the song link).
  • The same song can appear across any number of analysis tables without duplication —
    each analysis note just links back to the one Songs/ entity.

Conventions

  • Keep occurrence notes atomic: one excerpt / one observation per note.
  • _Templates/ holds the schema definitions and is excluded from every table view.
  • Genre/artist live only on the Song entity (single source of truth). Analysis tables
    reference the song; to see its genre, open the song note or its embedded profile.