I want to implement the blockchain in a PHP licensing system that I'm working on. For now I didn't decided if to store the data block inside a database or in a file. What's the best approach to accomplish this task? I'm unsure on how to procede because I don't have idea on how to structure the database design, so for now I'm using the file solution, but it will be slow if a large amount of data are stored.

  • 1
    Think about the experience of the users of the blockchain. Do you want them to setup a database? Do they need to setup PHP? Will their private information be exposed to other nodes on the blockchain? – bitsoflogic Nov 9 at 17:03
  • 1
    As an aside, databases typically store their data in files so you can reboot and still have your data present, so I don't see that being a bottleneck. To get going, I'd recommend picking the easiest solution that'll solve your initial vision, then optimize areas for whatever features you need. – bitsoflogic Nov 9 at 17:05
  • @bitsoflogic The final client will run the app as a standalone service, I've embedded php inside the electron container app and by using inno setup I'm including also the VC's libraries needed. So php will not be a problem for the final user. Also for the database I want to create a central database in a server that will contain the blocks. My idea is to release an initial trial license or a full product version license that are stored inside the blockchain,that will be used to verify what kind of license was buied and if the license code is correct. – user9741470 Nov 10 at 10:22
  • 1
    Blockchains are distributed databases. They don't have a central database, although software that uses a blockchain can also use a central database. Since implementing them requires a strong understanding of cryptography, I'd recommend you fork an existing blockchain and use the language they're implementing. – bitsoflogic 2 days ago

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.