O'Reilly logo

Enterprise Application Integration With XML and Java™ by Bill la Forge, JP Morgenthal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.7. The Example Step-by-Step

6.7.1. Modeling Tables

  1. Table. The table itself becomes an element type. In the document, each occurrence of an element of this type will contain a single row of the data. If we're modeling the columns of this table as attributes, the content model is EMPTY. If we're modeling the columns as elements, then the content model is a sequence of the element type names that correspond to the columns. In the latter case, we make optional (?) any elements where column values may be null.

    <!ELEMENT EMPLOYEE EMPTY>
    or
    <!ELEMENT EMPLOYEE (
       EMPLOYEE.NUM,
       EMPLOYEE.FNAME,
       EMPLOYEE.LNAME,
       EMPLOYEE.HIRE_DATE,
       EMPLOYEE.TERM_DATE?
    )>
    
  2. Primary Key. If the table has a primary key, we capture that information with the pkey metadata property ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required