Working GHT in the database