Book a Demo

Author Topic: SQLSchema to XML Schema  (Read 3305 times)

lassesen

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
SQLSchema to XML Schema
« on: June 23, 2006, 10:20:41 am »
It may already be somewhere in the product
but  under Project/ Database Engineering , I would love to see 'Generate Xml Schema'.

I'm hitting several projects where artifact or reference systems are needing to re-engineered with XML being the franca-lingua for analysis (i.e. standards that wish to be conformed to is in XML Schemas).

Having everything in the same format(XML Schema) would greatly speed the process - Especially if it handles two pass, the first pass gets the data, then the ability to mark certain tables used for FK as enumerations.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: SQLSchema to XML Schema
« Reply #1 on: June 23, 2006, 11:19:54 am »
What about, from the main menu, Project / XML Schema / Generate XML Schema or Import XML Schema?
No, you can't have it!

lassesen

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: SQLSchema to XML Schema
« Reply #2 on: June 23, 2006, 12:12:48 pm »
What I see in the export is this:

<xs:complexType name="CONSTIT_ADDRESS_PHONES">
<xs:sequence>
<xs:element name="CONSTITADDRESSPHONESID" type="xs:int"/>
<xs:element name="CONSTITADDRESSID" type="xs:int"/>
<xs:element name="PHONESID" type="xs:int"/>
<xs:element name="SEQUENCE" type="xs:int"/>
<xs:element name="IMPORT_ID" type="xs:string"/>
<xs:element name="PK__CONSTIT_ADDRESS__75A278F5" type="CONSTIT_ADDRESS"/>
<xs:element name="PK__PHONES__1CFC3D38" type="PHONES"/>
</xs:sequence>
</xs:complexType>

The SQL is:

CREATE TABLE [CONSTIT_ADDRESS_PHONES] (
[CONSTITADDRESSPHONESID] [int] IDENTITY (1, 1) NOT NULL ,
[CONSTITADDRESSID] [int] NOT NULL ,
[PHONESID] [int] NOT NULL ,
[SEQUENCE] [int] NULL ,
[IMPORT_ID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
PRIMARY KEY  CLUSTERED
(
[CONSTITADDRESSPHONESID]
) WITH  FILLFACTOR = 90  ON [PRIMARY] ,
CONSTRAINT [FK_CONSTIT_ADDRESS_PHONES_1] FOREIGN KEY
(
[CONSTITADDRESSID]
) REFERENCES [CONSTIT_ADDRESS] (
[ID]
) ON DELETE CASCADE ,
CONSTRAINT [FK_CONSTIT_ADDRESS_PHONES_2] FOREIGN KEY
(
[PHONESID]
) REFERENCES [PHONES] (
[PHONESID]
)
) ON [PRIMARY]
GO

<xs:element name="PK__CONSTIT_ADDRESS__75A278F5" type="CONSTIT_ADDRESS"/>

does not capture...

[FK_CONSTIT_ADDRESS_PHONES_1] FOREIGN KEY
(
[CONSTITADDRESSID]
) REFERENCES [CONSTIT_ADDRESS] (
[ID]
) ON DELETE CASCADE