Can I simplify the generated DDL?

3 views
Skip to first unread message

sol

unread,
Feb 13, 2010, 9:30:18 AM2/13/10
to RISE
Hi,

I'm newbie with Rise Editor, just looking into the DDL generation
(using the "Generate Code to File" option, for MySQL):

a) In the "Drawing" tab, I created an Entity called "PRODUCT", with
attributes such as "NAME", "PRICE".
I was hoping to generate a simple corresponding DDL, something like:
drop table if exists PRODUCT
create table Product (NAME varchar(50), PRICE int)

b) I tried to achieve this through "Tools -> Generate Code to File".
Unfortunately, the resulting DDL is quite complex...
I appreciate the reasons for this complexity (avoiding duplicates, not
hurting existing data when refactoring, etc).
But is there an option for generating simpler code, even if "less
professional" and less "foolproof"?
We're willing to take the chance (since we're mainly concerned with
first-time table generation, not maintenance; and readability is
important as we'd like to pass it through a human DBA).

Thanks a lot.

Joar Swenning

unread,
Feb 24, 2010, 4:37:50 AM2/24/10
to RISE
Hi,
If keeping track of the evolution of the model is not a concern and
you have no data in it you could use the refactor function before code
generation. You will find this under File | Refactor Model.

Keeping track of the evolution has many advantages such as for
example, being able to differentiate between on the one hand; changing
an entity name (e.g. "automobile" to "car") and on the other; deleting
an entity (e.g. "automobile") and adding another ("car") without
loosing data.

If you do refactor your model, you will actually get a new one with an
evolution which is a short track to the present state of the model so
it should be the simplest possible one containing all the changes you
have made from start to present.

Just be aware that it has no longer any "recollection" of e.g. earlier
names et c. so it is NOT an option when updating an already set up
solution of importance!

Also, when generating using the SQL Server (TSQL) code generator you
can change the following SQL code settings:
ignoreRISE from False to True
installRISE from True to False
setupModel from True to False


Best regards,
Joar

sol

unread,
Feb 26, 2010, 4:39:38 AM2/26/10
to RISE
Thanks very much)
Reply all
Reply to author
Forward
0 new messages