Non PK to reference PK constraint?

This may be basic but …

I want to be able to add a constraint (or whatever) that requires a non-pk field on table A, to reference a pk field in table B. where table A is the parent.

I cannot use FK or PFK relationships as toad will add the Table’s A PK field to table B …

Hello,

Unfortunately, I’m not sure I understand.

In TDM3, as soon as you create a relationship, a foreign key is created
automatically in the child entity.

Parent entity has PK attribute - identifying relationship - Child entity will have PFK attribute then.

Parent entity has PK attribute - nonidentifying relationship - Child entity will have FK attribute then.

If you can, please try to explain me a bit more what you need. Thanks very much.

Regards,

Vladka

Ok, I think i’m using the wrong wording :slight_smile:

What I need is a constraint so that an entry cannot be made into Table A until an entry is made in Table B.

Table B has two fields, a PK field and a non-pk field. As soon as I add a relationship from table A to table B, table B gets a new field (FK). That would require table B to have 3 fields, two of which is ever used.

One of the main things is that there will be over 52 different tables referencing Table B. Doing this in toad, will require Table B to have 52 additional fields, all FKs. Even though Table B should only have two fields.

Message was edited by: shannara@alaska.gov

Shannara,

Still I’m not quite sure what you need… :wink: I’m sorry.

In any case, please see the following topics in the TDM3 documentation - Foreign Keys Mapping and Alternate Keys.

Manual: go to Index tab and search for topics Foreign Keys Mapping and Alternate Keys.

Help file:
Modeling | Physical Data Model | ERD | Keys:

  • FKeys | FK Mapping.
  • PKs and Alternate Keys.

Hope this helps.

Vladka