Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

how to assert UNIQUE value in non-key column in DM

 Post Reply Post Reply
Author
William H Meyer View Drop Down
Member
Member
Avatar

Joined: 24 Feb 2012
Posts: 83
Post Options Post Options   Quote William H Meyer Quote  Post ReplyReply Direct Link To This Post Topic: how to assert UNIQUE value in non-key column in DM
    Posted: 04 Jul 2012 at 1:07pm
I have been trying to discover how I can, in Data Modeler, assert that a non-key column is UNIQUE, so it can be referenced by a foreign key constraint. So far, I have not found a solution which results in a script acceptable to FireBird 2.5.
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2776
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jul 2012 at 1:30pm
Hi,

you need to create an index for the unique column(s) and set the index as exclusive (unique).
Back to Top
William H Meyer View Drop Down
Member
Member
Avatar

Joined: 24 Feb 2012
Posts: 83
Post Options Post Options   Quote William H Meyer Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jul 2012 at 1:51pm
Thanks. I did that, but it still complains in the script, when trying to set the foreign key. I can send a project file, if you wish. I am trying to run the script in FlameRobin, where I get better feedback than in Delphi.
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2776
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jul 2012 at 3:36pm
Send me the project file and then script then, I will take a look.
Back to Top
William H Meyer View Drop Down
Member
Member
Avatar

Joined: 24 Feb 2012
Posts: 83
Post Options Post Options   Quote William H Meyer Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jul 2012 at 4:00pm
I sent a ZIP file, but did not include the script, as it is simply the one generated by DM.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down