Chapter 1
Introduction
JDataStore is a high-performance, small-footprint, 100% Pure JavaTM multifaceted data
storage solution. It is:
- A zero-administration embedded relational database, with both JDBC and DataExpress interfaces, that supports transactional multi-user access with crash recovery.
- An object store, for storing serialized objects, tables, and other file streams.
- A JavaBean component, that can be manipulated with visual bean builder tools like JBuilder.
What's new in JDataStore 3.5
JDataStore enhancements
JBuilder 3 includes the following new features for JDataStore, a pure Java, embeddable database:
- Primary key support (unique + not - null)
- Alter table support
- Add synonyms for BOOLEAN to BIT, BYTE to TINYINT, FLOAT to REAL, and LONG to BIGINT.
- Thread pooling for server
- Enhanced Column / Table designer support:
- Sort property editor surfaces the new SortDescriptor options of:
- CASEINSENSITIVE
- UNIQUE
- NOT_NULL
- PRIMARY ( UNIQUE or NOT_NULL)
- SORT_AS_INSERTED
- Column designer support for JDataStore
- JDBC 2.0 Type 4 local and remote drivers provides multi-user SQL access to DataStore tables.
- Advanced concurrency control that allows read-only transactions to operate at full speed without blocking or locking data accessed by transactions that are performing write operations.
API changes
In the com.borland.datastore package:
- DataStore transactions now support the repeatable read isolation level, which uses row locks.
- The TxManager's softRecovery option has been changed to a more robust softCommit option, which guarantees crash recovery but not very recently committed transactions.
In the com.borland.datastore.jdbc package:
- The ClientConnection interface was replaced by the ServerConnection class.
- The AcceptClient class is now a JavaBean and has been renamed to
DataStoreServer. The properties that used to be passed to the
AcceptClient constructor are now properties of DataStoreServer.
- DataStoreServer uses an event listener architecture to notify the server application of changes. As a result:
- The ClientListener interface has been removed.
- The ServerStatus and ServerStatusListener interfaces and the ServerStatusEvent class have been added.
Deployment changes
- The JAR files names now use version number 3.1
- JBCL and JGL are no longer needed.
- The main class name for the DataStore Server has changed from com.borland.jbuilder.dsserver.Server to com.borland.dbtools.dsserver.Server.
- The main class name for the DataStore Explorer has changed from com.borland.jbuilder.dsx.DataStoreExplorer to com.borland.dbtools.dsx.DataStoreExplorer.
DataStore Explorer
The DataStore Explorer provides easy and intuitive visual access to the contents and functionality of a DataStore. Available from the Tools menu and as a stand-alone utility, DataStore Explorer includes these new features:
- Open multiple DataStores simultaneously.
- Import tables from other databases using a graphical user interface.
- Display more information about indexes in the DataStore.
- License manager
- There is a Close all item in the File menu.
- The File menu tracks the last five most recently opened files.
- There is a dialog box (select View|Options) to specify your user name and whether to open DataStore files read-only.
- The functionality of the New SQL Query action have been replaced with two separate items:
- A SQL option provides a way to execute SQL statements directly on the DataStore.
- To use the DataStore Explorer as a query console, use the
Tools|Import|Tables menu option to create connections and queries, and import data.
JDBC Explorer
The JDBC Explorer now allows you to:
- View the Stored Procedure source for Interbase and Oracle databases.
- Execute .SQL files.
When to use JDataStore
With a JDataStore, you can:
- Embed SQL-92-compliant database functionality directly into your application, without having to rely on an external database engine. Databases can be accessed through the JDataStore JDBC driver, or though the DataExpress API. JDataStore supports most JDBC data types, including Java Object.
- Serialize all your application's objects and file streams into a single physical file for convenience and portability.
- Enable mobile and off-line applications. Using DataExpress datasets, JDataStore asynchronously replicates and caches data from an arbitrary data source (for example, a database server, a CORBA application server, SAP, BAAN, and so forth), allows access and updates, and resolves changes back into the data source.
- Increase the performance of online applications with large datasets by using a DataStore instead of the default MemoryStore.
You can do these kinds of things at the same time, with a single DataStore file!
JDataStore and DataStore
JDataStore is the name of the product. DataStore is the name of the packages, classes, tools, and file format.
What you should know
The JDataStore Programmer's Guide assumes a basic working knowledge of:
- Java programming.
- The JBuilder UI (how to create, manage, and run projects; how to use the design tools).
- Basic DataExpress.
- Basic JDBC.
What's in this book
The JDataStore Programmer's Guide is a general guide and tutorial, followed by reference material. It comprises the following chapters and appendixes:
- "DataStore fundamentals," describes the basic structure of a DataStore file, and uses file streams to demonstrate various administrative tasks.
- "DataStore as an embedded database," explains how to make a DataStore transactional and use it as an embedded database with a sample GUI application.
- "Multi-user and remote access to DataStores," introduces the DataStore JDBC server used for remote access, and discusses multi-user transactional issues.
- "Persisting data in a DataStore," explains how to use the DataStore as a persistent data cache for off-line computing.
- "Using the DataStore Explorer," describes the DataStore Explorer.
- "Optimizing DataStore applications," contains a variety of tips on optimizing the performance, reliability, and size of DataStore applications.
- "Troubleshooting," discusses debugging DataStore applications and fixing common problems.
- "Specifications," lists the specifications for the DataStore file format.
- "SQL reference," is a reference guide for the SQL-92 dialect supported by the DataStore JDBC driver.
Starting with the DataStore Explorer
DataStore Explorer (DSX) is an all-Java visual tool that helps you manage your DataStores. It is covered in detail in "Using the DataStore Explorer." Used in conjunction with sample DataStore files that ship with JBuilder, you can get an early idea of what a DataStore can do.
The DataStore Explorer provides visual tools for performing many
maintenance tasks. The Programmer's Guide chooses to explain the basics using the bare-bones DataStore API before explaining and demonstrating more complex topics. But there's nothing to prevent you from looking at that chapter first.
Throughout the JDataStore Programmer's Guide, you will see the following notation in the margin, which indicates some task that can be performed visually with the DataStore Explorer:
DSX: This notation is accompanied by a reference to that task in the DataStore Explorer.
Deploying DataStore application components
Information on deploying the DataStore JDBC server for remote access is described in "Deploying the DataStore JDBC server". Tips for reducing the deployed size of DataStore client applications can be found in "Pruning deployed resources".
Reminder: DataStore is provided with a license for development only. For deployment, additional licenses must be purchased. Contact Borland Customer Service for more information.
Contacting Borland developer support
Borland offers a variety of support options. These include free services on the Internet, where you can search our extensive information base and connect with other users of Borland and Inprise products. In addition, you can choose from several categories of support, ranging from support on installation of the borland.com product to fee-based consultant-level support and detailed assistance.
For more information about Borland's developer support services, please see our Web site at http://www.borland.com/devsupport, call Borland Assist at (800) 523-7070, or contact our Sales Department at (831) 431-1064.
When contacting support, be prepared to provide complete information about your environment, the version of the product you are using, and a detailed description of the problem.
For information about year 2000 issues and our products, see the following URL: http://www.inprise.com/about/y2000/.
pubsweb@borland.com
Copyright © 1999, Inprise Corporation. All rights reserved.