Updated relationsdb with query