building db from multiple files