general sql getter and deleter functions incooporated with the controller