// load the the driver class
Class.forName(M_DBDRIVER_CLASS);
String dbUrl = "jdbc:mysql://" + hostName + "/" + dbName;
// create a database connection
IDBConnection conn = new DBConnection(dbUrl, userName, password, "MySQL");
// create a model maker with the given connection parameters
ModelMaker maker = ModelFactory.createModelRDBMaker(conn);
ModelRDB model = (ModelRDB) maker.openModel(modelName);