dbobject implementing destroy function