fixed-length-string vs unsigned integer table with compression

6 views
Skip to first unread message

Peng Yu

unread,
Aug 17, 2020, 1:32:44 PM8/17/20
to zodb
I'd like to storage a table with two fields, namely, a fixed-length-string (say of length 3) field and an unsigned integer field.

The uintegers corresponding to a given length-three-string are always unique. And computing the diff between ordered uintegers then saving the diffs as a varuint will significantly reduce storage size.


The search will always be by a length-three-string for exact match to get all the corresponding ordered uintegers.

However, the insertion will be by the uinteger. That is, for insertion, the input will be a uinteger and the corresponding length-three-strings.

For deletion of a given uinteger, all the appearances of the uinteger in the database will be deleted.

In classical B-tree, the search and insert/delete correspond to the same fields. But in this case, the search and the insert/delete correspond to two different fields. So I am not what is the best data structure. Could anybody let me whether zodb is appropriate for this application? If not, what data structure is the most appropriate for this application? Thanks.
Reply all
Reply to author
Forward
0 new messages