core/src/main/java/com/orientechnologies/orient/core/db/OrientDB.java
public boolean createIfNotExists(String database, ODatabaseType type, OrientDBConfig config) {
    if (!this.internal.exists(database, serverUser, serverPassword)) {
      this.internal.create(database, serverUser, serverPassword, type, config);
      return true;
    }
    return false;
  }
public boolean createIfNotExists(String database, ODatabaseType type, OrientDBConfig config) {
    if (!this.internal.exists(database, serverUser, serverPassword)) {
      this.internal.create(database, serverUser, serverPassword, type, config);
      return true;
    }
    return false;
  }
public boolean createIfNotExists ( String database , ODatabaseType type , OrientDBConfig config ) { if ( ! this . internal . exists ( database , serverUser , serverPassword ) ) { this . internal . create ( database , serverUser , serverPassword , type , config ) ; return true ; } return false ; }
Create a new database if not exists

@param database database name
@param type     can be plocal or memory
@param config   custom configuration for current database

@return true if the database has been created, false if already exists
Create a new database if not exists