Re: using association to map foreign keys



I was about to start looking for something like tedia2sql on the web when I saw your post, so thanks for saving me all the effort ... :)

Here's propably what you want to do ...

I only changed the direction of the second link (always draw the association from the one table through to the many table), then double click the line, give it a name (fk_{something}), give each role the field name on either side after completing the first name you can click apply to make sure the association is on the right side, the aggregation button means there's many at that end (the diamond).

There's also a sample diagram in the source package and a one pager html crash course on how to use tedia, it's worth the read.... some nice things in there.

Regards
J

On 5/6/06, Anthony Ettinger <aettinger sdsualumni org> wrote:
I posted the other day about using tedia2sql to generate sql that has
foreign key constraints in the generated sql. Dia .95 picked up my
primary keys, no problem, but nothing for foreign keys.

>From the tedia2sql page it says that it:
"Generates foreign key constraints using UML Associations"

This part I'm not doing correctly. My example diagram is from Dia .94
(that's all I could get my hands on at hte moment, as .95 isn't in
portage yet.

Hope that helps, if anyone can point me in the right direction I'd be
greatly appreciated.

ps - i need this for oracle, if that matters at all.

--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html
_______________________________________________
Dia-list mailing list
Dia-list gnome org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia


Attachment: foriegn-keys-new.dia
Description: application/dia-diagram



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]