client db functions