Adding DB configuration, and fixing simultaneous insert bug.

jira : QUES-3