Foreign Key names #3

I wanted to know if there is a way to control the naming convention of
foreign keys in power designer, while generating a PDM from CDM.

Thnx

Javed Rahman
javed_r@hotmail.com
�

0
xxxx
11/18/1999 7:15:13 PM
sybase.powerdesigner.general 9408 articles. 1 followers. Follow

1 Replies
449 Views

Similar Articles

[PageSpeed] 22

You can change this in the DEF file for the target database you are
selecting.  Find the file and open it in an editor.  You should find a block
that looks like this:
#  Constraint name template for Primary Keys
PKConstraintName = PK_%.U27:TABLE%

#  Constraint name template for Foreign Keys
FKConstraintName = FK_%.U8:CHILD%_%.U9:REFR%_%.U8:PARENT%

#  Constraint name template for Alternate Keys
AKConstraintName = AK_%.U18:AKEY%_%.U8:TABLE%

#  Constraint name template for Check of Column
CKCConstraintName = CKC_%.U17:COLN%_%.U8:TABLE%

#  Constraint name template for Check of Table
CKTConstraintName = CKT_%.U26:TABLE%

You can change the template however you want.  You will want to make a
backup of the original file of course, then save the changes.  When you
generate the PDM next, you will see the changes.

Hope this helps (HTH).

--

Michael F. Nicewarner [TeamSybase]
mailto:mike.nicewarner@ibpinc.com
http://www.datamodel.org


xxxx <xxxx@xxx.com> wrote in message news:38345041.E852060F@xxx.com...
> I wanted to know if there is a way to control the naming convention of
> foreign keys in power designer, while generating a PDM from CDM.
>
> Thnx
>
> Javed Rahman
> javed_r@hotmail.com
>
>


0
Michael
11/19/1999 3:58:27 PM
Reply:

Similar Artilces:

PowerDesigner
okay this is the issue When you generate the PDM from the CDM, PowerDesigner generates, using its own naming convention, the foreign key column that is placed in the physical model table - we want to have control over this column name ie: we want this foreign key column to be called f_key in our physical table. Please note we are not talking about FK/PKconstraints names etc, we are talking about the actual column name of the foreign key. We have searched through the definition file and cannot find where its being set. Or is this not possible to control in PowerDesigner and you have ...

Attempt to over-write foreign key column "Code" where table A has 3 foreign keys to table X
Generating from CDM to Logical. PD 9.5.2.889 This is a weird one - 4 tables in my model have more than one foreign key reference to table COROrg. By default a foreign ket to COROrg generates as COROrgKy. I have renamed the other foreign keys appropriately - e.g. COROrgKyEmpGrp. After the rename when I generate from CDM to Logical everything's fine for all but on of the foreign key columns (i.e. the new name/code are maintained in all but one). The list of changes to happen (obtained from Merge dialog -> Merge Preview) says it's going to 'Modify Column "...

foreign key error during upgrade 3.0.3 -> 3.4.4
Hello, I'm upgrading our bugzilla system from 3.0.3 to 3.4.4 running on Fedora 12. Our MySQL bugs database also needs the UTF-8 conversion. Near the end, checksetup.pl quits with the following error : Adding foreign key: whine_queries.eventid -> whine_events.id... DBD::mysql::db do failed: Can't create table 'bugs.#sql-130a_11' (errno: 150) [for Statement "ALTER TABLE whine_queries ADD CONSTRAINT fk_whine_queries_eventid_whine_events_id FOREIGN KEY (eventid) REFERENCES whine_events(id) ON UPDATE CASCADE ON DELETE CASCADE"] at ...

Upgrade 3.2 -> 3.4: problems with foreign keys
As I mentioned the other day, I'm trying to upgrade us stepwise, 3.0 -> 3.2 -> 3.4 -> 3.6 -> 4.0. (My theory is that smaller steps should be less painful upgrades, especially when merging our customizations with Bugzilla changes.) First, if this is a dumb way to upgrade, please let me know. I've been beating my head against a schema upgrade problem going from 3.2 -> 3.4, and perhaps there is a better way: e.g. 3.0 -> 3.4, or 3.2 -> 3.6? Second, I'm getting two problems adding foreign key constraints. 1) inconsistent types: Adding foreign ...

Foreign key name
Hi all, I am using PD 11 . The scenario is: when I create two relations between 2 tables (one with role name and the other without role name) then generate the physical model, and use the %PROLE% as FK column name . when the model generates , one FK gest the role name and the others that hadn't role gest the table name as FK. I want to change the default of tabel name to column name is there any one that knows the solotion? regards, The default behavior is for the parent table column name to be used as the FK column. The columns from the first reference should be the ...

Name of foreign key
Hello ! I am working on a program we bought. The previous developpers used PowerAMC and I can't find where they precised the way to name foreign keys. Exemple : if the table "Bill" has a reference to the table "Supplier", when I generate the MPD, the reference is converted this way in the table BILL : ID_SUPPLIER. I want to know where "ID_%TABLE%" is defined ? Otherwise, is it possible for certain foreign keys to define in the MCD the name they will have in the MPD ? Exemple : I have an other table where I want one foreign_key to have a special n...

Foreign Key Names
I can't seem to figure out where to set the Foreign Key Naming convention. As I generate from a CDM to PDM how do I take control of how relationships are migrated and named. and, what documentation should I read to get a better handle on this? OK, you do not have any control over the default foreign key names in the initial CDM -> PDM generation. However, after you change it in the PDM, the next time you generate PD will abide by your names. -- Michael F. Nicewarner [TeamSybase] psyclo@datamodel.org http://www.datamodel.org "Coy Lay" <coy.lay@acm.c...

Name Of Foreign Key
I'm using SQL Any50, ORACLE, and SQL Server 6.5 with a PB 6.0 Application. I'm looking for a solution to get the name of the Foreign Key, for some Table of my application. Is there someone who know where i can find it in the system table ? Thank's ETIENNE St�phan Steph -- In Oracle, you need to look at either the ALL_CONSTRAINTS or the USER_CONSTRAINTS view. In SQL Server 6.5, you would look at the SYSREFERENCES table. I'm not sure where you'd look in SQL Anywhere. HTH Ron Gallagher, CPDP Atlanta, GA rongallagher@mindspring.com Steph w...

Table design question (to foreign key or not to foreign key)
Our application is a message board and is full of messages, threads, and forums. A message is an individual entry (like the one I'm typing now ;)). Our software gives the user the ability to upload a single file attachment to each message. I can think of a couple different ways to design the two tables: message( messageid numeric identity, attachmentid numeric null, messagetext text, other, message, stuff... ) attachment( attachmentid numeric identity, title varchar, other, stuff ) or message( messageid, messagetext text, other, stuff ) attachment( messageid numeric foreig...

Naming foreign keys PD9
I would like to change the standard way of naming the foreign keys in the PDM. In the DBMS definition, I change ConstName (Script->Objects->Reference->ConstName) and it works: FK_%CHILD%_%PARENT% leads to the name FK_CHILDTABLE_PARENTTABLE Now, I would like to include the name of the referenced parent primary key column (in this particular model, there is always only one column referenced), but FK_%CHILD%_%PARENT%_%PKEYCOLUMNS% yields FK_CHILDTABLE_PARENTTABLE_ I've tried almost all variables listed in the PDM reference guide, but I don't get there...

Foreign key names #2
Hi all, I like to have all my foreign key names set to FK_%PARENT%_%CHILD% so that I have an idea of what the link is. When I set this up in Rebuild Indexes, I get sporadic parent and child table names. For example, I have 3 tables Template, Customer & Store. When I set up an FK between Template (child) and Customer (parent) I get FK_CUSTOMER_STORE. Sure enough there is an FK between Customer & Store but why is it being referenced ? OK, are you wanting to control the names of indexes or foreign key constraints? FK Indexes: You can't use %PARENT% or %CHILD%...

Multiple Foreign Key names
Hi all, PD15 EBF7 Table A B C Column a pk a pk a fk1, fk2 aa b c aaa c d A and C are linked by reference D. B and C are linked by reference E. I can see that fk1, fk2 are displayed in C table. I hope that fk is only displayed in C table. TIA Robert, I am not sure I understand what you need to see. When you fold a foreign key like you have with column a in table C, it is important to know it is a foreign...

Naming of foreign keys in the PDM
When I have relationships between two tables, I cannot influence the name of the foreign key field which is generated. Example: I have two tables: customer, user I have two user references in the customer table, the user who manages the customer and the user who created the customer record. When I generate the PDM I always get the field names "id_user" and "id_user2" which are not really useful. I would prefer "managing_user" and "creation_user". Is there a way to influence these names? Regards, Martin -- Martin Matt Neudorfstr...

Powerdesigner foreign key trouble
Hi, I have a problem in a CDM with the link among the table that become a problem in the PDM. By example, I have to connect tre entity with relation one-many and in every entity I have the same attribute, ex. CODE. If I have to connect two entity to the third entity, but powerdesigner on the conversion from CDM to PDM inserts yhe attribute CODE from every entity on the third part and translate the CODE to %TABLE_NAME%_CODE. I would to be one only CODE on the third entity and the code of any contraints to be ...reference to only parent code. Can anyone help me ? (sorry for my poo...

Web resources about - Foreign Key names #3 - sybase.powerdesigner.general

Ministry of Foreign Affairs (Russia) - Wikipedia, the free encyclopedia
32/34 Smolenskaya-Sennaya pl, Moscow 55°44′46″N 37°35′3″E  /  55.74611°N 37.58417°E  / 55.74611; 37.58417 Coordinates : 55°44′46″N 37°35′3″E ...

Scott Morrison defends foreign investment policy after Kidman decision creates Coalition divisions
Treasurer Scott Morrison has launched a strong defence of foreign investment in Australian agriculture, days after&nbsp;blocking&nbsp;the sale ...

Ben Carson considers return to Australia to lift his foreign policy game
Presidential candidate wants to restore his fortunes after his ignorance of foreign policy issues was exposed.

Foreign investment: Signing away our land, livelihood and heritage
Our governments past and present seem to be quite prepared to sign away the rights and possessions of their citizens.

China busts illegal foreign exchange network
The Australian China busts illegal foreign exchange network The Australian Police and the People's Daily newspaper said the gangs used accounts ...

Ben Carson eyeing foreign trip ahead of Iowa caucus
Campaign says trip could help the former neurosurgeon burnish his foreign policy credentials by doing something "different" and "unusual"

Two dozen Disney IT workers prepare to sue over foreign replacements
... Disney IT workers have filed complaints with the federal Equal Employment Opportunity Commission (EEOC) over the loss of their jobs to foreign ...

Ben Carson Might Take Overseas Trip To Allay Concerns About Foreign Policy Experience
Ben Carson Might Take Overseas Trip To Allay Concerns About Foreign Policy Experience

‘El Club,’ ‘Son Of Saul’ And Other Noteworthy Films Vie For Shortlist On Foreign Language Oscar – AwardsLine ...
There are 81 films vying for the Foreign Language Oscar this year, two fewer than last year's record 83 but no less rich with subjects and auteurs ...

Taiwan attracts foreign direct investment of nearly US$3.7 billion in January-October, says MOEA
Taiwan's Ministry of Economic Affairs (MOEA) approved 3,118 foreign direct investment projects (except from China) with a total value of US$3.689 ...

Resources last updated: 11/25/2015 11:55:42 PM