August 8, 2005 at 10:06 pm
Hello gurus
I ahve many tables in which there is a description field and I want to restrict duplicate values.
Would it be better to have a unique constraint in description field also (Will it affect the performance of queries)
or
check it from the front end.
August 8, 2005 at 10:28 pm
check in the front end AND apply unique constraint. Won't affect performance unless you have 1000s insert per hour/day. Also data integrity outweight performance in any case.
August 8, 2005 at 10:33 pm
But is it advisable to keep a Unique constraint on the description field. Is it a general practise.
This can be applied to all Master tables.
Have u done such a thing
August 8, 2005 at 10:40 pm
If you are referring to a lookup table then, most of the time (just not to say always), there's a unique constraint on the description column. However there might have some cases where you have another type in that table so you might have multiple fields in that constraint. But I personally have a unique constraint on 100% of those tables.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply