Hi Saloni,
DBHandle class is used to execute SELECT statements directly against the Sourcing database. We generally do not recommend using the DBHandle class because it requires using very specific coding protocols to ensure proper transaction management.
Please note, DBHandle class cannot be used to execute a Query Definition. Instead IapiQuery classes I had listed earlier should be used.
Hope this helps.
Regards,
Vikram