Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert XSD into SQL relational tables

Is there something available that could help me convert a XSD into SQL relational tables? The XSD is rather big (in my world anyway) and I could save time and boring typing if something pushed me ahead rather than starting from scratch.

The XSD is here if you want to have a look. It's a standardized/localized format to exchange MSDS.

like image 221
rozon Avatar asked Dec 31 '08 16:12

rozon


People also ask

How can I create database tables from XSD files?

Open the XSD file added by double-clicking. Go to the toolbar and look Conversion. They select Create structure database from XML schema. Selects the data source.

What is XSD in SQL?

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/>

How do I convert XSD to XLS?

Go to MS Excel -> File -> Open . Select the xsd file. You will be prompted on how you would like to open the file. You can select the option 'As an XML table'.


1 Answers

Altova's XML Spy has a feature that will generate SQL DDL Script from an XSD file. XML Spy will cost you some money though.

Interestingly enough, a developer used a really clever trick of using an XSLT translation to create the DDL script from an XSD file. They have outlined it in two parts here and here.

I might have to try this out myself for future use...

EDIT: Just found this question asked previously here...

like image 135
Dillie-O Avatar answered Oct 13 '22 01:10

Dillie-O