Using InfoSphere Data Architect to import and export data model XML

Create XML files from InfoSphere Data Architect, and create data models from XML files

XML files are used throughout software development and information management to describe data structures. This article shows you how to turn XML files into data models, and vice versa, with the help of IBM® InfoSphere® Data Architect.

Davor Gornik (dgornik@us.ibm.com), Product Manager, IBM

Davor Gornik photoDavor started his career as a software developer and architect in the early days of CASE, 4GL, and UNIX. His experience with technologies expanded to OO, UML, IE, SOA, RDBMS, II, and other acronyms. (Which explains why his writings do not contain any unexplained, three-letter abbreviations.) He is now a product manager with IBM and works with Common AD Tooling and DB Administration group. Outside of work he is a world traveler with a long history of international relocations, and many stories to tell about different parts of the world -- from San Marino to China, and including most of the continents. Additional hobbies include photography, remodeling, volleyball, and other sports.



Rishiraj Barthakur (rishirajbarthakur@in.ibm.com), System Software Engineer, IBM

Rishiraj Barthakur photoRishiraj Barthakur works as a System Software Engineer for IBM Data Studio - Common Application Development Team. For the last two years he has been maintaining and developing InfoSphere Data Architect for IBM.



09 September 2010 (First published 29 November 2006)

Also available in Chinese Spanish

Introduction

InfoSphere Data Architect provides tools that can dramatically reduce design and development time. This software, built on the open source Eclipse platform, helps data architects to model, discover, map, and analyze data across multiple information sources, and to automate information integration in complex environments.

With InfoSphere Data Architect 7.5.2 and Fix Pack 2, you can import XML Document Type Definition (DTD) and XML Schema Definition (XSD) documents as logical data models. However, you cannot import these documents as a physical model because physical data models in InfoSphere Data Architect require a database specification, which is not part of the import.

The import and export functions support various XML formats. The most important ones are shown in the following table:

FormatDescription
XML DTDA document that defines basic XML structure with containment relationships between them
XML XSDA more precise specification of structure, data types, and rules for an XML document
Object Management Group (OMG) CWMCommon Warehouse Model (CWM) specification for a database schema in XML

The DTD and XSD formats are basically extracts from an XML structure and are commonly used wherever XML documents are found. The CWM format is a complete model description with more details, such as detailed constraints, complex relationships, and super and subtypes. CWM is typically used by tools as an import/export format and is only created manually in exceptional cases.

InfoSphere Data Architect configuration

To follow the instructions in this article, you need a working version of InfoSphere Data Architect 7.5.2 with Fix Pack 2. You need to make several configuration changes to enable XML import and export interfaces in InfoSphere Data Architect, so let's get started.

Enabling XML DTD import

Assuming that you have installed InfoSphere Data Architect in C:\Program Files\IBM\IDA7.5.2.2, you need to change the configuration parameters in the following file to enable XML DTD support:

C:\Program Files\IBM\SDPShared\plugins\com.ibm.datatools.metadata.wizards.miti.win32_1.0.3.v20100320_1502\MetaIntegration\conf\MIRModelBridges.xml

Find the Bridge element with the id W3cXmlDtd, and change it as follows:

<Bridge id='W3cXmlDtd' enabled='True' windowsOnly='False'>
    <DisplayName id='' enabled='True'>XML DTD 1.0 (W3C)</DisplayName> 
</Bridge>

Only import is supported for XML DTD documents.

Enabling XML XSD import/export

Assuming that you have installed InfoSphere Data Architect in C:\Program Files\IBM\IDA7.5.2.2, you need to change the configuration parameters in the following file to enable XML XSD support:

C:\Program Files\IBM\SDPShared\plugins\com.ibm.datatools.metadata.wizards.miti.win32_1.0.3.v20100320_1502\MetaIntegration\conf\MIRModelBridges.xml

In the <import> section of the file, find the Bridge element with the id W3cXmlXsd, and change it as follows:

<Bridge id='W3cXmlXsd' enabled='True' windowsOnly='False'>
    <DisplayName id='' enabled='True'>W3C XML Schema 1.0 (XSD)</DisplayName>
    <DisplayName id='W3cXmlXsdImport.MicrosoftXdr' enabled='False'>
        Microsoft SQL Server XML Data Reduced (XDR) Schema </DisplayName>
</Bridge>

Although W3C and Microsoft® specifications are similar, they are not identical. Be sure to select the one you need.

In the <export> section of the file, find the Bridge element with the id W3cXmlXsd, and change it as follows:

<Bridge id='W3cXmlXsd' enabled='True' windowsOnly='False'>
    <DisplayName id='' enabled='True'>W3C XML Schema 1.0 (XSD)</DisplayName>
    <DisplayName id='W3cXmlXsdExport.AltovaXmlSpy' enabled='False'>
        Altova XMLSpy</DisplayName>
    <DisplayName id='W3cXmlXsdExport.SybasePowerDesignerXsm' enabled='False'>
        Sybase PowerDesigner XSM 10.x to 15.x</DisplayName>
</Bridge>

Enabling OMG CMW import/export

Assuming that you have installed InfoSphere Data Architect in C:\Program Files\IBM\IDA7.5.2.2, you need to change the configuration parameters in the following file to enable OMG CWM support:

C:\Program Files\IBM\SDPShared\plugins\com.ibm.datatools.metadata.wizards.miti.win32_1.0.3.v20100320_1502\MetaIntegration\conf\MIRModelBridges.xml

In the <import> section of the file, find the Bridge element with the id OmgCwmXmi, and change it as follows:

<Bridge id='OmgCwmXmi' enabled='True' windowsOnly='False'>
    <DisplayName id='' enabled='True'>OMG CWM 1.x XMI 1.x</DisplayName>
    <DisplayName id='OmgCwmXmiImport.HyperionApplicationBuilder' enabled='True'>
        Oracle Hyperion Application Builder (via CWM XMI)</DisplayName>
    <DisplayName id='OmgCwmXmiImport.IbmDb2WarehouseManager' enabled='True'>I
        BM DB2 Warehouse Manager (via CWM XMI)</DisplayName>
    <DisplayName id='OmgCwmXmiImport.OracleWarehouseBuilder' enabled='True'>
        Oracle Warehouse Builder (via CWM XMI)</DisplayName>
    <DisplayName id='OmgCwmXmiImport.SasDataIntegrationStudio' enabled='True'>
        SAS Data Integration Studio (via CWM XMI)</DisplayName>
</Bridge>

In the <export> section of the file, find the Bridge element with the id OmgCwmXmi, and change it as follows:

<Bridge id='OmgCwmXmi' enabled='True' windowsOnly='False'>
    <DisplayName id='' enabled='True'>OMG CWM 1.x XMI 1.x</DisplayName>
    <DisplayName id='OmgCwmXmiexport.HyperionApplicationBuilder' enabled='True'>
        Oracle Hyperion Application Builder (via CWM XMI)</DisplayName>
    <DisplayName id='OmgCwmXmiexport.IbmDb2WarehouseManager' enabled='True'>I
        BM DB2 Warehouse Manager (via CWM XMI)</DisplayName>
    <DisplayName id='OmgCwmXmiexport.OracleWarehouseBuilder' enabled='True'>
        Oracle Warehouse Builder (via CWM XMI)</DisplayName>
    <DisplayName id='OmgCwmXmiexport.SasDataIntegrationStudio' enabled='True'>
        SAS Data Integration Studio (via CWM XMI)</DisplayName>
</Bridge>

The names shown above are just samples. Enable the displayed names according to the tool you are using.


Required import steps

To start an import operation with InfoSphere Data Architect, select File > Import.

From the displayed list of import filters, select Data Model Import Wizard, as shown in Figure 1. This step starts the wizard that lets you specify what you want to import, the format of the import, and the expected result.

Figure 1. Import selection dialog
Import selection dialog

Selecting the parameters

As shown in Figure 2, the Select the Model panel requires that you make selections or entries for each parameter. The parameters are described below the figure.

Figure 2. Selection of import parameters
The parameters dialog
Model format
The type of the input model. In this case, the input file (model) is in XML DTD 1.0 format as defined by the W3C organization.
Model
The complete path to the source file (model). You can use Browse... to locate the file.
Target project
Name of the project in the current workspace where you would like to see the results. You can use Browse... to locate the project.
Model type
The type of the result. The available selections are for logical model, physical model, or automatic recognition by the import. In this case, Logical only is selected.
File name
Name of the resulting model. In this case, a logical model named ofxdtd.ldm will be created in the selected target project.

As shown in Figure 3, use the Select the Options panel to specify detailed parameters about the import. The parameters are described below the figure.

Figure 3. Specification of import options
Specification of import options
Elements content name
Defines which element will be mapped to an attribute. In this case, all elements defined as #PCDATA will be transformed to an attribute.
Collapse Level
Provides the opportunity to collapse several elements into one. This reduces the number of entities.
Collapse Star
Filters out the DTD elements with a link ("*") from the generation.
Class Type
Defines whether an entity will be created when collapsing input information.
Any
Specifies whether or not the XML concept "Any" will result in an entity.
Generate IDs
Generates additional primary keys if needed.
Import subtitutionGroup as
Allows you to specify if inheritance is represented as a generalization or if inherited attributes are duplicated (rolled down) in the subclass. Specify Generalization to represent inheritance as generalization. Specify Roll down to roll down the attributes of the parent complexType to the child complexType.
Include Path
Allows you to specify a path to a directory that contains included schema files. This option may be useful when importing a schema composed of several included XSD files. The directory path must be locally accessible on the machine running this bridge. If the bridge is running locally, it will always search the directory that the File parameter points to. If the bridge is running on a remote server (MIRWeb or repository import), this path must be a path accessible directly from the server.
UDP namespace
Full name of the namespace that contains attributes to be imported as user defined properties (UDP).

In addition to using the parameters described above, you can also influence the workflow with the following selections:

Validity check
Defines the level of checks that are executed before the import (basic, detailed, or none). It is recommended that you execute at least some validity checks.
Target database
Defines the type of the target database for physical models.

Evaluating results

After the import finishes execution, you should always evaluate the status shown on the Summary panel and look for important information. An example is shown in Figure 4.

Figure 4. Evaluate the summary
Evaluate the summary

Following are descriptions of the types of messages contained on the Summary panel:

<INFO>
Informational message about the configuration or finish of an activity.
<STATUS>
Informational message about the progress of an activity. These messages are written after each phase of longer activities.
<WARNING>
Informs you about either a minor problem that was encountered (for example, a missing link in the source), or about the generated model (for example, diagrams do not have layout information). Warnings typically mean that you should either check the part of the model the warning refers to and validate the content, or that you have to perform a manual step in the tool after the import is finalized.
<ERROR>
A message that has a serious effect for the resulting model. A concept was not understood, the source could not be validated, or the source could not be opened.
<FATAL>
The import tool failed and was not able to create any result.

Required export steps

To start an export operation with InfoSphere Data Architect, select File > Export.

From the displayed list of export filters, select Data Model Export Wizard.

Selecting the parameters

The procedure to select the parameters for export is identical to the import procedure for Selecting the parameters.

Evaluating results

The procedure to evaluate results for export is identical to the import procedure for Evaluating results.


XML schema import example

This section provides an example for importing an XML schema. Start with the XML file in Listing 1.

Listing 1. Source XML schema
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="com.ibm.test.employee"
targetNamespace="com.ibm.test.employee">
  <xs:complexType name="DEPARTMENT">
    <xs:attribute name="DEPT_NBR" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="3" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="DEPT_NAME" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="29" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="MANAGER_ID">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="6" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="ADMR_DEPT_ID" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="3" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="LOCATION_NAME">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="16" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="EMPLOYEE">
    <xs:attribute name="EMP_NBR" use="required" type="xs:short">
    </xs:attribute>
    <xs:attribute name="FIRST_NAME" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="12" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="MID_INIT" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="LAST_NAME" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="15" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="WORK_DEPT_NBR">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="3" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="PHONE_NBR">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="4" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="HIRED_DATE" type="xs:date">
    </xs:attribute>
    <xs:attribute name="JOB_CLASS">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="8" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="ED_LEVEL" use="required" type="xs:short">
    </xs:attribute>
    <xs:attribute name="SEX_CLASS">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="BIRTH_DATE" type="xs:date">
    </xs:attribute>
    <xs:attribute name="CURRENT_SALARY">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="9" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="CURRENT_BONUS">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="9" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="CURRENT_COMM">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="9" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="EMPLOYEE_PROJECT">
    <xs:attribute name="EMP_NBR" use="required" type="xs:integer">
    </xs:attribute>
    <xs:attribute name="PROJ_NBR" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="6" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EMP_CHARGED_TIME">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="5" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EMP_START_DATE" type="xs:date">
    </xs:attribute>
    <xs:attribute name="EMP_END_DATE" type="xs:date">
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="PROJECT">
    <xs:attribute name="PROJ_NBR" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="6" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="Project_Name">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="5" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:element name="DEPARTMENT" type="DEPARTMENT">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="DEPARTMENT_PK">
      <xs:selector xpath=".//DEPARTMENT" />
      <xs:field xpath="@DEPT_NBR" />
    </xs:key>
  </xs:element>
  <xs:element name="EMPLOYEE" type="EMPLOYEE">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="EMPLOYEE_PK">
      <xs:selector xpath=".//EMPLOYEE" />
      <xs:field xpath="@EMP_NBR" />
    </xs:key>
  </xs:element>
  <xs:element name="EMPLOYEE_PROJECT" type="EMPLOYEE_PROJECT">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="EMP_ACT_PK">
      <xs:selector xpath=".//EMPLOYEE_PROJECT" />
      <xs:field xpath="@EMP_NBR" />
      <xs:field xpath="@PROJ_NBR" />
    </xs:key>
  </xs:element>
  <xs:element name="PROJECT" type="PROJECT">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="PROJECT_PK">
      <xs:selector xpath=".//PROJECT" />
      <xs:field xpath="@PROJ_NBR" />
    </xs:key>
  </xs:element>
</xs:schema>dddddw

To start the import operation, select File > Import.

From the displayed list of import filters, select Data Model Import Wizard, as shown in Figure 5.

Figure 5. Data model import wizard
Data model import wizard

As shown in Figure 6, from the Select the Model panel, select the XML Schema for the Model format, and define the import file as the Model. For the Target project, provide the location for the logical data model that will be created with the name employee1.

Figure 6. Define import parameters
Define import parameters

As shown in Figure 7, from the Select the Options panel accept all of the default options for importing the model.

Figure 7. Specify import options
Specify import options

As shown in Figure 8, the messages in the Summary panel confirm that the import operation was successful.

Figure 8. Evaluate resulting messages
Evaluate resulting messages

Figure 9 shows the resulting logical data model.

Figure 9. Resulting logical data model
Resulting logical data model

Logical data model export example

This section provides an example for exporting the logical data model shown in Figure 10. The logical data model contains four entities with several attributes. All attributes have assigned data types. There are also three different relationships between the entities.

Figure 10. Existing logical data model
Existing logical data model

To start the export operation, select File > Export.

From the displayed list of export filters, select Data Model Export Wizard, as shown in Figure 11.

Figure 11. Start the Data Model Export Wizard
Data model export wizard

As shown in Figure 12, from the Select the Model panel select W3C XSD as the Model format for the export.

Figure 12. Specify export parameters
Specify export parameters

As shown in Figure 13, from the Select the Options panel specify com.ibm.com.test.employee as the Target Namespace. Use the default values for all the other parameters.

Figure 13. Define export options
Define export options

As shown in Figure 14, the messages in the Summary panel confirm that the export operation was successful.

Figure 14. Evaluate export results
Data model export wizard

Listing 2 shows the XML schema that is the result of the export operation.

Listing 2. Resulting XML schema
<?xml version="1.0" encoding="utf-8"?>
<!-- This file was generated by W3C XML/XSD -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="com.ibm.com.test.employee"
targetNamespace="com.ibm.com.test.employee">
  <xs:complexType name="DEPARTMENT">
    <xs:sequence>
      <xs:element ref="EMPLOYEE" minOccurs="0" maxOccurs="1">
      </xs:element>
    </xs:sequence>
    <xs:attribute name="DEPT_NBR" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="3" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="DEPT_NAME" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="29" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="MANAGER_ID">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="6" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="ADMR_DEPT_ID" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="3" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="LOCATION_NAME">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="16" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="EMPLOYEE">
    <xs:sequence>
      <xs:element ref="EMPLOYEE_PROJECT" minOccurs="0" maxOccurs="1">
      </xs:element>
    </xs:sequence>
    <xs:attribute name="EMP_NBR" use="required" type="xs:short">
    </xs:attribute>
    <xs:attribute name="FIRST_NAME" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="12" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="MID_INIT" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="LAST_NAME" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="15" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="WORK_DEPT_NBR">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="3" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="PHONE_NBR">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="4" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="HIRED_DATE" type="xs:date">
    </xs:attribute>
    <xs:attribute name="JOB_CLASS">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="8" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="ED_LEVEL" use="required" type="xs:short">
    </xs:attribute>
    <xs:attribute name="SEX_CLASS">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="BIRTH_DATE" type="xs:date">
    </xs:attribute>
    <xs:attribute name="CURRENT_SALARY">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="9" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="CURRENT_BONUS">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="9" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="CURRENT_COMM">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="9" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="EMPLOYEE_PROJECT">
    <xs:attribute name="EMP_NBR" use="required" type="xs:integer">
    </xs:attribute>
    <xs:attribute name="PROJ_NBR" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="6" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EMP_CHARGED_TIME">
      <xs:simpleType>
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="5" />
          <xs:fractionDigits value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EMP_START_DATE" type="xs:date">
    </xs:attribute>
    <xs:attribute name="EMP_END_DATE" type="xs:date">
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="PROJECT">
    <xs:sequence>
      <xs:element ref="EMPLOYEE_PROJECT" minOccurs="0" maxOccurs="1">
      </xs:element>
    </xs:sequence>
    <xs:attribute name="PROJ_NBR" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="6" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="Project_Name">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="5" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:element name="DEPARTMENT" type="DEPARTMENT">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="DEPARTMENT_PK">
      <xs:selector xpath=".//DEPARTMENT" />
      <xs:field xpath="@DEPT_NBR" />
    </xs:key>
  </xs:element>
  <xs:element name="EMPLOYEE" type="EMPLOYEE">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="EMPLOYEE_PK">
      <xs:selector xpath=".//EMPLOYEE" />
      <xs:field xpath="@EMP_NBR" />
    </xs:key>
  </xs:element>
  <xs:element name="EMPLOYEE_PROJECT" type="EMPLOYEE_PROJECT">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="EMP_ACT_PK">
      <xs:selector xpath=".//EMPLOYEE_PROJECT" />
      <xs:field xpath="@EMP_NBR" />
      <xs:field xpath="@PROJ_NBR" />
    </xs:key>
  </xs:element>
  <xs:element name="PROJECT" type="PROJECT">
    <xs:annotation>
      <xs:documentation></xs:documentation>
    </xs:annotation>
    <xs:key name="PROJECT_PK">
      <xs:selector xpath=".//PROJECT" />
      <xs:field xpath="@PROJ_NBR" />
    </xs:key>
  </xs:element>
</xs:schema>

Summary

XML is the current standard for serialization of information. InfoSphere Data Architect enables you to serialize data models and to create data models from serialized information. This capability allows you to integrate InfoSphere Data Architect into your extended workflow. In addition to the import and export capabilities covered in this article, InfoSphere Data Architect provides additional functionality around XML, such as mappings, shredding, and editing of XML schemas. You can find more information about those functions in the product information pages.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Information management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, XML, Rational
ArticleID=517406
ArticleTitle=Using InfoSphere Data Architect to import and export data model XML
publish-date=09092010