IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Advice on Create DB Structure from XML Schema Options · View
chuckp
Posted: Tuesday, February 4, 2014 9:45:01 PM
Rank: Newbie

Joined: 5/16/2012
Posts: 8
Location: US
Hello,

I have been using XMLSPY for the past several years and thought I was an average user as far as experience . I am using the most current version of XMLSPY 2014 sp1 Enterprise edition. Looking for advice on a problem.

When I perform, "Create DB Structure from XML Schema” to a SQL 2008r2 database, no foreign key placeholders (names) are created. In the past I thought XMLSPY created what it determined was each possible foreign Key place holder (FK_tabelName) not the actual foreign key at the database level. In the table structure the only option I can select is the “Tables without relations”. I cannot select “Tables with Foreign Keys”. When I click on relationships tab it shows the Foreign Key names and table and names. Did something change in this version? How can this be corrected?

Thank you
Rachitha
Posted: Friday, October 17, 2014 7:51:02 AM
Rank: Newbie

Joined: 10/17/2014
Posts: 1
Location: Bangalore
Hello,

I am facing a similar problem while using Altova XMLSpy 2015 Enterprise Edition.

Below is a sample xsd I have created. Two tables Company and Employee where employee's company Id is mapped to the Company Id. I do a JDBC connection to database MySQL 5.0 and use the "Create DB structure from Xml Schema". The tables are created but no foreign keys or primary keys appear.

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Database">
<xs:complexType>
<xs:sequence>
<xs:element name="COMPANY">
<xs:complexType>
<xs:sequence>
<xs:element name="EMPLOYEE">
<xs:complexType>
<xs:attribute name="EMPLOYEEID" type="xs:int">
</xs:attribute>
<xs:attribute name="EMPLOYEENAME" type="xs:string">
</xs:attribute>
<xs:attribute name="EMPLOYEECOMPANYID" type="xs:int">
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="COMPANYID" type="xs:int">
</xs:attribute>
<xs:attribute name="COMPANYNAME" type="xs:string">
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:key name="COMPANY_PRIMARY_KEY">
<xs:selector xpath="COMPANY"/>
<xs:field xpath="@COMPANYID"/>
</xs:key>
<xs:key name="EMPLOYEE_FOREIGN_KEY">
<xs:selector xpath="COMPANY/EMPLOYEE"/>
<xs:field xpath="@EMPLOYEEID"/>
<xs:field xpath="@EMPLOYEECOMPANYID"/>
</xs:key>
</xs:element>
</xs:schema>

Let me know if I am missing any configuration setting to get this. It would be of great help.

Thank you.

Regards,
Rachitha
jnicholas330
Posted: Tuesday, December 23, 2014 5:19:04 PM
Rank: Newbie

Joined: 12/23/2014
Posts: 1
I am also having this problem, does anyone have a solution to this?
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.