24.17. extension Element

The extension element is used to derive a complexType from another by adding attribute types for simple content and element types for complex content. A database designer has two major options in designing a schema to create an extension:

  • Add a type column to a table and handle the extensions in check clauses and triggers that key off of the type column. In other words, add the type to the existing set of tables.

  • Create a new table (or tables) to handle the new type.

Each of these approaches has trade-offs. The first approach is best when the extension element type is associated with content that is mapped to a couple of database columns and not relationships. It best handles the simple cases of extension element types. ...

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.