by Kevin Williams, founder and CEO, Blue Oxide Technologies.
In this series, we'll take a look at how relationships (in the relational database sense) are modeled in XML. Armed with this information and the information from the articles one and two in this series, you'll be able to dive in and get started modeling your relational data in XML Schemas. In the last article we'll look at a simple case study and walk through the analysis and mapping steps.
Modeling tables in XML
In XML Schemas, tables are modeled as elements. Each element will have either attribute declarations or element declarations with text-only content associated with it; these are the data points associated with the element (for more on modeling data points, see the previous article). So, for each table in our relational database containing data we want to represent in an instance of our XML document, we first create an element to hold that data. There are three approaches to this (much like with data point values). Let's take a look at an example. Say we want to model a document that looks something like this:
In the first approach, anonymous complex types are used inside element declarations to define where there is further complex content (other element structures representing tables) embedded inside our elements. For our example, we might have a definition that looks like this:
In this example, there is really one element model—that of the root element—that contains the models for all the other elements in the system. While this model gives a good idea of how an actual instance document will look (the hierarchy will be similar), this element model can be a bit difficult to debug.
![]()
![]() | Security considerations for mobile hardware by Alan Zeichick, principal analyst, Camden Associates. Intel Corp. ... |
![]() | Multithreaded technology and multi-core processors by Craig Szydlowski, Infrastructure Processor Division, Intel Corp. ... |
If you're interested in this topic, these articles may be helpful:
![]() | Oracle Database 10g XML & SQL, Chapter 7: Putting It All Together with XML Pipeline, JSPs, and XSQL by Mark Scardina, Ben Chang, and Jinyu Wang. McGraw-Hill Osborne Med... |
![]() | Data points: modeling relational data in XML, part 2 by Kevin Williams, founder and CEO, Blue Oxide Technologies. Intel Cor... |
![]() | XML Web services: the long-term security risks by Andrew Yang, senior director of project management, Westbridge Tech... |
![]() | Scaling XML parsing on Intel architecture By Andy Longshaw, Content Master Ltd. Intel Corp. XML provides many b... |
![]() | Final Cut Pro XML Interchange Format Apple Inc. The Final Cut Pro XML Interchange Format provides extens... |
![]()
Related Jobs:


