For example, if my smart contract holds very basic detail of a patient and I want to access his / her medical report stored in a database (mongoDB) .

  • Do you want your contract to access the database and get data to use inside its business logic? Nov 24, 2017 at 11:04
  • Yes @ Luiz Soares Nov 24, 2017 at 11:36

1 Answer 1


To do that, you are going to need a service like Oraclizeit. You may find a rough explanation about it here: How Oraclize and API call works

And if you use Oraclizeit and it returns to your contract a big amount of data, you may explode your gas amount and won´t be able to execute your function. You should take that in count.

You can´t make a direct connection between your contract and mongoDB. Contracts must be atomic.


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.