[JBoss JIRA] Created: (TEIIDDES-191) XSD as Relational importer has problems with child elements with many parents
by Greg Haber (JIRA)
XSD as Relational importer has problems with child elements with many parents
-----------------------------------------------------------------------------
Key: TEIIDDES-191
URL: https://jira.jboss.org/jira/browse/TEIIDDES-191
Project: Teiid Designer
Issue Type: Bug
Components: Import/Export
Affects Versions: 6.0.0
Environment: Teiid Designer 6.0.0 official (14 May 2009) release
Reporter: Greg Haber
Attachments: address.xsd, person.xsd, person2.xml, person2.xsd
I've encountered a lot of problems with the Teiid Designer XML as Relational Importer (and with its legacy ancestor) dealing with importing XSDs where a child element has multiple parents. The importer currently treats all elements throughout the XSD that have the same name and type as the same, and so models that element(s) as a single table with multiple parents, if the number of parents is above a configurable number (currently defaults to 3).
Which is all well and good in theory, but in practice it seems to hit a number of problems
1) During the import process, if the selection of document root elements is left at the default, not all needed tables are generated. See person.xsd example attached.
2) If all possible root elements are selected, it looks mostly right, but there are often extra elements in the child tables (again try with person.xsd). Plus, the tables don't actually work at runtime correctly (try using attached person2.xml as the data source - notice that you can only get to the spouse's father from Person, not to their own father).
I've also attached some other example problem XSDs - person2.xsd, and address.xsd
Now, in some cases a reasonable workaround is to up the number of allowed parents parameter, so that everything gets folded into a single table. But that isn't a general solution, as it doesn't work with things like person2.xsd.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months
[JBoss JIRA] (TEIIDDES-1211) Exporting DDL for Postgres produces invalid CREATE INDEX statement because duplicate object names in database
by Van Halbert (JIRA)
Van Halbert created TEIIDDES-1211:
-------------------------------------
Summary: Exporting DDL for Postgres produces invalid CREATE INDEX statement because duplicate object names in database
Key: TEIIDDES-1211
URL: https://issues.jboss.org/browse/TEIIDDES-1211
Project: Teiid Designer
Issue Type: Bug
Components: Import/Export
Affects Versions: 7.4.2
Reporter: Van Halbert
Attachments: tpc_postgres.ddl
Trying to execute DDL on postgres database produces this error:
Error: ERROR: relation "orders" already exists
SQLState: 42P07
ErrorCode: 0
Error occured in:
CREATE INDEX ORDERS ON ORDERS (O_CUSTKEY)
----
The problem was resolved if I changed ORDERS index name:
CREATE INDEX ORDERS ON ORDERS (O_CUSTKEY);
----
Here's a statement I found on the Postgres Naming rules:
The names of all objects must be unique within some scope. Every database must have a unique name; the name of a schema must be unique within the scope of a single database, the name of a table must be unique within the scope of a single schema, and column names must be unique within a table. The name of an index must be unique within a database.
I would like to suggest that all index names that are created are appended with "idx" or something similar. Right now, the first looks to be the name of the table, and subsequent names have 1,2, etc. appended.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 11 months