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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.