Introduction:
There are various ways to solve the problem of effectively and automatically converting XML into and out of relational databases. Database vendors such as IBM, Microsoft, Oracle, and Sybase have developed auxiliary tools for converting XML to database tables. Various solutions are as follows.
Oracle xml SQL Utility models XML document elements as a group of nested tables. You can use the Oracle object data type to model elements. "SQL-to-XML" converts a table referenced by the object data type and one-to-one association with nested elements to construct an XML document. "XML-to-SQL" may require improvement of the data model (from link conversion to object-link) or re-constructing the original XML document.
IBM DB2 XML Extender allows you to store XML documents as BLOB objects or break them into a group of tables. The latter must be transformed to XML collection, which is defined in XML 1.0 syntax.
Microsoft resolves the problem by extending the SQL-92 and getting involved in the OPENXML dataset.
Sybase Adaptive Server's intervention in the ResultSetXml Java class serves as the basis for processing XML documents in two directions.
In this article, we will discuss in detail the solutions of these vendors. Afterwards, we will try to answer the following questions:
Can we adjust and simplify the problem?
In a heterogeneous database environment, what is the correct approach?
I will use the following vocabulary as an example.
<! -- Simple type -->
<! ELEMENT CURRENCY1 (# PCDATA)>
<! ATTLIST CURRENCY1 e-dtype NMTOKEN # FIXED "string"
E-dsize NMTOKEN # FIXED "3">
<! ELEMENT CURRENCY2 (# PCDATA)>
<! ATTLIST CURRENCY2 e-dtype NMTOKEN # FIXED "string"
E-dsize NMTOKEN # FIXED "3">
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.