code: private void createOrOpenBDBDbs() throws Exception {
  		// configuration for the mapping dbs
  		DatabaseConfig dbConfig = new DatabaseConfig();
  		dbConfig.setAllowCreate(true); // db will be created if it does not exist
  		dbConfig.setReadOnly(readOnly);
  		dbConfig.setTransactional(transactional);
  		// create/open mapping dbs using config
  		iidToIdDB = dbEnv.openDatabase(null, "idToName", dbConfig);
  
  		// if countSizeOnLoad is true, the id-name mappings are counted and the loadCounter is initialized
  		if (countSizeOnLoad) {
  			System.out.println(new Date() + " counting index size started ");
  			int idToNameMappings = (int) iidToIdDB.count();
  			loadCounter = Math.min(idToNameMappings, maxNumVectors);
  			System.out.println(new Date() + " counting index size ended ");
  			System.out.println("Index size: " + loadCounter);
  		}
  
  		idToIidDB = dbEnv.openDatabase(null, "nameToId", dbConfig);
  
  		if (useGeolocation) {// create/open geolocation db using config
  			iidToGeolocationDB = dbEnv.openDatabase(null, "idToGeolocation", dbConfig);
  		}
  
  		if (useMetaData) {
  			StoreConfig storeConfig = new StoreConfig(); // configuration of the entity store
  			storeConfig.setAllowCreate(true); // store will be created if it does not exist
  			storeConfig.setReadOnly(readOnly);
  			storeConfig.setTransactional(transactional);
  			iidToMetadataDB = new EntityStore(dbEnv, "idToMetadata", storeConfig);
  			// int nameToMetadataMappings = (int) nameToMetadataBDB.getPrimaryIndex(String.class,
  			// MediaFeedData.class).count(); // counting the size of an EntityStore
  		}
  	}
docs: This method creates and/or opens the BDB databases with the appropriate parameters.
  
  @throws Exception