Referential Integrity

Now that we know we can accommodate all our data, let's look at whether this is really the best way to do it.

Anyone who works with relational databases is probably screaming “Finally!” This structure makes a lot of sense from an XML standpoint, where products are embedded within vendors, and so on, but in a typical enterprise application, this is not the way it's done.

We'll be dealing with traditional databases in Chapter 8, “Updating Inventory: SQL Databases and SAX,” but let's take a moment to look at the implications or this comment method of data storage.

In a relational database, types of information are stored together, with keys that link them together. For instance, vendors and products would probably be stored ...

Get XML and Java™ from scratch now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.