random string genration, initial db insertion