3 ms·
One major "weakness" of rdbms is that all internals are black blocks. You can do "SELECT * FROM table" but, weirdly, can't "SELECT * FROM A_Index". NOTHING i
by mamcx 6y ago
One major "weakness" of rdbms is that all internals are black blocks.
You can do "SELECT * FROM table"
but, weirdly, can't "SELECT * FROM A_Index".
NOTHING in the relational model requiere this limitation. Is purely accidental.
BTW, I'm building a relational lang and also, very long time ago, try to port lucene to Delphi.
So, what you need to support FTS and other kind of structures is... support them.
For interfacing, you can consider ANY key-value as a relation of exactly 2 columns. Any scalar, a relation of 1 column, 1 row. You can put relations in relations, so you can do recursive data.
Maybe the hardest is to have not only storage of btrees but also other stuff. I think you can fit FTS data in btrees anyway, but probably tweak it.
When building the relational lang I stumble upon how support a n-column data inside a btree. You can split:
pk=key
values=col1 col2 col3
or as I later "get", just store the full row and change the functions that do the comparing. In rust start with:
pub struct Tree {
index: usize, <--signal which column as key
data: BTreeSet<Vec<...>>, <-- Store all row
}
- adsjhdashkj 6y agoHow funny - i don't know SQL that well, and at work recently i was lamenting that i couldn't find a way to just query an index directly. Funny how self learning can sometimes mirror what you end up asking in work - even though they're not related at all.
- branko_d 6y ago> but, weirdly, can't "SELECT * FROM A_Index". In all honesty, most DBMSes have some sort of "hinting" mechanism that accomplishes roughly the same. It's a cludge, though, usually in the form of specially formatted comments or some sort of syntactic "piggy-back" on top of the regular SQL, or even outside SQL (e.g. SQL Server plan guides). I'd love to be able to specify the physical access path with more "first-class" syntax, and mix-and-match with logical access more easily.