Database queries update