developed for approbation local database query