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,


0
admin
2/25/2006 6:04:32 AM
sybase.powerdesigner.general 9408 articles. 1 followers. Follow

3 Replies
413 Views

Similar Articles

[PageSpeed] 8

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 
original column names.  The second reference should have the 1st 3 
characters from the table before the column names.

-- 
Mike Nicewarner [TeamSybase]
http://www.datamodel.org
mike[at]datamodel[dot]org (can you figure what to change?)
Sybase product enhancement requests:
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement



admin wrote:
> 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,
> 
> 
0
Mike
2/27/2006 12:02:08 AM
I think I should give you more detail. when I try to
generate the
PDM model in secoud tab of its menu (detail) I chose FK
cloumn
template %PROLE% and select the "Always Use Template" .

the behaviour is for first relation that has the role name
puts the
role name as column and for the second one that hasn't any
role
puts the Table name. the question is I want to change its
function
 to puts the column name for the second one that hasn't
role, how
I can change the defualt (Table Name) to column name ?

> 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  original column names.  The
> second reference should have the 1st 3  characters from
> the table before the column names.
>
> --
> Mike Nicewarner [TeamSybase]
> http://www.datamodel.org
> mike[at]datamodel[dot]org (can you figure what to change?)
> Sybase product enhancement requests:
> http://www.isug.com/cgi-bin/ISUG2/submit_enhancement
>
>
>
> admin wrote:
> > 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,
> >
> >
0
Admin
2/27/2006 6:17:38 AM
Now I see.
You can specify the role for every column.
Or, you can submit a bug report to Sybase.
Or, you can open a case if you have paid support.
I can duplicate your situation, but I don't have a solution.  The 
behavior is hard-coded.  When you use the %PROLE% variable, the default 
it uses if you don't have a role is the table code.

-- 
Mike Nicewarner [TeamSybase]
http://www.datamodel.org
mike[at]datamodel[dot]org (can you figure what to change?)
Sybase product enhancement requests:
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement



"Admin" wrote:
> I think I should give you more detail. when I try to
> generate the
> PDM model in secoud tab of its menu (detail) I chose FK
> cloumn
> template %PROLE% and select the "Always Use Template" .
> 
> the behaviour is for first relation that has the role name
> puts the
> role name as column and for the second one that hasn't any
> role
> puts the Table name. the question is I want to change its
> function
>  to puts the column name for the second one that hasn't
> role, how
> I can change the defualt (Table Name) to column name ?
> 
>> 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  original column names.  The
>> second reference should have the 1st 3  characters from
>> the table before the column names.
>>
>> --
>> Mike Nicewarner [TeamSybase]
>> http://www.datamodel.org
>> mike[at]datamodel[dot]org (can you figure what to change?)
>> Sybase product enhancement requests:
>> http://www.isug.com/cgi-bin/ISUG2/submit_enhancement
>>
>>
>>
>> admin wrote:
>>> 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,
>>>
>>>
0
Mike
3/1/2006 6:07:33 AM
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 ...

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...

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...

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...

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...

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...

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%...

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...

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...

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...

RoleId/Name as Foreign Key
I'm trying to create a relational SQL data table where one of the foreign keys relates to the aspnet_Roles table.At first, I was linking to the RoleId field because it was the primary key, but that's no good because I can't retrieve the RoleId of a RoleName from my code. I then read this post:http://forums.asp.net/p/1077364/1585594.aspx#1585594 How do I reference the RoleName field as a foreign key? I tried doing it but because RoleName isn't a Primary Key or 'Unique', it won't let me do it.I get the following message:'The columns in table 'aspnet_R...

Foreign Key Inferred Name
So I'm a complete noob to Dynamic Data. My team set up a Dynamic Data website which we're essentially using for scaffolding...we have an already existing DB schema which we plugged it into. And it works perfectly! One thing though - the Dynamic Data code automatically infers a friendly name when generating a drop down list for a foreign key. In our case, we have a "Contacts" table, and the primary key is ContactID, and the first field in the table is "First_Name", and this is what is showing up in the drop down menu. So for instance, when adding or editing an...

DA and foreign key names
When generating the physical data model, DA will rename a column which has a foreign key (so that the column name is the same as the foreign key column name). Is there a way to disable this ? Scott...... Scott Cunningham wrote: > > When generating the physical data model, DA will rename a column which has > a foreign key (so that the column name is the same as the foreign key > column name). Is there a way to disable this ? > > Scott...... I would sure like to know how as well!!! We've been renaming the FK columns to an appropriate name on the first ge...

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 � 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 AK...

Web resources about - Foreign key name - 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 ...

Jakarta terror attacks: foreign fighters feared as the cause
Thursday's attack in central Jakarta has fuelled the worst fears of south-east Asian governments.

Foreign Minister Julie Bishop: Indonesian attacks had been expected
The government has said the deadly attacks in Jakarta had been expected and that concern has been growing about the influence of Islamic State ...

A list of some major attacks on foreign soil that claimed Canadian lives
A list of some of the attacks since 2000 that claimed Canadian lives.

Expert: ‘History Won’t Look Kindly’ On Obama’s Foreign Policy, For 3 Crystal Clear Reasons
Expert: ‘History Won’t Look Kindly’ On Obama’s Foreign Policy, For 3 Crystal Clear Reasons

Oscars: ‘Mustang’ Ends Dry Spell For France In Foreign Language Field Full Of Firsts
With today’s Oscar nominations, the Foreign Language race has been whittled down to five. While there are no major shocks like last year when ...

Sweet Kashmir apples feel the pinch of its foreign cousins
Sweet Kashmir apples feel the pinch of its foreign cousins - This followed the notification of Directorate General of Foreign Trade (DGFT) allowing ...

Flood of Foreign Fighters Biggest Failure Glossed Over in State of the Union
President Obama made many reassuring remarks in last night’s State of the Union address. For example, he reminded the nation that he had assembled ...

Iranian foreign minister confident nuke deal will be completed Saturday
Iranian foreign minister confident nuke deal will be completed Saturday

In New Jersey, US Ambassador for UN Defends Foreign Policy
U.S. Ambassador Samantha Power says President Barack Obama's foreign policy has engaged foes and galvanized allies to face challenges such as ...

Resources last updated: 1/18/2016 7:08:37 AM