Sarah Rushworth
Sarah Rushworth

Reputation: 823

Converting XSD file to UML Model

We have an application that generates a XSD file that represents database tables. I now need to convert the XSD in to a UML model. This will allow clients to change the model using a modelling tool (such as Magicdraw, RSA, Eclipse, ct) and then run another of our tools to generate other artifacts.

How can I convert from XSD to UML ?

We own MagicDraw so I was looking in to the Transformations functionality that should do this for me but for some reason I can't import the XSD, although it is valid. I'm also confused when it talks about XML Schemas and XMI format. How do these differ from my XSD file?

Thanks.

Sarah

Upvotes: 10

Views: 21576

Answers (3)

Raj Rao
Raj Rao

Reputation: 9138

The best tool that I have found for this purpose is the XML modelling tool. Its been a while since it was updated, but it works. I blogged about it at Modelling wsdl as uml

Upvotes: 3

UML GURU
UML GURU

Reputation: 1462

You can try to use the Eclipse Dali plugin which would generate a java code directly from your database. Once you get the code you can reverse into UML. From UML to database you could try to add java persistence annotations in your code coming from your UML class diagram. When you have the annotated code then try hibernate to create your database.

This would do the job but having multiple layers means that you loose tracability between your original data model and UML and back. This is called the pojo cycle.

Upvotes: -1

Jordi Cabot
Jordi Cabot

Reputation: 8208

There are some tools able to transform XML schemas into UML diagrams (see a list here, read the comments in the post) but the XML/XMI import of MagicDraw (and in general of any other UML tool) will not work in your schema since they expect a specific type of XML file (XMI format) which is the standard used to provide a XML-based definition of a UML model.

That is, XMI files are used to store UML models in XML and they follow a predefined XSD. In theory UML tools should be able to exchange UML models stored in XMI but unfortunately, this "model once open anywhere" is not true (but this is another story)

Upvotes: 0

Related Questions