For QMF, data is arranged in tables. These tables have names, and you must know the names of the tables that contain the data you need. The data in a table is arranged in columns and rows. Figure 1 shows an example.
Figure 1. Data in tables is arranged in columns and rows.
Columns:
Rows:
In QMF, you usually refer to tables by using two-part names--a table identifier and an owner identifier, separated by a period. For example, the exercises in this book use a table named Q.STAFF, where STAFF identifies the table, and Q identifies the owner of that table. For a table named JOHN.ACCOUNTS, ACCOUNTS is the table identifier, and JOHN is the owner identifier. Normally, the person who creates a table is the owner of that table. QMF identifies the owner of the table by using the user ID of the individual who created it. The owner of a table can authorize others to access the information in the table. When referring to your own tables, you can leave out the owner identifier. QMF assumes that you are referring to a table that you own.
If your installation supports three-part names, also known as distributed unit of work, you can use a table from a remote location by including a location identifier. See your QMF administrator to find out whether your installation supports three-part names. For example, NEW_YORK.JOHN.ACCOUNTS refers to an ACCOUNTS table owned by JOHN and located at a remote DB2 database known to your communications network as NEW_YORK. For more information on remote data access in the QMF environment, see the QMF Reference, SC26-4716-05.
You do not need to use a location identifier with local tables. In this book, you use local tables with two-part names.
Column names: If you need to refer to a column, you usually do it by name. You will learn how to find out column names for tables in Selecting tables and columns and Selecting columns and tables.