Chapter 8. Advanced Programming

Ability to query tables across multiple databases

[Note]

When you want to select or modify data source data, you query the nicknames by using the SELECT, INSERT, UPDATE, and DELETE statements. You submit queries in DB2® SQL to the federated database.

You can join data from local tables and remote data sources with a single SQL statement, as if all the data is local. For example, you can join data that is in the following objects:

  • A local DB2 table in the federated database, an Oracle table, and a Sybase view

  • A DB2 UDB for z/OS table on one server, a DB2 UDB for z/OS table on another server, and an Excel spreadsheet

By processing SQL statements as if the data sources were ordinary relational tables or views within the federated database, the federated system can join relational data with data in nonrelational formats.

Tables and views in the federated database are local objects. Do not create nicknames for these objects. Instead use the actual object name in your SQL statements.

Remote objects are objects not located in the federated database. You need to create nicknames for these objects. For example:

  • Tables and views in another database or instance on the federated system

  • Tables and views in another database or instance on another system

  • Tables and views in data sources such as Oracle, Sybase, and ODBC

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     SCDJWS 5.0 Quiz