
65Using Non-GUI Java Libraries in MATLAB
®
2.2.3 Connecting to a Database
In order to connect to the database, we need to know its connection string. This has a slightly
different version for each database type. The general format is ‘jdbc:<dbType>:<dbName>
<extraProperties>’. Refer to the online documentation
48
and the database’s documentation for
details about the database’s specic connection string.
Sample connection strings are:
Oracle MySQL: ‘jdbc:mysql://localhost:3306/testDB’
◾
Oracle Database: ‘jdbc:oracle:thin:@localhost:1521:xe’ ◾
Apache Derby: ‘jdbc:derby:sampleDB;create=true;’ ◾
Microsoft Access: ‘jdbc:odbc:Driver={Microsoft ...