Unique constraint with several columns

Hello,

In an Entity Relationship Diagram it is possible to define Unique constraints spanning several columns in an entity. I do this by using the constraints tab in the specification of the entity. That’s great. The constraint is even generated in the entitiy’s SQL. Excellent !

Now my question: is there any possibility to mark the columns involved in this constraint in any way on the diagram ? E.g. single column unique constraints are marked with a red “U” ?

I use VP Database Architect 5.2.

Regards,
Andrei

Hello Andrei,

Thank you for your message and we are sorry that currently we do not support showing multi-column unique constraints in ERD. I’ve forwarded your suggestion to our engineers to investigate the feasibility on supporting this. And I’ll get back to you once there are any feedback. Feel free to contact me if you need any help.

Best regards,
Rain

Hello Andrei,

It is possible to define multiple unique constraints per entity. Do you want to show red “U” on columns being included by ANY constraint? For example, constraint CT1 and CT2 both contains column X, hence a red “U” will be marked on column X (not two “U”). Or, you want to show clearly the name of constraint a column was included by? But this seems to make the diagram hard to read…

Best regards,
Jick

Hello Jick

I really appreciate the way you VP people listen to us users :slight_smile: I hope one day bigger companies will do the same.

It’s a good question you rise. Personally I’d prefer your first solution, i.e. one red “U” on columns being included by ANY unique constraint.

Check constraints could be notated similarly with a “C” in whatever coulour. This would give in the “worst” case something like [dept_id U C N] for a column having all possible notations.

For me it’s not important to see on an ERD how many constraints a column is included by. This is column detail information I can lookup separately.

Best regards,
Andrei

Hi Andreim,

Thanks for your feedback. I am going to ask our team to support your need. If it’s ready, I will post again. :slight_smile: :slight_smile:

Best regards,
Jick

Hi Andreim,

The update is ready. Please run the product updater to advance to latest patch release to obtain the change. This is the instruction:

Check constraint has nothing to do with column. Therefore, the change is applied to unique constraint only.

Hope you like it. :slight_smile:

Best regards,
Jick

Hi Jick,

Excellent, thank you ! :smiley:

I agree with you concerning check constraints.

Best regards,
Andrei