data base connection and json