We introduce the EVMDB, a first step towards a database on the EVM (Ethereum Virtual Machine). It is a first functional prototype, version 0.0.1, use with caution!
If you don’t care about explanations or technical details, take a look at our demo Dapp and create your own databases! The demo is deployed on our test blockchain, and the data there is deleted daily.
The GitHub repository contains an example for developers of a smart contract utilizing the EVMDB.
Storing data on Etherem is not recommended. It both bloats the blockchain and is expensive (though in the long term may be cheaper).
However, storing data on Ethereum is sometimes a necessity. Ethereum is a platform for blockchain apps (smart contracts), and some smart contracts just have to store data. Even when Swarm, IPFS or any other distributed storage solution reach a production state, some smart contracts would still need to store data in an immutable way that only a blockchain can offer.
In its first pre-alpha prototype, the EVMDB is as a simple as databases go. It allows creation of one database table, with one primary key (duplication allowed).
To be more precise, the EVMDB offers the following:
- creation and management of as many databases as you desire;
- each database consists of one table, with an arbitrary number of fields;
- each database contains one primary key (duplicates allowed);
- each database supports insert, update, erase and search methods, where there is no limitation on database size.
The data is stored in a simple Solidity structure:
The number of columns is determined when the user creates the database.
This basic EVMDB prototype leaves much space for growth. We would be happy for proposals, contributions, collaborations, bugs and any feedback you may think of. Please use it with caution, as it has a long way to go before it becomes a perfect production DB for the EVM.