views:

36

answers:

1

I am looking for a tool which would generate entity relationship diagram based on simple ascii syntax.

Syntax could be something like:

thing1 <-> thing2
thing3 <->> thing4
thing5 <<-> thing2
thing1 <<->> thing5

Where:

<-> is one to one
<->> is one to many
<<->> is many to many

Or anything similar.

There should be this kind of tool, I think there was at least a website, which provided this functionality, but I have lost the link.

About Graphviz alternative approach:

If someone wants to quickly try out, here is a sample file, dw.dot:

graph G {
overlap=false;
node [shape=box];

grandparent -- parent;
parent -- child;
}

On windows you get dw.png graphic file by:

neato.exe -Tpng dw.dot -o dw.png

A: 

Check out Graphviz for free software, source and whitepapers documenting the algorithms used. It does precisely this.

moonshadow
Graphviz looks like a general graph drawing utility with felxibility, but it doesn't seem to provide ready solution for this specific need of ER-diagrams. ER-diagrams should be supported both on level on syntax and visualisation. For example, there should be clear indicator in diagram of many-to-many relationship.Graphviz looks like it possibly could do the job, but I would need at least one day to learn to use it with sufficient fluency.
Habitagethrenarychron
Tried that Graphviz out. It draws diagrams, but there is overlapping lines and it doesn't understand "1:N" etc relations. It kind of works, but the quality of diagram isn't suitable for the documentation purposes. Or alternatively, it would require quite a lot of tweaking of source file to get things work out. But even if there would not be overlapping lines, Graphviz doesn't seem to know how to draw "beautifully" those lines, where to put those.
Habitagethrenarychron