Toad World® Forums

domain check constraint names


#1

Hi,

I saw couple threads where Vladka explained that domain check constraints can’t have names. I understand that the same domain can be used for multiple field but check constraint can use table name + field name + domain constraint name as a check constraint name or any similar combinations.

Our database has > 100 “boolean” fields having 2 values ‘Y’ and ‘N’. We describe it as one Boolean domain with check constrain rule:
%ColumnName% in (‘Y’, ‘N’)

And I don’t want to have hundreds system generated check constraint names.
So TDM can generate check constraint name like tablename_column_name_Boolean-check.

Is it reasonable? Or there is better way to do it?
We run version 3.4 , maybe similar idea is implemented in newer versions?

Thanks

Vitaliy


#2

Hello Vitaliy,

Thanks for your question. Our developers are looking for the solution for you. I need to ask you for patience. CR 72 822.
Thanks.

As soon as I know more, I will let you know.

Regards,

Vladka + TDM Team


#3

Hello Vitaliy,

Let me bring a quick update.
We will try to solve this issue for next Beta 3.6.x.

Thanks for your patience.

Regards,

Vladka + TDM Team


#4

Hi,

we are also interested in a solution of this issue.

It is a problem to write update SQL scripts (DDL) realising a change of a constraint defined at a domain, because you do not know the name of the constraint in the database. Such a name can be differnt on differnt servers (development, test, productive, …).

I think it is not possible to combine table name, column name, … because all names (incl. constraint name) are in Oracle limited to 30 characters.
A solution could be a new field “Domain Constraint Name” in the mask “Attribute properties” next to the field “Domains”.

With the best regards

Lada


#5

Thanks Vladka. I’m patient…


#6

Hello Lada,

Thanks for your comment on this.

We have fixed the CR 72 822.
New TDM Beta version will bring new application variables EntityName and AttributeName for names of domain check constraints.
In the DDL Script Generation dialog | Detail Settings tab, there will be a new checkbox “Generate Check Constraint Names Used in Domains”.

A solution could be a new field “Domain Constraint Name” in the mask “Attribute properties” next to the field “Domains”.

Thanks for your suggestion. However, what if a domain has more than one check constraint?
Possible solution would be to create the new field as an application variable accessible from check constraint domain so as you will be able to add a prefix or a suffix.

Please wait for the next Beta release for the fix. Then we can further discuss details of your suggestion and create the applic. variable.

Thank you.

Regards,

Vladka + TDM Team


#7

Hi Vladka,

TFI, I’m looking forward.

With the best regards

Lada


#8

Hi Lada,

The issue is resolved in the current Beta 3.6.1.6.
Please download the Beta and check it out.

Regarding your requirement, please write us how you need/prefer it.
(>A solution could be a new field “Domain Constraint Name” in the mask “Attribute properties” next to the field “Domains”.

Thanks for your suggestion. However, what if a domain has more than one check constraint?
Possible solution would be to create the new field as an application variable accessible from check constraint domain so as you will be able to add a prefix or a suffix.

Please wait for the next Beta release for the fix. Then we can further discuss details of your suggestion and create the applic. variable.)

Regards,

Vladka + TDM Team