An XML schema is a document or a set of documents that defines the structure and legal elements of the XML file. XML schemas can be used to ensure that an XML file is syntactically correct and conforms to the defined schema. This product provides such a schema and uses the schema to validate XML files when they are opened in the tool.
The XML schema in this product is comprised of five files that are stored in the \Doc directory after installation. The following list describes these files:
This is the top level schema. It imports from UDP.xsd, EMX.xsd, and EM2.xsd. Its namespace is http://www.erwin.com/dm.
Contains the schema for UDP definitions. Its namespace is http://www.erwin.com/dm/metadata.
Contains the schema for object hierarchy (EMX). It includes EMXProps.xsd. Its namespace is http://www.erwin.com/dm/data.
Contains the schema for non-transactional data (EM2). Its namespace is http://www.erwin.com/dm/EM2data.
Contains the schema for object properties and UDP instances. Its namespace is http://www.erwin.com/dm/data.
The schema files under the \Doc directory are not database specific and represent the entire metamodel. The schema contains all possible objects and properties for all valid database targets. If you need a database specific schema, those files are located in the Doc\DBMS_schemas directory. Within the Doc\DBMS_schemas directory, there is a folder for each target database that this product supports. The database specific schema files are stored in that folder and only consist of objects and properties that are valid for the given database target.
Note: The XML schema located in the \Doc directory is always used when an XML file is being validated, not a database specific schema. The database specific schemas are provided for documentation purposes and to assist third party tool integrators to determine the valid objects and properties for a given database target. An external XML validation tool can be used to validate an XML file against a database specific schema.
When you save a model in XML format, the XML output is structured according to the markup declarations defined in the r7 XML Schema. It is not necessary to understand every aspect of the r7 XML markup, but understanding some aspects of the XML Schema will enable you to use the XML output more easily. For example, you can quickly review the children of the Model element in your XML output to identify the model type, target server, and DBMS version.
The following excerpt from the r7 XML Schema defines the element Model as well as its child element ModelEnvProps:
- <xs:element name="Model">
- <xs:complexType>
- <xs:all>
- <xs:element minOccurs="1" maxOccurs="1" name="ModelEnvProps">
- <xs:complexType>
- <xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="Locator" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Disposition" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Persistence_Unit_Id" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Model_Id" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Model_Type" type="xs:nonNegativeInteger" />
<xs:element minOccurs="0" maxOccurs="1" name="Active_Model" type="xs:integer" />
<xs:element minOccurs="0" maxOccurs="1" name="Hidden_Model" type="xs:integer" />
<xs:element minOccurs="0" maxOccurs="1" name="Storage_Format" type="xs:integer" />
<xs:element minOccurs="0" maxOccurs="1" name="Target_Server" type="xs:integer" />
<xs:element minOccurs="0" maxOccurs="1" name="Target_Server_Version" type="xs:integer" />
<xs:element minOccurs="0" maxOccurs="1" name="Target_Server_Minor_Version" type="xs:integer" />
</xs:all>
</xs:complexType>
</xs:element>
Each attribute can receive a value in the tagged data. For example, the following XML output is generated for a Physical model with Oracle 10g assigned as the Target DBMS:
<EMX:Model id="{27E38352-ABCC-4793-AC53-DD79F8FA490E}+00000000" name="Model_1" xmlns="
http://www.ca.com/erwin/data">
<ModelEnvProps>
<Locator>erwin://C:\Oracle.xml</Locator>
<Disposition>Read Only = Yes;</Disposition>
<Persistence_Unit_Id>{E74F3A15-3FC9-4581-8B4E-6C57AF948DAA}+00000000</Persistence_Unit_Id>
<Model_Type>3</Model_Type>
<Target_Server>1075858979</Target_Server>
<Target_Server_Version>10</Target_Server_Version>
<Target_Server_Minor_Version>0</Target_Server_Minor_Version>
<Active_Model>-1</Active_Model>
<Hidden_Model>0</Hidden_Model>
<Storage_Format>4012</Storage_Format>
</ModelEnvProps>
Unique numeric values are used for each attribute, as illustrated in the following summary tables.
Model_Type table
Value |
Model Type |
1 |
logical model |
2 |
physical model |
3 |
logical/physical model |
Target_Server table
Database |
Target_Server Value |
Target_Server Version Value |
Target_Server_Minor_Version Value |
DB2 LUW 9.5 |
1075858977 |
9 |
5 |
DB2 for LUW 9.7/10.x |
1075858977 |
9 |
7 |
DB2 z/OS 8.1 |
1075858978 |
8 |
1 |
DB2 z/OS 9.1/10/11 |
1075858978 |
9 |
1 |
Hive 2.1.x |
1075859187 |
2 |
1 |
Informix 10.x/11.x/12.x |
1075859006 |
9 |
2 |
DB2 for i 5.x/6.x/7.x |
1075859019 |
4 |
0 |
MySQL 5.x |
1075859129 |
5 |
0 |
ODBC/Generic 2.0 |
1075859009 |
2 |
0 |
ODBC/Generic 3.0 |
1075859009 |
3 |
0 |
Oracle 10g |
1075858979 |
10 |
0 |
Oracle 11g/12c |
1075858979 |
11 |
0 |
PostgreSQL 9.6 |
1075918977 |
9 |
6 |
Progress 9.x/10.x/11.x |
1075859010 |
9 |
0 |
SAS |
1075859013 |
1 |
0 |
SQL Server 2008 |
1075859016 |
10 |
0 |
SQL Server 2012 |
1075859016 |
11 |
0 |
SQL Server 2014 |
1075859016 |
12 |
0 |
SQL Server 2016 |
1075859016 |
13 |
0 |
SQL Azure |
1075859016 |
10 |
25 |
SAP ASE 15.x/16 |
1075859017 |
12 |
5 |
SAP IQ 15.x/16 |
1075859017 |
15 |
0 |
Teradata 14.10 |
1075859018 |
14 |
10 |
Teradata 15..x |
1075859018 |
15 |
0 |
Caution: You should be careful not to modify any of the values for the Target_Server, Target_Server_Version, or Target_Server_Minor_Version tags. If you do so, this product may be unable to open the file again.
Copyright © 2017 erwin Inc.
All rights reserved.
|
|