moving database to its own file