build offline DB