The pros and cons of different data formats: key-values vs tuples
How data is formatted under the hood
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.
Introduce Vasern - a React Native database
Vasern’s goal to be a fast data storage for React Native, be able to sync to remote servers and available for everyone.
I created Vasern for the following reasons:
- To provide simple APIs, allow to focus more on building the application instead of worrying about setup and optimize the database
- Be a fast, lightweight and open source data storage for React Native
- Everyone can install, run and sync data to their Vasern servers with minimal effort (under development)
Today, I am very excited to announce Vasern beta release.