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) .
Asked
Active
Viewed 63 times
0
-
Do you want your contract to access the database and get data to use inside its business logic? – Luiz Soares Nov 24 '17 at 11:04
-
Yes @ Luiz Soares – Noushad Mohamed Nov 24 '17 at 11:36
1 Answers
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.
Luiz Soares
- 1,064
- 6
- 14