Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SQL Database Connectivity (SQLDBC)

7.7.04

SQL Database Connectivity for Application and Interface Development

SQL Database Connectivity (SQLDBC) is a runtime library that enables applications to execute SQL statements in the database, and to access and modify data.
The object-oriented structure of SQLDBC was developed in a similar way to the architecture of ODBC and JDBC. Due to their complexity, ODBC and JDBC have been considered as slow. SQLDBC, on the other hand, has a thin layer of abstraction and a correspondingly high level of performance.
This makes it an ideal basis for native interfaces such as ODBC or Perl.
However, you can also implement SQLDBC for pure application developments.
When the SQLDBC classes were being designed, particular attention was paid to guaranteeing the highest possible level of downward or upward compatibility with new developments.
For this reason, if you implement the SQLDBC as a shared library, you will probably not need to recompile the application.

SQLDBC supports all database versions from 7.3.00.


How SQLDBC Works

SQLDBC encapsulates the database communication protocol, so simplifying direct access to the database.
The SAP DB communication protocol (the Order Interface) uses data structures for its communication, which are dispatched as TCP/IP packets. The SQLDBC receives the response packets from the database, interprets them, and converts them. This simplifies the processing of SQL statements.
For this reason, any applications and interfaces that are based on SQLDBC do not need to recognize the SAP DB communication protocol to be able to use the SQLDBC classes and methods. Also, these applications and interfaces do not need to be adjusted if any changes are made to the communication protocol in the future.


Architecture

SQLDBC_Architecture.gif

Schematic Representation of the SQLDBC Class Diagram

Just like ODBC and JDBC, the SQLDBC shown above has a tree-like structure with classes of the types Environment, Connection, Statement, PreparedStatement, ResultSet, RowSet, ParameterMetaData, and ResultSetMetadata.
A separate interface for memory management is also available.
The Environment class manages the database connections. You can use the Connection class to set up connections to databases, while at the same time defining various properties for the connections (such as SQLMODE, ISOLATIONLEVEL, and AUTOCOMMIT).
Within this class, the administration structures of SQL statements are cached (in the ParseInfoCache), which significantly reduces the time needed to execute the statements. The Connection class also manages the Statement and PreparedStatement objects needed for executing SQL statements.
The methods in the Statement and PreparedStatement classes can be used to execute SQL statements and process the result sets of SELECTs and database procedures. The application can use row sets (RowSets) to navigate within the result sets (ResultSets).
You can execute SQL statements either as single commands or mass commands (in JDBC: batchExecute function). Mass commands improve the runtime responses of the application and minimize the volume of data in the network.
The data converter converts the C++ program variables and data structures that are used in the application into the parameters and columns embedded in the SQL statements, and also converts these parameters and columns back into program variables and data structures.
The ParameterMetaData and ResultSetMetadata classes provide information about the parameters and columns of SQL statements, such as their data type and length.


Features


Future Plans

Support of new (comming with 7.6) and old communication protokoll of MaxDB through the same library. The new communication will support SSL and authentication. Binary compatibility on interface level. Easy access to R/3 with multiple database connection.