by Kevin Williams, founder and CEO, Blue Oxide Technologies. Intel Corp.
This article is the first in a series that looks at the steps involved in modeling relational data in XML. We look at the three major components of a relational database—tables, columns, and the key relationships among them—and see how to best model each in XML.
Before discussing how we should model our relational data in XML, we first need to understand one of the classic problems in XML data modeling: whether to use elements or attributes to model our data points.
Data points (individual pieces of information, the equivalent of values in the columns in our relational database) can be expressed either as elements or attributes in an XML model. For example, an abbreviated customer table might be modeled either this way:
Or this way:
While these two approaches appear interchangeable at first, a closer examination reveals that one is superior to the other for modeling relational information.
Comparing elements, attributes, and the relational model
In the relational model, a set of related information is stored in a table; individual pieces of information are stored as values in columns in the table. In XML, tables are modeled as elements that provide the only way to associate pieces of information together into a related group.
Order significance
In XML, the order in which elements appear is significant. Because the XML data model preserves the order found in the original document, the following document:
![]()
![]() | Advanced packages drive on-board programming innovations by Peter T. Larsen. Intel Corp. Vendors such as Intel recognize t... |
If you're interested in this topic, these articles may be helpful:
![]() | XMLSpy Home Edition 2005 from Altova Altova XMLSpy 2005 Home Edition is a free entry level X... |
![]() | Schema Plus Professional trial download from SchemaPlus Schema Plus is an array of robust database management... |
![]() | Determine the correct XML parser type for a Java application by Padma Apparao, senior performance architect, Software Solutions Gro... |
![]() | Semantic interoperability with universal data element framework by Neelima Vobugari, XML certified independent software consultant. ... |
![]() | Custom ASP.NET DataGrid paging with Exact Count by Dimitrios Markatos, independent .NET architect. Anybody in the D... |
![]()
Related Jobs:


