Defining the "SuperStore" Connection

Top  Previous  Next

The database "SuperStore" is ready. We will now define a Relational Database Connection to use it for all our database operations.

1.Press "CTRL + F7" to open Common Definitions Page.
2.Locate the element "mor > RelDB > RelDBConnection" on the library explorer and drag & drop it into the page.
3.Open the property editor (F4) and define the properties existing on the "Other" tab as follows

 
For Apache Derby

Name:

SuperStore

JDBC Driver:

org.apache.derby.jdbc.EmbeddedDriver

Database URL:

jdbc:derby:%vof(PRJS_PATH)/samples/Derby/SuperStore

Note that we've chosen Derby's embedded driver so that the database "samples/Derby/SuperStore" which is provided in the MMAS package can be directly accessed without starting any additional database service. So don't be confused.

 
For MySQL

Name:

SuperStore

JDBC Driver:

org.gjt.mm.mysql.Driver

Database URL:

jdbc:mysql://localhost:3306/SuperStore

The MySQL JDBC Driver

MySQL JDBC driver is not included in the MMAS package. Please follow the instructions given in the previous page to prepare it for use.

 
For MS SQL Server

Name:

SuperStore

JDBC Driver:

net.sourceforge.jtds.jdbc.Driver

Database URL:

jdbc:jtds:sqlserver://localhost:1433/SuperStore

 
For Oracle

Name:

SuperStore

JDBC Driver:

oracle.jdbc.driver.OracleDriver

Database URL:

jdbc:oracle:thin:@<hostname>:1521:<SID>

You should change the <hostname> and <SID> according to your Oracle installation.

Example:

jdbc:oracle:thin:@localhost:1521:ORATEST

 

The Oracle JDBC Driver

Oracle JDBC driver is not included in the MMAS package. Therefore you should place the "classes?.jar" or "odbc?.jar" file that contains the Oracle JDBC Driver to directory "{INSTALLDIR}\lib\cpn\mor\RelDB\drivers".

If you have oracle installation the "classes?.jar" file is usually located under "{ORACLE_INSTALL_DIR}\product\10.2.0\db_1\jdbc\lib\" directory.

Note for all databases except Apache Derby:

You should change the "username" and the "password" properties with a username and a password that are valid in your database. No username and password is required for Apache Derby.