Connect DB and read file