Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Should I add DELETED() tag
Message
De
16/05/2001 10:27:56
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
15/05/2001 09:41:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00507170
Message ID:
00507812
Vues:
25
Hiya Jim!

Filtering PK's for deleted()ness is only necessary when the PK is meaningful. Since the possibility exists that the user will create another record with the same PK as a deleted record. If its a generated number that will not be repeated until a pack is done, there should not be a deleted filter on the tag. Example: Number generator resets at 4 billion, so it will take a huge number of records before a duplicate key is generated. If all the records will eventually be deleted by the time number 1 is generated again, there will never be a duplicate.

In the case of the originator of this thread, he has many deleted records, so the deleted tag makes sense. If his PK's are generated, he shouldn't filter the tags on deleted.

I'd prefer to use a datetime field for his deleted records in this case, so I could look at "deleted" records in the last week or the last 24 hours etc. In that case, I'd definitely have an index tag on that datetime field. He'd have to filter these out of all other queries, but that would also permit archiving off records that were deleted a year ago while leaving the other deleted records alone.

HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform