load the database from directory