I've seen Roam being mentioned as a graph database for notes before but your comment helps me see it! Would this be a good working model - each `note` entry is logged to a central table in something like a relational database and each `page` is a materialised view over that relation. In contrast, for most of the other note taking apps, the abstraction for a note seems closer to a file.
Would be fun to implement something that works locally with an embeddable graph database library.