fix the NetworkOnMainThreadException& db bug fix

create server side test file to validate the interaction between app
and database