Several easy-to-mix concepts in XML databases 2

Source: Internet
Author: User
XML databases in relational databases can be divided into three models: coarse-grained (rough texture type), medium-grained (medium-level texture type ), or fine-grained (excellent texture type ). The coarse-grained (rough texture) model is logically related to the fl relational database

XML databases in relational databases can be divided into three models: coarse-grained (rough texture type), medium-grained (medium-level texture type), or fine-grained (excellent texture type ).

The coarse-grained (rough texture) model is logically different from the flat file model. You can apply a relational database to store every XML document. For example, the following code can store an XML document:

Create table diets
(DietName varchar2 (30 ),
XmlDocument varchar2 (32000)
)

The fine-grained (fine-grained) model maps each component of an XML document to a relational database. To transfer the flat model to a relational database, you must apply two transformation methods. For the above example, you can no longer apply the subdirectory name to represent the diet name, nor can you apply the file name to pass the diet date. Table A displays the File Type Definition (DTD) of the XML document of diet, and Table B shows the data definition language (DDL) that maps the DTD to the relational table ). In addition, Table C also contains the corresponding XML syntax.

The medium-grained (medium-level texture) model is between the coarse-grained (rough texture) model and the fine-grained (excellent texture) model. With this model, you can store information in the xml_items column of the meals table.

Object Database

You can also implement NXD by applying an object database. Some object databases are based on the Document Object Model (DOM), which promises that XML is closely associated with the database. For example, once you supply a food DTD, you can start to retain the food without additional configuration.

Database governance system

You can have multiple options for DBMS. You can build your own DBMS through application open programs such as eXist or Ozone, or purchase trade products such as Tamino XML Server.

Most relational database vendors enable their databases to apply XML. at least XML databases (XEDBs) can return the results of XML document queries. In addition, many XML data can be retained. For example, Oracle provides an XML analyzer, an Xpath engine, an XSLT processor, an XMLSQL tool, and an XML method.

So what is the difference between NXD stored in the application relational database and XEDB storing XML data? An NXD is created based on the XML document concept, and XEDB is not associated with others too much. In addition, many standards are used in NXD, while DBMS only queries and stores XML documents of data on a practical scale, such as Xpath.

XML database is not a new concept

XML databases are not a new concept in terms of logic, although they are new in terms of logical performance. If you want to implement an XML database, you can apply NXD, XEDB, or the combination of the two. However, if your company has made a certain investment in the existing database, your first investigation is to check whether your DMBS vendor provides tools for using XML. No matter which XML database method you apply, you must understand the characteristics of each Database. this is the most important thing.

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.