About This Document
Page 1 of 1

About This Document

Purpose of This Document

This book is a hands-on introduction to Cloudscape. It presents some basic Cloudscape concepts and leads you through some exercises that will help you get started using the product quickly.

Cloudscape is an object-relational database management system, which is an inherently complex product. You cannot fully learn how to use all the features of Cloudscape by performing the tasks outlined in this book. This book can, however, give you exposure to what working with the product is like.

Audience

This book is for new Cloudscape users, who are usually Java programmers. You don't have to be a Java programmer to do this tutorial. Managers, system administrators, and anybody who wants to learn the Cloudscape technology will also benefit from doing the hands-on tasks in this tutorial.

However, you need at least a little Java exposure to do this tutorial (see below).

Tutorial Roadmap

Cloudscape is a Java application designed to be used and deployed by other Java applications. This tutorial does not teach you the Java programming language or go into great detail about fundamental Java concepts such as classes and objects or inheritance. You might want to do Sun's online Java tutorial(http://java.sun.com/docs/books/tutorial/index.html) before you do this one if you are not familiar with programming in Java.

Likewise, it is not an exhaustive study of SQL or relational databases, so you may want to consult third-party books after you finish this tutorial in order to learn more about those topics.

The lessons are designed to be done in order. However, you can do a certain amount of skipping around (you may have to go back and do one or more tasks). Every one should do lesson 2, at least, because you set up the tutorial environment in lesson 2. To do lesson 6, you must have done lesson 5 first.

Some lessons can be done as stand-alone examples.

You might want to do this tutorial online (using either the HTML or the PDF version) instead of looking at a printed version. Doing the tutorial online allows you to cut and paste queries, which you will be doing a lot.

  • Lesson 1, "Overview"

    Concepts: Cloudscape product basics: A brief overview of Cloudscape: what it does, how you use it. Relational databases, object-relational databases, and Java. It also introduces you to the fictional JBMSTours tour company and the JBMSTours application and sample database, toursDB, which serve as the foundation for this tutorial.

    Tasks: None.

  • Lesson 2, "Cloudscape Basics and the Sample Database"

    Concepts: Class path, system directory, JDBC driver, connections, shutdowns, the log.

    Tasks: Determine class path. Create working and system directories. Run an application that creates a database. Look at the information log. Create and build toursDB.

  • Lesson 3, "Using Cloudview"

    Concepts: Tables in a relational database, dictionary objects, SQL data types, SQL basics. Working with Cloudview.

    Tasks: View and create dictionary objects.

  • Lesson 4, "Objects and SQL"

    Introduces Java data types, data inspection. More SQL: selects, joins, WHERE clauses. Method invocation.

    Tasks: Inspect data and objects. Execute methods. Execute queries.

  • Lesson 5, "Cloudscape Database Applications"

    Concepts: Cloudscape deployment options, embedded vs. server. JDBC basics. Statements and PreparedStatements. ResultSets.

    Tasks: Run a basic application that uses a statement. Add SQLException checking and the shutdown command. Run BuildATour.

  • Lesson 6, "Working with SQL-J's Java Extensions"

    Concepts: SQL-J's Java extensions, database-side JDBC methods, method aliases.

    Tasks: Run CityTest, CityTest2. Execute database-side JDBC methods. Create and run method aliases.

  • Lesson 7, "Programming for Performance"

    Concepts: The performance benefits of prepared statements and stored prepared statements and indexes.

    Tasks: Use ij's prepared statement feature. Run a Java application comparing the performance of statements and prepared statements. Create a stored prepared statement. Analyze index benefits.

  • Lesson 8, "Virtual Tables, External Data, and Aggregates"

    Concepts: Working with virtual tables within SQL-J statements, importing and exporting data, aggregates (set functions).

    Tasks: Use virtual tables within statements. Create a view. Import data. Work with aggregates. Run GenerateReport.

  • Lesson 9, "Working with Connections and Transactions"

    Concepts: Transactions and locking. Multiple connections to a single database and to more than one database.

    Tasks: Open two named connections in ij. Try to work with the same tables from both connections. Test the locking schema of your product. Run ArchiveData.

  • Lesson 10, "Storing Objects and Classes"

    Concepts: Storing large data such as image and sounds. Storing objects and working with subclasses. Storing classes in the database.

  • Lesson 11, "Servers, Servlets, and Applets"

    Concepts: Servers, servlets and client applets.

  • Appendix A, "Troubleshooting Common Problems"

    Quick how-tos for typical roadblocks.

  • "Cloudscape Glossary"

    Cloudscape terminology.

  • "Index"

    Index to this book.

Typographical Conventions

This manual uses some typographical conventions to highlight elements of the SQL-J language, operating system commands, the Java programming language, and the like.

Typeface

Usage

Examples

Italic

New terms

defined by keys

File and directory names

C:\cloudscape

Java class names, objects, and methods

PreparedStatement

Cloudscape dictionary objects

The Hotels table

In syntax, items that you do not type exactly as they appear, but replace with the appropriate name

CREATE TABLE TableName

green, bold, fixed-width

Syntax

CREATE TABLE tableName

bold, fixed-width

blue, bold, fixed-width

Syntax

CREATE TABLE tableName

SQL-J examples

SELECT hotel.getPrice()

Java application examples

ResultSet rs =
    ps.executeQuery()

roman, fixed-width

Comments within examples

-- This line ignored

ALL CAPS

SQL-J keywords -(commands)

You can use a CREATE TABLE statement