base DB Query abstract