Index and naming suggestions

Hi there… I’ve been using TDM now for some time, and there are a couple things that it does not do that are causing me excessive amounts of time. Just wondering if they are hidden away where I can’t find them, or these could be features to add to new versions.

  1. Have a setting to auto-magically create indexes on tables for all FKs. I know that a few database types have this setting “Generate Index to Foreign Keys”, but I believe it’s a database-level setting, and not a model level thing. With MYSQL and MSSQL it’s not there, and guess what I use 99.999% of the time. I have to go back and create all of these indexes by hand.

  2. When creating a PK, index or relationship, is it possible to generate a semi-meaningful default name rather than “Key1”, “Relationship92” and “Index23”… A name that starts with the name of the table followed by a sequence number would be perfect. I.E. “MyTableKey1” and “MyTableIndex1” and “MyTable_MyOtherTable_reference1”

Thanks.

Hi,

I apologize for the delay. I missed this message somehow.

  1. It is possible to create a macro that will create indexes on selected objects. You can find some examples in the Library.
    http://modeling.inside.quest.com/kbcategory.jspa?categoryID=34

Here you can find example that shows how to iterate selected entities:
http://blogs.inside.quest.com/modeling/2010/11/09/run-macro-for-selected-entities-and-store-ddl-preview-to-files/

  1. See attached image. It shows how to use Default Values and Application Variables. Note: you have to restart TDM after you change default values.

I hope it helps,

Regards,

Vaclav

Message was edited by: vaclav

May I add a suggestion? I think I am in the right place also

Empower the %variables% usage adding: %owner_name:5%
The :5 means: take the first 5 letters of owner name…
Should not terribly complicated to implement… and of great value (for me for sure !!)

Hi,

nice idea. I added it to our system. Enhancement request #82577.

Regards,

Vaclav

One more related suggestion…

Be able to have some names (like relationship names and primary key names) to be able to listen to rename events from their parents.

For instance, I have the default relationship name = <%ParentTableName%>_<%ChildTableName%>.

If I rename one of the tables, the relationship name should change too. I currently have to remember to use a macro to do this before creating DDL.

This would be very helpful with the relationships on associative M:N entities. These always get named generically.

Thanks,
Jay

Hi Jay,

this kind of automatic update of the names after renaming the referred objects would ease the job and enhancement request CR 87646 shal address it.

Regards,
Lukas

Do you have more information on this setup / configuration?

I would like PK’s to default to tableName_pk, foreign keys to to tablename_fkx.

If I create a unique constraint I want it as tableName_akx etc.

thanks

jack

Hi,

in next version, there will be a set of new Macros and one of them will be for renaming primary keys. For other objects like constraints, you would need to write (or have written :-)) own Macro(s).

Regards,
Lukas