23.5. The union Element

A union is a simple type that specifies a series of allowable other simple types as possible values. It is implemented in C and C++ as a union and in Oracle as the SYS.AnyData type. From a database design perspective, unions should be avoided, if possible, due to their design and implementation complexity. This section details a number of possible implementations for two fairly straightforward cases.

Warning

The complex cases of the union element such as a union of lists or a union of IDREFS and NMTOKENS are problematic to properly design and implement in a relational database. Clear representation, easy inserts, updates, and deletes, and proper datatype validation of the union value (which itself is composed of a series ...

Get XML Schema Complete Reference, The 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.