Skip to Content
Dec 07, 2017 at 01:33 PM

PowerDesigner Domain datatype as Serial, but want Foreign Key references to just use Number


I had a domain called 'UID' with datatype 'number' which I used for all my primary key attributes. Foreign key references would automatically get this type too, when adding relationships, which was all fine. I generate a physical model from this, and all works fine there too.

But I now want to change the UID domain to be of type 'Serial' in the physical model.

But this will be no good for the foreign key references, as they need to be just 'number'. It looks like I'll need to create two domains, one for primary keys (eg. 'UID-Primary'), and one for foreign key attributes (eg. 'UID-Reference'), which is annoying because every time I add a relationship I'd need to change the domain on the attribute.

Is there a much better and cleaner way to do this?