What Are the Cloudscape Tools and Utilities?
Page 4 of 5

JDBC Basics

Most of the Cloudscape tools are JDBC applications. A JDBC application is one that uses the classes in the java.sql package to interact with a DBMS. When you work with JDBC applications, you need to know about the following two JDBC concepts:

Drivers

Before a JDBC application interacts with a database, it must cause the appropriate JDBC driver to be loaded in the Java session. Cloudscape provides three JDBC drivers for use with the Cloudscape database engine. When you use the Cloudscape tools that are JDBC applications, you will need to know which driver to load.

  • COM.cloudscape.core.JDBCDriver

    For embedded environments, when Cloudscape runs in the same JVM as the application

  • COM.cloudscape.core.WebLogicDriver

    For client/server environments in which Cloudscape runs in the Cloudconnector framework and applications connect via the network

  • COM.cloudscape.core.RmiJdbcDriver

    For client/server environments in which Cloudscape runs in the RmiJdbc Server framework and applications connect via the network

ij is a JDBC-neutral application, which means that you can use it to connect to any database that supplies a JDBC driver. For those databases, you would need to load the supplied JDBC driver.

Cloudscape also provides an ODBC driver. Look for information on Cloudscape's Web site.

Database Connection URLs

A JDBC URL provides a way of identifying a database so that the appropriate driver recognizes it and connects to it. In the Cloudscape documents, a JDBC URL is referred to as a database connection URL.

After the driver is loaded, an application must specify the correct database connection URL to connect to a specific database. The Cloudscape database connection URL allows you to accomplish more tasks than simply connecting. For more information about the Cloudscape database connection URLs, see the Cloudscape Developer's Guide.

A JDBC URL always starts with jdbc:. After that, the format for the database connection URL depends on the JDBC driver.

For the Cloudscape-provided drivers listed above, here are the formats for the database connection URLs for connecting to an existing database:

Here are explanations for the italicized items, which stand for something the user fills in:

  • databaseName

    The name of the database you want to connect to

  • CloudscapeURLAttributes

    One or more of the supported attributes of the database connection URL, such as ;locale=ll_CC or ;create=true. For more information, see the Cloudscape Developer's Guide.

  • hostname

    The name of the machine on which the server framework is running

  • portnumber

    The port number of the server framework

    About Protocols

    Officially, the portion of the database connection URL called the protocol is jdbc:, just as http:// is a protocol in Web URLs. However, the second portion of the database connection URL (everything between jdbc: and databaseName), which is called the subprotocol, is informally considered part of the protocol. Later in this book you may see references to protocol. Consider protocol to be everything that comes before databaseName.

For complete information about the database connection URL, see the Cloudscape Developer's Guide.