XML Database

What is an XML database?

The XML database is most commonly described as a data persistence system that enables data to be accessed, exported, and imported. XML stands for Extensible Markup Language.

The XML database is a Meta markup language that was developed by W3C to handle the inadequacies of HTML. The HTML language began to evolve quickly as more functionality was added to it.

Soon there was a need to have a domain-specific markup language that was not full of the unnecessary data of HTML, thus XML was brought to life.

XML and HTML are indeed very different, the biggest way in which they differ is where in HTML semantics and syntax tags are unchanging, in XML the creator of the document is able to produce tags whose syntax and semantics are particular to the intended application.

The semantics of tag in XML are reliant on the framework of the application that processes the document. Another difference between XML and HTML is an XML document has to in good form.

XML’s beginning purpose may have been to mark up content, but it did not take long for users to realize that XML also gave them a way to describe structured data, that in turn made XML significant as a data storage and exchange format as well.

Here are a few of the advantages that the XML data format has:

  • Built-in support for internationalization due to the reality that it utilizes Unicode.
  • Platform self-government or independence.
  • The individual decipherable format makes it easier for developers to trace and repair errors than with preceding data storage formats.
  • The extensibility the method that enables developers to put in additional information without breaching applications that were created from older versions of the arrangement.
  • A great quantity of off-the-shelf apparatus for doling out XML documents are already present.

Native XML Database

A Native XML Database or NXD defines a model for an XML document instead of the data in the document; it stores and retrieves documents in relation to the model.

At the very least the model will consist of attributes, elements, and document order. The NXD has a XML document as its fundamental area of storage.

The Database is also not obligated to have any specific underlying tangible storage model. It can be built on a hierarchical, relational, or even an object-oriented database, all of which we have explored in detail.

It can also use a proprietary storage format such as indexed or compressed files. So we can gather from this information that the database is unique in storing XML data and stores all agents of the XML model without breaking it down.

We have also learned that the NXD is not really an independent database all of the time. And are not meant to replace actually databases, they are a tool; this tool is used to aid the developer through providing a full-bodied storage and management of XML documents.

{qbapagebreak title=Features of the XML Database}

Features of the XML Database

Not all databases are the same, yet there is enough features between them that is similar to give us a rough idea of some of the basic structure. Before we continue let us note that the database is still evolving and will continue to do so for some time.

One feature of the database is XML storage. It stores documents as a unit, and creates models that are closely related to XML or a related technology like DOM.

The model includes un-uniformed levels of complexity as well as supplementation for content and semi-structured data. Mapping is used to ensure that the XML unique model of data is managed.

After the data is stored the user will need to continue to use the NXD tools. It is not as useful as to try to access the data tables using SQL as one would think; this is because the data that would be viewed would be the model of an XML document not the entities that the data depict.

It important to note that the business entity model is within the XML document domain, not the storage system, in order to work with the actually data you will have to work with it as XML.

Another feature of the database worth mentioning is queries. Currently XPath is the query language of choice. To function as a database query language XPath is extended some what to allow queries across compilations of documents.

On a negative note XPath was not created to be a database query language so it does not function properly in that area.

In order to better the performance of queries NXDs support the development of index on the data stored in the collections.

The index can be used to improve the speed of the query execution. Fine points of what can be indexed and how the index is fashioned varies with products.

What kind of data types are supported by XML?

You might be surprised to hear that XML does not actually support any data types. The XML document is almost always text, even if by chance it does represent another data type; this would be something like a date or integer.

Usually the data exchange software converts the data from a text form, like in the XML document, to other forms within the database and vice versa.

Two methods are most common in determining which conversion to do. The fist of these methods is that the software determines the type of data that is from the database schema, this works out well because it is always available at run time.

The other method that is common is that the user clearly provides the data type, like with the mapping information.

This can be recorded by the user or even generated without human intervention from a database schema or even an XML schema.

When it is generated automatically, the data types can be taken from database schemas as well as from certain types of XML schemas.

The is another issue related to conversions as well, this has to do largely with what text formats are recognized when being exchanged from XML or what could be produced when exchanging data from XML.

With most situations the amount of the text formats that are supported for a specific data type is given to be some what restricted, this is seen with a single specific format or with those that are supported by a particular JDBC driver.

It is important to also note that dates will usually cause issues; this is largely due to the fact that the range of possible formats is extremely extensive. When you also consider number with international formats, these can add to the problems as well.

Concluding statements

XML may seem to be confusing, however, it is beneficial and even a bit less complicated then HTML. Yet when you are beginning to take the step to understanding XML when you have spent much time working with HTML, the process can be a bit distressing.

Never fear, once you have completed that step, XML is definitely a dominant format. It is also used in almost all of the models we have discussed, making it a vital area to explore in more detail.

Editorial Team at Geekinterview is a team of HR and Career Advice members led by Chandra Vennapoosa.

Editorial Team – who has written posts on Online Learning.


Pin It