Skip to main content

rust-sqlite logseq

database schema

  • block table
    • integer primary key
    • nullable foreign key to parent block references block table - null indicates a root-level block - index
    • foreign key page this block belongs to references page table - index
    • sequence number represents order amongst sibling blocks
    • block text content - markdown like logseq
  • page table
    • integer primary key
    • foreign key to root block of page
    • page metadata columns
  • link table
    • blocks may have many to many links to other blocks
  • asset table
    • blocks may contain references to files that are stored as blobs in this table e.g. PDFs, images, etc.
  • cache table
    • blobs with binary representation of the application's internal representation of a page, parsed from a selection of block table/page table rows