I am a newbie to Bluemix IOT and Node Red, but as I studied through the example and build my own IOT application to store data with bluemix IOT service -> node-red -> database. Currently it is working as expected but sometime Node-Red behaviors weirdly and I have to rewire everything again in Node-Red. Not sure what is the problem but just wondering is there any alternative available to receive data from IOT service and insert in database? like API or some other service?
If you use cloudant, check the Extensions tab in the Watson IoT Platform. You can configure the platform to push the data directly to cloudant in which case you don't have to code anything.
It is a publish-subscribe model - so any application could subscribe and then put the data to a database. Easiest if you pick one with a Watson IoT library but even then you are not limited to that as you can use MQTT libraries directly.