cancel
Showing results for 
Search instead for 
Did you mean: 

create foreign key relations in NWD???

Former Member
0 Kudos

hi,

is there a way to define foreign-key relations in NW Dev.studio?

I set up a dictionary project and defined some tables with keys - but how do i manage the foreign keys? I only saw the tabs, columns - indexes - technical settings, and in none of which I can define foreign keys.

thanx for help,

matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi matthias,

Unluckily you cant define keys. Sorry

Greetings

Marius

Answers (2)

Answers (2)

Former Member
0 Kudos

You cannot do it easily from the Dictionary perspective but there is a workaround. This is what I did:

1) Right click your table in the Dictionary Explorer and select "Create DDL script."

2) Select the target DB platform.

3) Click on the "Navigator" tab

4) Navigate to your ddl script folder src->scripts->

5) You can see a listing of "baseline" DDL scripts that generate the table as you've defined it in the dictionary. You will need to edit the script so that it sets up your foreign key constraint. The syntax for this will depend on the db you use. Your dba should be able to help you execute the ddl script.

Hope it helps,

Jason

Former Member
0 Kudos

Hi Jason,

i gave you 6 and the others 2 points.

manipulating the scripts is like performing sqls on the db, which i can do in my quantum plugin, right?

so i guess, i shall alter the tables and put in the referenced by - clause.

thanks to everybody,

mkasig

Former Member
0 Kudos

how to make <b>ddl script</b> for <b>creating foreign keys</b>?can u plz tell me the <b>syntax</b>?

Erin2
Advisor
Advisor
0 Kudos

Relationships between tables are handled at the application level in the WAS.

If you are using CMP EJBs to access your tables, you can create a helper table and setup a "relationship" between to EJBs. The relationship is defined using cmr fields in the EJB and managed by the beans, all you have to do is create the heper table in your dictionary project.

Hope this helps,

Erin

Former Member
0 Kudos

how to make a ddl statement in all the databases for creating the foreign keys