Information générale
Catégorie:
Codage, syntaxe et commandes
>><<snip>>
>>
>>>>>What does blanking the record in a table that has unique indexes do? Part of what prompted my "crap" outburst is that I want to add unique indexes to our production tables. This would enforce uniqueness. But none of our updating code reuseses deleted records. We have many duplicate records in our tables (one deleted, one not deleted). In code we totally ignore deleted records. It would be an impossible task for me to rewrite all the undate code, so it is impossible for me to add unique indexes to our tables.
>>>>>
>>>>>Brenda
>
>>>>I thought unique indexes were something to be avoided at all costs...
>>>>
>>>>-Michelle
>
>>>VFP is a different world, but from my former 6 years of SQL experience, it was shop standard that yout have a unique index. This enforced the uniqueness that code trys to optain. Code problems were found on the very first erroneous insert, not weeks later.
>>>
>>>Also, I was playing with using a parameterized view for my grid recordsource. If the grid wanted to update, it seemed that I needed a unique index. Could be wrong on this, but could not find a way to update without the index.
>>>
>>>Maybe I will post a unique vs nonunique question. You have peaked my interest.
>>>
>>>Brenda
>
>>Actually, as a couple others have pointed out to me, it was a terminology misunderstanding. There's nothing wrong with candidate keys, which is what you want. Unique indexes are a different animal and those are what are bad, not candidate keys. I should have paid more attention to what you were actually meaning and not the term. Sorry for any confusion.
>
>>-Michelle
>
>Glad you brought the terminology to my attention. I have reread the Devleopers Guide and more fully understand index terminology. I thought that Primary and Candidate were unique indexes. Did not understand that there was a seperate type of index called Unique index. Even had a question mark by the line that said "unique index does not prevent duplicate values". Never understood how that jived with "A primary index is an index that never permits duplciate values".
>
>Thanks - Brenda
Glad my misundersanding helped. :)
-Michelle
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement