[Uml-user] uml & sql

Balazs Miklos mbalazs at net23.hu
Mon Oct 25 08:35:03 UTC 2004


Hello,

I'm new to UML, and I decided to play with it a little bit, and I have
some questions. Sorry if they are too obvious, but I haven't found any
answers on these.

So, as a first step, I would like to design some SQL tables with UML, but
I've ran into some difficulties:

1. How can I correctly enter SQL data types? For example, if I want to
   represent a VARCHAR(100) type column in UML, what type should I give
   for the respective attribute? If I enter the size of the field in
   parantheses, it will treat VARCHAR(30) and VARCHAR(100) as different
   types, for example. IMHO the logical solution would be to enter only
   VARCHAR as the attribute's type, and give the size parameter somewhere
   else. But where?

2. How do I define PRIMARY KEYs / FOREIGN KEYs?

I think that, since UML isn't strictly specific, there could be several
practical solutions for this problem. I would like to see one which works
with umbrello's code generator.

The best thing would me if someone could send me an UML model of a small
relational database with 2-3 tables, just to see how it stands together.

Thanks in advance,
Balazs Miklos.





More information about the umbrello mailing list