XSD to MySQL Schema - mysql

I need to convert an XML to a MySQL DB Schema.
I have been able to generate the XSD from the XML. Now i want to use the XSD to generate the DB schema in MySQL or PostgreSQL. Can anyone tell me how can i do this or point to any tools which i can use for this?

There is a command-line tool called XSD2DB, that generates database from xsd-files, available at sourceforge.
For more info: please refer to this existing question How can I create database tables from XSD files?

Related

create shema databse using XSD in mysql

I have a shema database in file type XSD this file contains descriptions of all tables.
My question is how I can use this file to create a database in MySQL. if you have suggestions for creating a database in MySQL using this file or converting XSD to SQL, thank you in advance.

Verify XML field with MySQL and XSD file

I looked in the MySQL documentation but I didn't find an answer to my question :
I would like to know if MySQL could "check" if a field filled with XML is well formed.
Of course I would give to MySQL a XSD to verify the XML and I will use Spring MVC to manage the server's side of things.
I know it is not something I should do BUT I HAVE to do this in a school project.
rXp
No, MySQL does not provide build-in functions for that. You have to query the document out of the database and use your programming language of choice to validate the XML document against a XSD.

How to create a Mondrian schema (xx.mondrian.xml) for MySQL data base

I am going to customise Saiku analysis tool for my local MySQL data base. For that I have to change the their existing data source as following manner,
type=OLAP
name=steelwheels
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:mysql://localhost/sampledata; \>Catalog=../webapps/saiku/steelwheels/steelwheels.mondrian.xml;JdbcDrivers=com.mysql.jdbc.Driver;
username=dbuser
password=password
According to above code, can any one please tell me how I generate Mondrian schema file called steelwheels.mondrian.xml with MySQL data base sampledata
Thanks
Download and open PSW or Pentaho Schema Workbench which can be found as part of the mondrian project on sourceforge.
This is going away with Mondrian4, but thats ages away at the moment.
If you are using Pentaho BI server then its really easy to create *.mondrian.xml file for your datasource using Pentaho User Console it will be easy to create and edit datasource and just use *.mondrian.xml file created under /biserver-ce/pentaho-solutions/admin/resources/metadata/.
I use that in my regular practice. It will be effective even if you dont use pentaho for your whole application but just use pentaho user console for this purpose.
At this moment my best solution is to use the data source wizard to create a new analysis, export it manually and edit it by hand in your favorite xml editor. (Example Notepad++ with XMLTools plugin).
Sadly it works better than using the old Pentaho Schema Workbench. You may try to create a DTD to validate the structure of XML against the schema. See the official documentation.
Maybe the Enterprise version has better tools to edit it.

Generating xml from mysql database using JSP

I want to generate xml from database using JSP. I found a link which generate xml file from a form but i want to genarate it using mysql database.
The only way you can generate XML from a MySQL database is by writing a stored procedure. There an interesting article here that shows how it can be done.

Is it possible to export MySQL schema to XML?

With MySQL I can:
export data to XML
export data and/or schema to SQL
But I can't export table schema to XML. Is there some sort of pre-built mechanism or do I have to make that manually (iterating thru "show tables" and then parsing "show columns for tablexxx" ?
EDIT: No tools wanted, just mysql syntax (must dynamically run from my server code)
I don't know of a built-in feature for mysql to do this but you can look at phpmyadmin it can do the export to xml.
I didn't find such thing, so I assume no, it isn't. Feel free to correct me if I am wrong.