DB2 9 Fundamentals: Certification Study Guide

Along with the DB2 editions that make up the core of the DB2 Family, several other products designed to expand and enhance the functionality and capabilities of DB2 are available. These products, which make up the remainder of the DB2 Family, are:

The following sections provide detailed descriptions of each of these products.

DB2 Clients

In order to create a DB2 client/server environment, you must have some type of client software installed on the workstation that will serve as the client before communications with a server can be established. Consequently, several of the DB2 editions available contain the software needed to set up and configure the following types of DB2 clients:

Each of these clients can be created (by installing the appropriate client software) on any number of workstations; however, the type of client you elect to create for a given workstation is often determined by the requirements of that workstation. For example, if a particular workstation will only be used to execute an application that interacts with a remote DB2 database stored on a server, it would need to be configured as a DB2 Runtime Client. This would be done by installing the DB2 Runtime Client software that is appropriate for the operating system being used on that workstation. Figure 2-2 shows how such a DB2 client/server environment might look.

Figure 2-2: Simple DB2 client/server environment.

DB2 Runtime Client

The DB2 Runtime Client provides workstations running a variety of operating systems with the ability to access remote DB2 databases. This client is a lightweight client (having a smaller deployment footprint compared to the full DB2 Client in terms of install image size and disk space required) that provides the following features/capabilities:

In addition, the DB2 Runtime Client provided for Windows can be packaged with an application to provide database connectivity for that application; the Windows DB2 Runtime Client is available in the form of Windows Installer merge modules that enable you to include the DB2 Runtime Client DLL files in any application install package you create.

DB2 Client

Like the DB2 Runtime Client, the DB2 Client provides workstations running a variety of operating systems with the ability to access remote DB2 databases. However, where the DB2 Runtime Client provides basic connectivity capabilities, the DB2 Client delivers the same functionality as the DB2 Runtime Client, plus the tools needed to perform client/server configuration, database administration, and application development. Features/capabilities provided by the DB2 Client include:

The application development tools provided with the DB2 Client are the same as those provided with the various DB2 Developer's editions: a set of libraries and header files for each programming language supported, a set of sample programs and tutorials to assist with your development efforts, and an SQL precompiler/binder, which is used to process source code files containing embedded SQL so that they can be compiled and linked by a conventional high-level programming language compiler.

DB2 Connect

For information technology professionals who have made DB2 on iSeries and zSeries servers the cornerstone of their business, DB2 Connect provides a robust, highly scalable communications infrastructure for connecting Linux, UNIX, Windows, and mobile applications to data stored in z/OS (mainframe) and i5/OS (minicomputer) databases. DB2 Connect can be used seamlessly with some of the more common standard interfaces for database access, including ODBC, OLE DB, JDBC, SQLJ, ADO, ADO.NET, RDO, DB2 CLI, and Embedded SQL. DB2 Connect (and DB2) also delivers full support for the Microsoft .NET programming model, along with its respective IDE, Visual Studio.NET. DB2 Connect can also be used to access nondatabase resources such as CICS, WebSphere MQ, IMS, or VSAM.

DB2 Connect is an add-on product that must be purchased separately unless DB2 Enterprise Server Edition, which provides a limited-use version, is installed. DB2 Connect is available in several editions, and each is designed to address specific data access and usage needs. The DB2 Connect editions that are available are:

DB2 Extenders

In most relational database systems, including DB2, data is stored according to its data type. Therefore, in order to store a wide variety of data, DB2 contains a rich set of built-in data types, along with a set of functions that are designed to work with each data type provided. DB2 also allows users to create their own data types (known as user-defined types) and supporting functions (known as user-defined functions) to handle data that does not map directly to one of the built-in data types available. Building on this capability, the developers of DB2 created several sets of user-defined data types and user-defined functions for the sole purpose of managing specific kinds of data. Collectively, these sets of user-defined data types and functions are referred to as extenders, because they extend the basic functionality and capabilities of a DB2 database. Currently, six different extender products are available. They are:

A Word About XML Data

XML is a simple, very flexible text format derived from Standard Generalized Markup Language (SGML, ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere. Why? Because XML provides a neutral, flexible way to exchange data between different devices, systems, and applications; data is maintained in a self-describing format that accommodates a wide variety of ever-evolving business needs.

One approach to storing XML data in a relational database has been to "shred" or decompose XML documents and store their contents across multiple columns in one or more tables. (This is the functionality provided by the DB2 XML Extender.) The shredding of XML documents enables users to leverage their existing SQL programming skills, as well as popular query and reporting tools, to work directly with selected portions of the "converted" XML data. This approach is ideal if the XML data being stored is tabular in nature. However, the cost associated with decomposing XML data often depends on the structure of the underlying XML document. XML documents are composed of a hierarchical set of entities, and many XML documents contain heavily nested parent/child relationships and/or irregular structures. Shredding such documents may require a large number of tables, some of which may need to have values generated for foreign keys in order to capture the relationships and ordering that is inherent in the original documents. Moreover, querying a "shredded" document can require complex SQL statements that contain many joins.

Another popular method is to use character and binary large object (CLOB and BLOB) data types to store the entire contents of an XML file in a single column of a row within a table. With this approach, the overhead required to break a document into pieces and store the pieces in various columns of one or more tables is eliminated. Additionally, complex joins aren't needed to reconstruct the original XML document, because it was never decomposed for storage. However, the use of large objects-character or binary-to store XML documents has its drawbacks as well. Searching and retrieving a subset of an XML document can be resource intensive. And when performing updates, the entire document must be replaced, even if only a small portion of the original document has been changed. This can result in unacceptably high processing costs, particularly if the XML document is large.

DB2 9 is the first IBM implementation of a "hybrid" or multi-structured database management system. In addition to supporting the traditional tabular, relational data model, DB2 9 supports the native hierarchical data model found in XML documents and messages. With DB2 9, XML documents are stored in tables that contain one or more columns that are based on a new XML data type. (Tables created with XML data types may also contain columns with traditional SQL data types, including numeric data, character strings, and date/time/timestamp data.) This "pure" support for XML includes new storage techniques for efficient management of hierarchical structures inherent in XML documents, new indexing technology to speed up retrieval of subsets of XML documents, new capabilities for validating XML data and managing changing XML schemas, new query language support (including native support for XQuery as well as new SQL/XML enhancements), new query optimization techniques, integration with popular application programming interfaces (APIs), and extensions to popular database utilities. The result is a single DBMS platform that offers the benefits of a relational database environment and a pure XML data store.

Категории