Use OData for IBMDB2 and DB2forInformix

Source: Internet
Author: User
Tags ibm db2 informix
This article will first briefly introduce OData, a web API for data access. This document describes how to use OData for IBMDB2forLinux, UNIX, andWindows, DB2forzOS, and DB2forInformix. Finally, this article provides

This article will first briefly introduce OData, a Web API for data access. This document describes how to use OData for IBM DB2 for Linux, UNIX, and Windows, DB2 for z/OS, and DB2 for Informix. Finally, this article provides

OData (see references for more information) is a specification for data access to Web APIs, designed to make tables and other resources accessible from Web browsers and mobile devices. OData specifies the creation, reading, updating, deletion (CRUD) and query of resources (data or applications) through HTTP. It also specifies the format of the result to ATOM (XML) and JSON. OData is similar to a Web-based micro ODBC or JDBC. More accurately, OData allows the client to construct a URI to name an object set, filter the objects it contains, and traverse the relationship between the related entities and object sets.

Figure 1 shows how to publish DB2 or Informix on the Web using ADO. Net support. Microsoft Visual Studio provides some tools to make database data public on the Web through HTTP. Database data can be created, updated, deleted, and queried from Web browsers and other OData use programs using the OData syntax.

Figure 1. OData Overview


Figure 2 shows the CSDL (Conceptual schema definition language), which is an XML representation that describes basic resources using an object-link model that can be accessed through OData.

Figure 2. CSDL (conceptual mode definition language)

CSDL is often used in development, for example, in a tool or model er. CSDL is optional and generated by Visual Studio to help your applications understand the structure of public data. Similar to the metadata in JDBC and ODBC, CSDL helps client applications understand what they access.

Use OData on the Web to publish tables in the sample database

The following sections detail how to perform the following operations.

  • Execute initial settings, such as defining database connections.
  • Create an ADO. Net Entity model.
  • Select the DB2 table that will be exposed through OData.
  • Create an OData Service (WCF Service) for the selected table ).
  • Test the OData service.

This description is used when OData is merged into Microsoft Visual Studio. However, after testing the support in Visual Studio, you can use other OData runtime.

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.