Added new db result parsing code

Added new db result parsing code. Need to be tested.

This is not a elegant solution. If possible use database.py in the VM.