Adding delete and deleteDb functions to delete records