Create a Database using Tangle and IPFS for beginners

The full article was originally published by Yehia Tarek on Medium. Read the full article here.

In this tutorial, I am going to create a Database system for decentralized applications to do that I will use the MAM communication protocol and for storage, I will use IPFS.

If you are not familiar with MAM its simply create a Merkel Tree to save hashes. The hash of the root is capable of accessing all other hashes using side-key in our case as we use Restricted MAM. So IPFS will upload files then the returned hashed will be saved on MAM.

How the database will work

For sure our database will be in JSON format.

1- Upload JSON data to the IPFS and get the returned hash to access the files later.

2- Send the IPFS using MAM restricted.

To get Data:-

1-Fetch data using mama restricted and get the uploaded IPFS hash.

2- Fetch the hash of the IPFS to get the uploaded JSON data.

Let’s Start Coding

The IPFS code to upload data. Check function on the documentation here.

Read the full Article

The full article was originally published by Yehia Tarek on Medium, where people are continuing the conversation by highlighting and responding to this story.

You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More



- 45%