SQL code generation

Use this forum for general discussion.

SQL code generation

Postby toblerone » Sun Mar 28, 2004 9:27 pm

Is it normal that a *--* association doesn't create a new table in the sql script ? Must I create these intermediate tables between all *--* associations ? It can't be generated automatically ?
Thanks
Fabienne
toblerone
 
Posts: 6
Joined: Sun Mar 28, 2004 9:22 pm

Re: SQL code generation

Postby [gw] Mark Michaelis » Mon Mar 29, 2004 9:25 am

In Poseidon 2.x an SQL-file is generated for every table. So to create tables you have to execute each single created SQL-file (or merge all of them before executing them).

The associations are created as reference-ids.

But what do you mean by "--" association? An association with visibility private at both ends? In this case I won't expect a reference to be generated.

Best Regards
Mark
Mark Michaelis
[gw] Mark Michaelis
 
Posts: 145
Joined: Thu Oct 02, 2003 10:08 am
Location: Germany, Hamburg

Re: SQL code generation

Postby Guest » Mon Mar 29, 2004 11:00 am

Mark,

In my question in tis forum,I think about an association with the * multiplicity at both ends, between 2 entities.
When generating the SQL script for this 3 elements (2 entities + 1 association with * at both ends), I'm waiting for 3 tables: 1 per each entity + one for the association, with identifiers of the 2 others tables ...

But, when I generate the SQL script, I obtain the "create table" only for the 2 entities ...
Is there something to do to generate atomatically the table resulting from the "*-*" association ?

Thanks
Guest
 

Re: SQL code generation

Postby [gw] Mark Michaelis » Tue Mar 30, 2004 8:14 am

Although it would be nice, to have a mapping table automatically generated for this case (and I added this behavior to our wishlist) I would especially expect that the following would and should work:

Create an association class that links these two tables. Then the table generated for this association class should be the mapping...

Well, but currently this does not work due to a bug I took into our database. As soon as this bug is solved I would try it again with this association class, especially because the java-code-generation already shows the correct behavior for this case.

Meanwhile, as workaround you might create an extra (normal) class for the association. The bad thing about it is, that you can only navigate from this association class to the other classes but not the other way round. But for SQL-queries this might be enough. An example is attached.

Best Regards
Mark
Mark Michaelis
[gw] Mark Michaelis
 
Posts: 145
Joined: Thu Oct 02, 2003 10:08 am
Location: Germany, Hamburg

Re: SQL code generation

Postby toblerone » Tue Mar 30, 2004 9:58 am

Thanks
Fabienne
toblerone
 
Posts: 6
Joined: Sun Mar 28, 2004 9:22 pm

Postby zlatan24 » Fri Oct 30, 2009 11:53 pm

Once I worked with sql files and after I saw that it was deleted no one knows how.But to my surprise the friend advised me-any way to extract the tables from .mdf file of sql server 2005....Tool solved my issues in seconds for free and furthermore utility helped my other friend either.
zlatan24
 
Posts: 1
Joined: Fri Oct 30, 2009 11:51 pm


Return to Poseidon for UML - Older Versions

Who is online

Users browsing this forum: No registered users and 0 guests