[NBLUG/talk] DIA

Eric Eisenhart eric at nblug.org
Thu Aug 21 09:27:00 PDT 2003


On Wed, Aug 20, 2003 at 11:37:56PM -0700, Dave Sisley wrote:
> My experience with DIA is very limited: I used it for creating ER
> diagrams for the database class at SSU.  (All the other kids, with their
> scribbly pencil diagrams, were green with envy, of course <smiley>).

I did something very similar, but using the UML syntax for database table
relationships, and for other UML diagrams used while discussing how a
particularly complicated process would function.  Use "dia2sql" (or was it
dia2code --sql?) I was able to convert the UML diagrams of my database
structure directly into SQL appropriate for creating the tables.  I still
had to tweak the SQL a bit to put in the correct indexes on a few things,
but it did the bulk of the work for me.  There's "dia2code" that can convert
UML class diagrams into C++ or Java stubs.

The reason these things can exist is that dia's format is XML-based.  Do a
"zcat file.dia | less" and you'll see.  To parse for the kind of data you'd
use to generate code, you just have to ignore the positioning, size and
color attributes.
-- 
Eric Eisenhart
NBLUG Co-Founder & President Pro Tempore
The North Bay Linux Users Group
http://nblug.org/
eric at nblug.org, IRC: Freiheit at freenode, AIM: falschfreiheit, ICQ: 48217244



More information about the talk mailing list