SQLite Forum

CBOR Support & challenging DB design problem for keeping history with big schema changes
OK, I'll bite another time. No one said I was a reasonable man :)

You're going a bit all over the place Vadim, and most of what you write  
is not specific to SQLite, so a bit Off Topic here IMHO.  But in any case,  
here is maybe a bit more information.

Regarding trees in SQLite, you need to look into [CTEs][CTE], which allow to write recursive queries.  
That's how one deals with filesystem-like hierarchies.

Regarding indexing CBOR, well, extensions can create [*shaddow tables*][SHA],  
which store custom preprocessed data used by custom MATCH operators.  
That's how the various FTS implementations do it I believe, I'm not  
very versed in those, I never delved into their code. But this is definitely  
an advanced subject in SQLite, which very few people have experience with I believe.

I doubt this will help you much, sorry. Good luck. Over and out. --DD

[CTE]: https://www.sqlite.org/lang_with.html
[SHA]: https://www.sqlite.org/vtab.html#xshadowname