Accessing data

The first step in creating a data application is to access information stored in the data source and create a copy so that the data can be manipulated locally by your application. In JBuilder, a subset of data is extracted from the data source into a JBuilder StorageDataSet subclass. The StorageDataSet subclass you use depends on the way in which you obtain the information. By default, all data sets store row data in memory (MemoryStore). To store data in a single file with a hierarchical directory structure, use a DataStore instead. Storing data in a DataStore provides persistent storage and caching for JBuilder DataSets, Java Objects, and arbitrary files. The advantages to using DataStore are that the implementation is pure Java, portable, there is a smaller footprint, and provides for better performance.

To access data in JBuilder, add one of the following StorageDataSet subclasses to your application:

For QueryDataSet and ProcedureDataSet components, the data source is often a SQL server database. In this case, you also need a Database component to handle the connection to the server. See Connecting to a database for more information on connecting to a server.

When using the TableDataSet and TextDataFile components, you are usually reading data from a text file. Because you are not accessing SQL server data, you do not need a Database component.

The following diagram illustrates the different ways to obtain and store data into a JBuilder component:

DataExpress Architecture

For more information on JBuilder's DataExpress architecture, see Understanding JBuilder database applications.