Best database type to store data that will be used with a blockchain

0 votes
For a project, I'm using Hyperledger Composer Fabric to create a blockchain for an integrated healthcare system for integrity and fast access purposes. I don't want to store the actual healthcare records on the blockchain because they'll be large. Instead, I was thinking of storing a hash of the record on the blockchain and storing the records in a database. What kind of database would be best? I've used relational databases and SQL before only. Could this suit? I've seen some people say to store the location of the data on the blockchain too, how would you do this? This is only a small project, so I'm looking for simple solutions rather than some I see which are for real, enterprise systems.
Apr 5, 2022 in Blockchain by Rahul
• 9,680 points
1,129 views

1 answer to this question.

0 votes
Storing just the hash on the blockchain is fine. Just use the Composer Rest Server functionality to expose a RESTful endpoint to add and read the data. You can call this endpoint from the data layer of your application.

In terms of the database, If you know SQL use a SQL database. The kind depends on the development environment you are using. I am a Microsoft fan but MSSQL Server costs much more than POSTGres or MySQL. If the database is not big, look at the AWS RDS cloud databases.

You can store the location of the data on the blockchain. Just define an asset in the Composer CTO field and give it a String property with the file location. There are code examples in the Playground for reading and writing to the autogenerated Asset Registry. You will also get a RESTful endpoint to read and write this data.
answered Apr 7, 2022 by Aditya
• 7,680 points

Related Questions In Blockchain

0 votes
2 answers
0 votes
1 answer

Can a blockchain be used to verify or store a document on the blockchain?

Bitcoin is decentralized payment syatem. It was ...READ MORE

answered May 10, 2018 in Blockchain by Johnathon
• 9,090 points
795 views
+1 vote
1 answer

Is it possible to store blockchain in a sql or no-sql database?

Currently, following are the options to store ...READ MORE

answered Apr 21, 2018 in Blockchain by Perry
• 17,100 points

edited Aug 9, 2018 by Omkar 1,131 views
0 votes
1 answer

What encoding or data type can be used to get alphanumeric string in elixir?

Integers in Elixir are arbitrary precision integers, ...READ MORE

answered Aug 31, 2018 in Blockchain by digger
• 26,740 points
795 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
+1 vote
1 answer

I am unable to change port of composer-rest-server. Please help!

Use full format for running a business ...READ MORE

answered Mar 27, 2018 in Blockchain by Christine
• 15,790 points
1,124 views
+1 vote
1 answer
0 votes
1 answer

On-Chain NFT: How to store a pixel image on the ethereum blockchain?

The images are usually not stored in ...READ MORE

answered Feb 24, 2022 in Blockchain by Aditya
• 7,680 points
1,108 views
+1 vote
1 answer

Is it possible to store images on the Ethereum blockchain?

This is possible for your information but, ...READ MORE

answered Feb 24, 2022 in Blockchain by Aditya
• 7,680 points
1,870 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP