Topics: |
This section describes how the Extender for Db2 and the SQL Translator access heterogeneous relational and non-relational databases. The topics include:
When resolving column names, the SQL Translator does not accept a unique truncation of a column name as a valid name for that column. For example, if you had a table with a column named EMPID, you cannot refer to that column as EMP (assuming no other column referenced in the request began with those three letters). You must refer to the column by its full name, EMPID.
The SQL Translator is fully ANSI compliant; therefore, the user cannot use ALIAS= facility in the Master File. The ANSI specification states that a column has only one name. To rename a column logically, the application should create a view of that table with a different column name.
It is not possible to define a virtual field dynamically in a remote procedure and use it in subsequent SQL statements against that table. Virtual fields must be defined in the Master File. For more information about Master Files, consult the server Adapter Administration manual.
Topics: |
To provide completely transparent SQL access, SQL Translation Services create a Cartesian product style answer set in all cases, regardless of the nature of the underlying DBMS. A Cartesian product style answer set is in keeping with the SQL-based nature of the data access mechanism.
A Cartesian product or set multiplication is defined as the pairing of each element of x with every element of y. This type of response is the expected result of a relational JOIN.
This means that in some instances, the answer sets received are larger than expected. The Cartesian product generation only affects situations involving JOINs, either implicit or explicit.
For example, there is a three-segment hierarchical database. The top segment represents departments, one child segment represents employees, and the other—the furniture used by that department. Assume that the payroll department has 20 employees and 22 desks. If you ask for all of the employees and furniture from the payroll department, the SQL user would expect to get each employee listed 22 times, once for each desk. This type of answer is the Cartesian product set answer, and is consistent with the result you would expect from an SQL-based DBMS, such as Db2.
The Cartesian product set answer can appear only under certain specific circumstances, as in the above example, with multi-path requests in a hierarchical data structure. In general, it only results in a repetition of rows.
The algorithm used to interpret the generation of answer sets is straightforward. This algorithm is the structure around which answer set generation is performed. This algorithm will be familiar to any experienced SQL user, but may be a new experience to application developers and users that are more familiar with other DBMS systems.
This algorithm does not correspond to the internal mechanism of generating answer sets, but is a convenient means of thinking about that process. The internal mechanisms are different because they have been optimized for performance in specific DBMS environments.
The (simplified) algorithm is:
Three things help to explain the Cartesian product answer set generation, particularly for users unfamiliar with SQL-based DBMSs.
These and other features allow server users to develop the client/server applications quickly and easily.
The following limitations exist in the Extender for Db2.
WebFOCUS | |
Feedback |