db: fixed and added the update and delete queries supports