put the result into database