The pros and cons of different data formats: key-values vs tuples

107 阅读1分钟

The pros and cons of different data formats: key-values vs tuples

How data is formatted under the hood

Go to the profile of Hieu Nguyen (Jack)
Hieu Nguyen (Jack)BlockedUnblockFollowFollowing
Photo by Franki Chamaki on Unsplash

Working on Vasern (a client database for React Native) has given me an opportunity to try and test different data formats which include key-value, column-oriented, document, and tuples. Each format was designed to suit different scenarios.

The criteria of these tests focus on performance, the ability to lookup values, and space efficiency. Besides, it is not required to have on-disk sorted keys and indices. They will be loaded into memory for fast lookup.

In this post, I will recap the pros and cons of the two common formats: key-values and tuples format. Also, I’ll introduce tagged key-values, an extension of key-values with index lookup, which benefits from the tuples format.

Key-Value Store