- Mjolnir is chained data database inspired by block chain chaining block
Conceptual :
- we using sha256 to hash data.
- every box data is chained, will decrease fraud posibility.
- i think is suitable for storing medical records, or ownership records or other data.
- data is a string, you can store json string to it
How To install
using homebrew (for simple installation step) :
- add tap
brew tap alfiankan/mjolnir
- then install
brew install mjolnir
How to build from source
- make sure you have rustup
- clone this repository on master branch
- then build
cargo build — all-targets — release
- movemjolnir binary to bin directory
sudo cp target/release/mjolnir /usr/local/bin/
Terms
- Box : Box is imaginary block or Box conatins prev hash, data, and hash :
- Genesis : genesis is process to make first Box with singularity hash, singularity hash is just random hash generated
- Chain : is relationship between box using hash :
- record : is all data box with chain relationship from one genesis :
How to use
- make sure mjolnir installed
- create text file for data store
- set store file location by setting up environment variable
export MJL_DATA_STORE=/path/to/mjfile/database.mj
- open mjolnir cli by typing `mjolnir` in terminal
MJL (Mjolnir query language)
Genesis :
- to make new record you need genesis to do that type
gen
- then you get the key chain, save it
records :
- mjolnir support multiple records, to make another record just run genesis, to list all records type
records
Insert :
- to insert box (next box) you can do
insert to <record key_chain> '<string data>'
Select :
- to get last record data do
select <record key_chain>
Select All :
- to get all box with chains record data do select <record key_chain> all
Appendix :
- repository : https://github.com/alfiankan/mjolnir
- demo video : https://youtu.be/w3XV_3DDss4