Re: Doubt in representation of Relational Data on Blockchain


Brett T Logan <brett.t.logan@...>
 

Generally you implement some other standard. In particular the global supply chain standard is GS1. Items have what is called a GTIN identifying their category specific to your company and serial numbers. GS1 likewise has an event called transformation. Your transformation event removes the bean from the chain and converts it to a packet. Just as converting a packet into case and a case into a pallet is an aggregation event. And then you have an aggregation event that does the reverse, converts the pallet back into cases.
 
The GS1 data standard also has a field for recording what items are part of these aggregations. So you can see that a pallet contains these cases with SN and GTIN's. Then when someone breaks the pallet down, and scans the cases, you have systems for recording this in the blockchain and then you can verify whether all of the cases that went into the pallet still existed when the pallet was broken down, and then packets in the case.
 
All of this data, its transformations, aggregations, and parent-child relationships are represented in simple standards like JSON and XML in GS1.
 
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890
 
 
 

----- Original message -----
From: "Ameya Sinha via Lists.Hyperledger.Org" <t-amsi=microsoft.com@...>
Sent by: fabric@...
To: David Enyeart <enyeart@...>
Cc: fabric@...
Subject: Re: [EXTERNAL] Re: [Hyperledger Fabric] Doubt in representation of Relational Data on Blockchain
Date: Mon, Mar 23, 2020 10:48 AM
 

Hi David,

 

Thanks for the reply, it helped clear one aspect of my doubt. I have one more thing to ask now though.

 

So I’ve been reading about how Blockchain solutions are implemented in Supply Chain, and I was thinking that they would represent the data in a relational way. As a lot of the solutions I’ve read use Hyperledger Fabric do these solutions represent data in key-value pair?

 

How do they deal with combination of items then? As in suppose, there’s a coffee tracking system which tracks the coffee beans, when the beans combine to form a packet how does that representation play in our database?

 

Thanks for your help,

Ameya Sinha.

 

From: David Enyeart <enyeart@...>
Sent: Monday, March 23, 2020 6:10 PM
To: Ameya Sinha <t-amsi@...>
Cc: fabric@...
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Doubt in representation of Relational Data on Blockchain

 

The current Fabric transaction manager supports key/value data only. If you want semi-structured data, you can utilize JSON as the value and leverage CouchDB state database for JSON queries.

There is no support for relational data models (technically it could be added in the future, but there is no current plan to do so).

Many people choose to utilize an off-chain database for fit-for-purpose reporting/queries, see suggestions in doc:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#use-best-practices-for-queries-and-indexes


Dave Enyeart

"Ameya Sinha via Lists.Hyperledger.Org" ---03/23/2020 12:58:04 AM---Hi All, I was wondering how would be represent data that is intrinsically relational i

From: "Ameya Sinha via Lists.Hyperledger.Org" <t-amsi=microsoft.com@...>
To: "fabric@..." <fabric@...>
Cc: fabric@...
Date: 03/23/2020 12:58 AM
Subject: [EXTERNAL] [Hyperledger Fabric] Doubt in representation of Relational Data on Blockchain
Sent by: fabric@...





Hi All,

I was wondering how would be represent data that is intrinsically relational in nature on a Blockchain like Hyperledger Fabric. Do we normalize the data and the represent each part of it as an asset on Hyperledger? How would joins and queries work in that case?

Thanks,
Ameya Sinha.



 

Join fabric@lists.hyperledger.org to automatically receive all group messages.