4

I am creating blockchain application in django with 6 main entities .By entities I mean to say these 6 entities will replicate data or you can say consensus mechanism will evolve around these entities . Now my question is how can I integrate ethereum in my django app.

I only need ethereum for distributed database storage and my consensus mechanism or proof of work is entirely different as compared to ethereum. Should I use ethereum in my project or completely create it from scratch in sqlite? I am really confused how to built database for my blockchain application.

6

It's very difficult to answer with any precision based on a general description of a modest data model with 6 entities.

Some comments to hopefully help clarify the big topics.

Ethereum consensus will ensure the correct execution of a Smart Contract. Within that contract, you can ensure the mission-critical data is dependable. The storage and processing costs are high relative to a relational database because this data will be replicated across all validating nodes; it's immensely redundant.

In my opinion the on-chain storage is suitable for a minimalist storage that must be correct to protect the integrity of the system. A common approach is to record keys and critical information, e.g. users, balances, transaction history, key identifiers, and document hashes.

Clients can use the hashes to validate descriptive information and details stored elsewhere. Example, JSON stored elsewhere. A contract points to a location where the details can be discovered and provides a hash of the data stored there.

In my opinion contracts should enforce referential integrity if the app requires it. That implies primary and foreign keys on chain and some strict rules about permissible updates. Example of how to do referential integrity here: https://medium.com/@robhitchens/enforcing-referential-integrity-in-ethereum-smart-contracts-a9ab1427ff42.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.