Sequence of Steps for a Java Application
The following sequence of steps are typical of an application or applet. The first two steps are the same for both tightly coupled and for loosely coupled databases:
1
2
Get a Database object for the database by invoking Session.connectToDatabase() specifying a URI. See PSQL Programmer's Guide for more information on database URIs. It is also possible to get multiple Database objects in a session, one for each database to be accessed.
Now choose either Case 1: The application is accessing tables of a tightly coupled database. (Btrieve database uses a DDF) or Case 2: The application is accessing data files of a loosely coupled database (or data files that store tables of a tightly coupled database in the "classic" way).
Case 1: The application is accessing tables of a tightly coupled database.
3
4
5
6
An application creates more than one RowSet for a table if it wants to process the table in some parallel fashion while maintaining multiple currencies (positioning) when navigating through the table. A RowSet object for a given table can be used for the entire duration of the application. That is, it can be used for retrievals by different indexes, by different conditions, and so forth.
7
a.
b.
c.
d.
e.
f.
*Note: Steps a) through d) are optional and depending on the application, they might not be needed for some row sets.
Case 2: The application is accessing data files of a loosely coupled database (or data files that store tables of a tightly coupled database in the "classic" way).
3.
4
*Note: The BTRV method can be used also on XCursor because XCursor extends SCursor.
5
6
The sections that follow explain these overview steps in more detail.