Table of Contents
Purpose of This Document
Audience
Tutorial Roadmap
Typographical Conventions
Technology Overview
What Is a DBMS?
Relational Database Management Systems
The SQL Standard
Transaction Processing and More
Proprietary Programming Language
Object-Relational DBMSs
The Java in Cloudscape
Non-Proprietary Programming Language
Run Methods Anywhere
Deploy Cloudscape Anywhere
Synchronization: Keeping Databases in Touch
The JBMSTours Scenario
The Company
The Application: The JBMSTours Package
Application Overview
The Application Queries the Data
The Application Stores Tour Data
The Application May Use Synchronization
One "Temporary" Table: FlightObjects
What You Will Be Doing with JBMSTours
Or Look on Your Own . . .
In a Client/Server Environment
Getting Acquainted with Class Path
Setting the Variable vs. Using the Runtime Option
How to Specify the Location of Files in the Class Path
The CLOUDSCAPE_INSTALL Environment Variable
What to Include in the Class Path for this Tutorial
Path Separators
Determine Your Class Path
Getting to Know Your System Directory
Create a System Directory for the Tutorial
Create a Home or Working Directory for the Tutorial
Make Sure Your PATH Variable Is Correct
Customize Your setclasspath Script
Running the Script
Directory Review
Getting an Application to Start Up Cloudscape
Test the Class Path Script
Creating, Compiling, and Running HelloWorld
Experiment: Try to Get an Error
Working with Connections
Get a Connection: Create a Database
Shut Down Cloudscape
Examine the System Directory and Information Log
Building the Database toursDB
Run JBMSTours.CreateToursDB
Tables in a Relational Database
Working with Cloudview to Create Dictionary Objects
Start Cloudview in the Home Directory
Connect to HelloWorldDB
Create the Sayings Table
Create the Responses Table
Define a Primary Key
Define a Foreign Key
Enter Data Graphically and with an SQL Statement
Open and Execute an SQL Batch File
Browse the Data in the Sayings Table
Examining Tables and Data in toursDB with Cloudview
Open a Connection to toursDB
Browse the Definition of the AIRLINES Table
Browse the Data in the COUNTRIES Table
Disconnect, Exit (and Shut Down Cloudscape)
Using Cloudview to Work with Stored Objects
Examine the Cities Table Definition
Browse the Contents of the Cities Table
Browse a City Object
Executing Methods from the Object Inspector
Execute an Object's Methods
View the Superclass's Methods.
Introducing . . . SQL!
Queries
Select Data from the Sayings Table
WHERE Clauses
Execute an SQL-J Statement with a WHERE Clause
Joins
Execute Joins
Execute Methods in SQL-J Statements
Querying toursDB
Execute Queries in toursDB
Use a WHERE Clause
Use More Complex Search Conditions
Join the Countries and Cities Tables
Disconnect, Exit (and Shut Down Cloudscape)
Cloudscape Deployment Options
What Does Embedded Mean?
Application Servers and Embedded Cloudscape
Cloudscape's Server Frameworks
A Cloudscape Synchronization System
Working with the JDBC Interface
Applications and Queries: Statements and ResultSets
Run and Examine HelloWorldApp.java
Handling SQLExceptions
Change the logSeverityLevel Property
Compile, Run, and Examine HelloWorldExc
Closing Statements and ResultSets
Running the BuildATour Application
Run JBMSTours.BuildATour
What's the J in SQL-J? What's ij?
Meet the City Class
Examine and Execute CityTest
Work with Stored City Objects
Start ij
Connect to toursDB
Execute SQL-J Statements Referencing Stored City Objects
Access a Field in an SQL-J Statement
Execute More Complex SQL-J Statements
Database-Side JDBC Methods
Execute Methods in a Program as Application-Side Methods
Execute Methods in Statements as Database-Side Methods
VALUES Expression
Use the VALUES Command
Accessing Classes and Class Aliases
Execute a Method in a VALUES Expression Using an Instance
Execute a Method Using a Class, Not an Instance
Work with Class Aliases
Execute Some More Methods Using Class Aliases
Use a Constructor
Static Method Aliases
Create a Method Alias
Execute Method Aliases for Database-Side Methods
Prepared Statements
Prepare a Statement in ij
Execute a Prepared Statement in ij
Compare the Insert Performance of PreparedStatements to that of Statements
Stored PreparedStatements
Create a Stored Prepared Statement
Work with One of the Stored Prepared Statements in toursDB
Execute a Method That Uses Stored Prepared Statements
Compare the Performance of Statements, PreparedStatements, and Stored Prepared Statements
Performance, Optimization, and Indexes
Types of Queries for Which Indexes Are Useful
Find the Name of the Index on the orig_airport Column
Execute a Query with and without an Index
Execute a Query with a More Complex Comparison
Execute the Query That Uses the Column in an Expression
Covering Indexes
Execute a Query in Which the Index Covers the Query
Delete the Index and Re-Execute the Query
RunTimeStatistics
View the RunTimeStatistics for a Query
Virtual (Derived) Tables and Views
Work with a Virtual Table
Work with a View
External Virtual Tables
Import Data from a Flat File Using the Built-In Utility
Import Data from a Flat File Using an SQL-J Statement
External Virtual Tables and External Databases
Configure the ODBC Data Source for the Access Database
Load the ODBC-JDBC Bridge Driver and Import Data
Aggregate Data
Run JBMSTours.BuildATour a Few More Times
Start ij and Work with Aggregates
Work with the User-Defined Aggregate MAXBUTONE
GROUP BY and GenerateReport
Use GROUP BY
Use HAVING
Run JBMSTours.GenerateReport
Transactions
Transaction Isolation and Locking
Transactions and Connections
Start ij and Open a New, Named Connection
Set a Database Property
Open a Second Named Connection
Begin a Transaction in Each Connection
Commit TransactionA
Repeat the Previous Tasks Using READ_COMMITTED
Get Cloudscape to Automatically Roll Back a Transaction
Work With the LockTable VTI
Connecting to Multiple Databases
Run JBMSTours.ArchiveData
Storing Objects in the Database
Create a Class for HelloWorldDB
Try Altering the Class and Storing New Instances
Add the Explicit serialVersionUID to Square
The People Table and Storing Subclasses
Select Instances of Subclasses from the Person Table
Storing Media Objects and Playing Them within Cloudview
Play the Maps in toursDB
Examine Picture.java to See How the Image Is Stored
Insert Some URLPictures
Storing Classes in the Database
Create a Jar File for the JBMSTours Package and Subpackages
Add the Jar File to the Database as ToursLogic
Alter the Value of Your Class Path
Run JBMSTours.GenerateReport with Class Loading from the Database
JDBC Servers
Start RmiJdbc Server
Run ij as a Client Application
Open a Client Window, and Run an Application
Database Servlets
About the Servlets
Appropriate Web Servers and Web Browsers
Running the Servlets
Configure Cloudconnector for the Servlets and Start Cloudconnector
Configure Java Web Server 1.1 for the Servlet and Start Java Web Server
Use the Servlets
Working with a Database Applet
Overview
About the Applet
Configure and Start Cloudconnector
Access the Applet from a Browser
Environment Space Errors in Windows 95
I/O Errors on Solaris
ClassNotFound When Accessing Demo Database
|