Detailed description of the use of IBM DB2 XML Verification Technology

Source: Internet
Author: User
Tags db2 installation ibm db2

A repository, such as a relational database, provides an environment for authorized users to securely share DB2 XML documents and XML patterns. Authorized users can access important XML documents and XML patterns anytime and anywhere. By using a database system that contains one or more relational database systems, you can find and retrieve the latest XML and XML Schema documents.

DB2®9 provides new support for XML. For this new support,. Net application developers can quickly get started. This is because DB2 9 allows programmers to query, insert, update, and delete XML data like relational data-using familiar ADO. Net statements and standard query languages. This document provides a detailed example of how to use. Net to build an application using the DB2 XML technology. DB2 XML technology allows you to store, verify, and query XML in XML's original hierarchical format.

XML support in DB2

DB2 9 introduces some new features and mechanisms for managing, storing, and querying XML data:

The XML data type allows DB2 to store DB2 XML documents in the hierarchical format of XML itself.

The XML query language is based on industry standards and includes new XML extensions for SQL (also known as SQL/XML ).

Supports XML data verification based on the user-provided mode, which allows application developers and database administrators to implement data integrity constraints on the XML data stored in DB2. The example in this article uses DB2 Visual Studio 2005 Add-in.

The sample code in this article references the CARPOOL table, which records information about the partnership between San Francisco and San Jose. Listing 1 shows the definition of the table. In addition, make sure that XML is enabled for the database.

Environment Settings

Note: Make sure that XML is enabled when the SAMPLE database is created (see the definition below ).

This document uses Visual Studio. NET 2005 and DB2 9. The installation of these two products is very simple. We recommend that you first install Visual Studio. NET and then install DB2 9. Remember the user ID and password entered when installing DB2, because you need to use them when connecting to DB2.

During the DB2 installation, ensure that TCP/IP is enabled. If you are not sure whether TCP/IP is enabled after installing DB2, perform the following steps:

From the Windows Start Menu, choose Programs> IBM DB2> DB2 (default) [or DB2 Instance name]> Command Line Tools> Command Window.

In the DB2 command window, you can see the command prompt C: \ Program Files \ IBM \ SQLLIB \ BIN> (if the default installation path is used ). Enter db2set. In the returned result, we can see this line: DB2COMM = tcpip.

If you have not enabled TCP/IP for DB2, enter the following command to enable TCP/IP:

 
 
  1. db2set db2comm=tcpip   
  2. db2 update dbm cfg using svcename 50000   
  3. db2stop   
  4. db2start  

After installing DB2, you can create a DB2 SAMPLE database. If you select this option, you should accept the default settings, but be sure to select the DB2 XML and SQL objects and data Option.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.