I finally got Logseq to work on my M1 mac. I’m thrilled because I’m a huge fan of clojure and datalog. My use case is deep biomedical research. Therefore, I am curious if there are heuristics which offer guidelines for feeding the database for optimal use of the power of datalog. Personally, I think in terms of semantic tuples and knowledge graphs (topic maps). Thanks in advance.
Not really I think?
It depends on what you’re looking for / want to get out of it?
I would suggest looking around in this forum, I’ve posted plenty of example queries for a lot of different use cases.
This could give you an idea how things work for Logseq.
Also you can check out the database schema:
Otherwise I’m not exactly sure of what information you are looking for?
pages and blocks all have an id and different attributes (see schema) with values.
So the whole db comes down to [id :block/attribute value] basically.
Here’s an example of what block information looks like:
{:block/uuid #uuid "64909c2c-2838-405f-8c02-4a0d53356518",
:block/left {:db/id 1366},
:block/refs [{:db/id 3} {:db/id 1295}],
:block/format :markdown,
:block/content
"A block that references ((64909017-c296-4d01-a999-9463bbb14cad)) but is tagged #canceled",
:db/id 1299,
:block/path-refs [{:db/id 3} {:db/id 1287}],
:block/parent {:db/id 1287},
:block/unordered true,
:block/page {:db/id 1287}}
{:block/uuid #uuid "64909c32-0ff5-410c-9e44-735930e8a484",
:block/journal? true,
:block/left {:db/id 1299},
:block/refs [{:db/id 1295}],
:block/journal-day 20230619,
:block/format :markdown,
:block/content
"A child block with ((64909017-c296-4d01-a999-9463bbb14cad))",
:db/id 1305,
:block/path-refs [{:db/id 3} {:db/id 1287} {:db/id 1295}],
:block/parent {:db/id 1299},
:block/unordered true,
:block/page {:db/id 1287}}
Thank you and sorry for the delay.
On the surface level, I simply want to figure out how to read the db. The documentation you mention - for me - needs to map to entries in my db, an example of which is this: (sorry if this is messy)
[“^15”, [864, “^18”, “~m1690334384851”, 536872602]],
[“^15”, [864, “^Z”, “pages/hypothesis_%5F___Belly Fat Has a Role to Play in Fighting Infections.md”, 536872563]],
[“^15”, [865, “^Q”, “ Unfortunately, obesity disrupts both the endocrine and immune functions of VAT, thereby promoting inflammation and tissue damage that can lead to diabetes or inflammatory bowel disease. As researchers continue to piece together the complex connections between immunity, gut microbes, and adipose tissues, including the large deposit of fat in the abdomen known as the omentum, they hope not only to gain an understanding of how fat and immunity are linked, but to also develop fat-targeted therapeutics that can moderate the consequences of infectious and inflammatory diseases. #[[Obesity]] #[[VAT]] #[[Inflammation]] #[[Diabetes]] #[[Inflammatory Bowel Disease]] #[[Immunity]] #[[Gut Microbes]] #[[Adipose Tissue]] #[[Omentum]]\nhid:: THrqVDcAEemqyssH561r3Q\nupdated:: 2019-02-23T00:16:43.187887+00:00\n:memo: Unfortunately, obesity disrupts both the endocrine and immune functions of VAT, thereby promoting inflammation and tissue damage that can lead to diabetes or inflammatory bowel disease. As researchers continue to piece together the complex connections between immunity, gut microbes, and adipose tissues, including the large deposit of fat in the abdomen known as the omentum, they hope not only to gain an understanding of how fat and immunity are linked, but to also develop fat-targeted therapeutics that can moderate the consequences of infectious and inflammatory diseases.”, 536872564]],
[“^15”, [865, “^O”, “^16”, 536872564]],
I don’t know if I correctly understand what you are saying.
However in case of Logseq the DB is simply about metadata and not the data.
The data is plain text stored in :block/content
. With this I refer to the data you see in the app, but also in the plain text files which are the backend Logseq builds on.
The database Logseq builds then contains information about the plain text data, for example which block is the parent of a block or does the block belong to a journal page. Is it a task, does it have a scheduled date?
(:block/parent
, :block/page
& :block/journal?
, :block/marker
and :block/scheduled
respectively)
So I believe there is a misalignment in what you want/are talking about and what Logseq offers.