Improve client db

this adds the functionality mentioned in #7 
I can't validate the type because the string could be of type unicode or str. The other types I can verify.