I have created a DatabaseSystem thing, but I don't know how to use the QueryHandler to query the Oracle database
An example and javadoc will help.
You create a new service and select SQL Query from the drop down at the top of the service definition. You then simply write a SQL query and a dataset will be returned as an InfoTable type.
The answer you have give is for composer.
But I am writing it in java using the ThingWorx SDK 6.5.
Still have to create service as mentioned by Adam Ressler and invoke it from your SDK.
Retrieving data ...