About Tables [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation
HP ALLBASE/BRW Reference Manual
About Tables
There are two main kinds of tables: source tables and access (result)
tables.
Source Tables
You build an access table using from 1 to 14 source tables. Source
tables can be any of the following:
* IMAGE data sets
* HP ALLBASE/SQL tables
* KSAM files
* MPE files
* HP ALLBASE/BRW tables--That is, other access tables defined in the
same report. These tables are useful when you are using a series
of tables in the same report.
* intermediate report file (output file)--Files from another HP
ALLBASE/BRW report.
With HP ALLBASE/BRW, you define which data and what calculations or
qualifications you want separately from how you get the data. This lets
you tune data access for best performance after the report is completed,
without the risk that the report does not print the correct data if you
change access methods.
Single-source Tables.
Single-source tables access data from only one source, that is, one data
set, table, or file. To specify a single-source table, you define it as
a joined table on the Define Table screen, but you only list that one
table. The table below is an example of a table built from one source
table, the CUSTOMERS data set.
-------------------------------------------------------------------------------------------------------
| | | | | | |
| CUSTOMER-NO | CUSTOMER-NAME | CITY | SALES-AREA | STATE | ZIPCODE |
| | | | | | |
-------------------------------------------------------------------------------------------------------
| | | | | | |
| C2 | Boot Inc. | Miami | Western | Florida | 46670 |
| | | | | | |
-------------------------------------------------------------------------------------------------------
| | | | | | |
| C7 | Gambler | Reno | Southern | Nevada | 23348 |
| | | | | | |
-------------------------------------------------------------------------------------------------------
| | | | | | |
| C12 | Eiffel SA | Paris | Eastern | France | 99999 |
| | | | | | |
-------------------------------------------------------------------------------------------------------
| | | | | | |
| C27 | Shoe Spa | Rome | Eastern | Italy | 77777 |
| | | | | | |
| . | | | | | |
| | | | | | |
| . | | | | | |
| | | | | | |
| . | | | | | |
| | | | | | |
-------------------------------------------------------------------------------------------------------
| | | | | | |
| C9999 | Last's Ties | FA | Northern | Alaska | 66743 |
| | | | | | |
-------------------------------------------------------------------------------------------------------
Multiple-source Tables.
Multiple-source tables access data from more than one data set, table, or
file. Multiple-source tables are listed on the Define Table screen. You
can join or merge a multiple source table.
Joining and merging tables is completely described in Chapter 6 .
Access Tables
You use relational data access to combine one or more source tables into
a new table, called an access table (or result table that contains data
items from the source tables that you need in your report. You can
define the following:
* Which source tables you need to combine into the final access
table and then use that table to create a report.
* How you combine source tables: by joining, open joining, or
merging them.
* Which common items you want to use to join the source tables.
* Which table-specific selections you need to make. Only those
records satisfying the relation condition are selected from the
source tables.
* Which items you transfer (project) from the source tables to the
final table. Only items that are projected can be used in
reports.
* What calculations you need to make using the items. Items are
calculated when data is retrieved from the source table and the
result is included in the new table.
The table built as a result of these above operations can itself be used
as a source table. Using the result table as a source table in another
table is called nesting tables. When you have all the data that you
require for your report in one table, that table is used in the report
and is known as the final access table.
MPE/iX 5.0 Documentation