How to store a multimap? #107
Replies: 2 comments 1 reply
-
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.
-
I have related question. Do all partitions share the keys? I mean, can I immitate columnar on that principle? I have one key(timestamp) and a lot of columns, Actually, i try to find some database whitch would be simple embedd clickhouse. I have some RAM storage like
|
Beta Was this translation helpful? Give feedback.
-
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