The PSQL Java Interface
The PSQL Java Classes are an interface to the MicroKernel Engine.
Java Class Library and MicroKernel Engine
The PSQL Relational Engineallows the users to reference databases with column level granularity. On the other hand, the MicroKernel Engine is concerned only with files, records, and indexes, and the application programs themselves are responsible for field-level access within the data buffer returned by a Btrieve API call.
In a SQL database, column-level information is available in the data dictionary stored in the data dictionary files.
*Note: Btrieve has been using the "file/record/field" terminology. However, in this section we use table, row and column instead when we describe classes that can be used in conjunction with databases that have PSQL dictionaries.
The purpose of this API is not only to provide language binding to object-oriented languages, like Java and C++, but also to furnish a logical structure that fits into object-oriented applications.
The design of the object-oriented API addresses the following goals:
Shortly after the introduction of Java, a database interface, Java Database Connectivity (JDBC) was introduced. JDBC is gaining more and more popularity among database developers. The design of the new PSQL Java API uses the JDBC API as a model and applies many of the ideas and the methodology used in JDBC. However, some new concepts had to be introduced because JDBC was designed to support SQL and generally the relational model, whereas this API set supports the transactional Btrieve.
As was mentioned previously, if a Btrieve application accesses a data file that belongs to a SQL database, the new API calls can use the column descriptions stored in the dictionary of the database. In the case of Btrieve data files that are not part of any SQL database, the new API provides other means to access these files.
Database Concepts
A set of Btrieve data files that do not belong to any SQL database still form a database if some application programs tie them together in a logical sense. Such databases are referred to as loosely-coupled databases. A loosely-coupled database has no database dictionary. On the other hand, SQL databases will be referred to as tightly-coupled databases. A tightly-coupled database does have a persistent database dictionary.
The PSQL Java interface can operate at a high or low level depending on which classes you use.
Tightly-Coupled Databases
The high-level portion of the Java interface hides many of the implementation details that Btrieve programmers have dealt with formerly, such as position blocks, data buffers, and so on.
Loosely-Coupled Databases
A user who currently has a loosely coupled database and wants to take full advantage of the column-level support of the new API must choose one of the following options:
1
2