How to store a multimap? #107
Unanswered
JamesHinshelwood
asked this question in
Q&A
Replies: 1 comment
-
It definitely depends on your data. Naively, you could just encode your array into a single KV, and update that using Alternatively, you could use a common prefix:
This probably is the way to go if there can be many values, and/or you want to only update, delete or scan some of the values. For example, a secondary index in a RDBMS is logically a multi map (indexed column -> Rows), and is implemented using such common prefix. To me, a MultiMap API kind of hides of what's actually going on at the storage level (I'm guessing redb uses something like the 1st approach), so I don't think it's really necessary. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thanks for the cool library :)
I'm currently evaluating redb and fjall. One of the features we use in redb is multimap tables which allow you to store a list of values with each key.
At a first glance, I don't see an equivalent in fjall. Are there any plans to implement this or other ways we could store the data that would fit with fjall's model?
Beta Was this translation helpful? Give feedback.
All reactions