Working with SQL-J's Java Extensions
Page 2 of 7

What's the J in SQL-J? What's ij?

As you know, SQL-J is the name of the Cloudscape's Java-enabled dialect and is pronounced "ess-queue-ell-jay." (The J stands for Java.)

The SQL standard was designed for retrieving standard data types out of a database and inserting or modifying standard data types stored in a database. With SQL-J, you can integrate much of your Java syntax. As you saw in Lesson 4, "Objects and SQL", you can store objects in a Cloudscape database and execute methods that belong to those objects. But Cloudscape can likewise access all Java classes that are available to the JVM in which it is running. For example, you can execute static methods of any class available to the JVM; if it is appropriate, you can also initialize an object of any available class and execute methods off it.

This lesson illustrates both possibilities: executing methods off objects stored in the database, and executing methods from a class.

ij (pronounced "eye-jay") is the name of a tool provided by Cloudscape for running SQL-J statements entered interactively or from a script against a Cloudscape database. As you know, Cloudview provides an SQL window for executing SQL-J statements, among its many other features. ij's sole purpose is to execute SQL-J statements, both singly and in batches. It provides more sophisticated control over the execution environment, and it also provides some commands that allow you to execute JDBC-level commands. For example, as you know, connecting to a database is done with a JDBC call. ij provides a command for connecting to a database.

The "i" in ij stands for interactive; the "j" stands for JDBC.

You can enter commands interactively or in scripts. In this lesson, you will execute the commands interactively.