Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


graphml to sql generator

0 votes

Ok this is a MUST have, basically me and every professional I have come across loves the fact that we can first model our database clearly and logically in yEd (great product), but what would make it awesome would be the ability to then generate SQL create/alter statements from saved graphml files.

You can even make id or tablename_id names in to primary key or forgian keys.

and you can make it for different databases like mysql, sqlite, postgres and oracle.

An update of this feature would be to generate code for nosql databases such as mongodb, orientdb and couchdb.

Just think of it, you can document your db, create it, alter the document, save it as a new version and then instantly alter the actual db.

in Feature Requests by (120 points)
you might want to add a data-type to the attribute node, so you know which data-type to use when making the sql, also if the user uses the generalization arrow, you can use it to show inheritance.

1 Answer

0 votes

yEd stores its data in GraphML format, which is just another XML grammar. That means that you could use XSLT to simplify your GraphML file, for example to remove all the graphical attributes, and simply keep the useful data. Then you could probably write another XSL to transform your simplified GraphML file to SQL.

I guess yWorks expects you to develop this by using yWorks for Java API but the selling price is just crazy :

by (600 points)
We don't expect anything like that. As you correctly pointed out, this can be done easily by processing the resulting GraphML file with regular XML techniques. Since you're free to do with your yEd-generated files whatever you like there's no need to use the commercial yFiles library for this task.

On the other hand, if you're interested in developing an integrated tool with a nice GUI for a commercial environment, where saving of time is also saving of money, the yFiles library may be worth consideration.
Hi Michael,

Where I would differ is in the "can be done easily". yEd generates large GraphML files because they contain both "structure" and "layout", whereas programmers want only the "structure" part.

So if yFiles is not about this, then why not add a "Save only structure as XML" option to yEd? This way, programmers could do something with a very light structure of their graphs. I would be perfectly happy if I could get a clean file containing only nodes, relations, groups and texts.

Maybe I should make this a new request.

EDIT : I created this as a new request :
Legal Disclosure | Privacy Policy