Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Should I add DELETED() tag
Message
From
16/05/2001 11:49:45
 
 
To
16/05/2001 10:27:56
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00507170
Message ID:
00507892
Views:
26
No argument from me!

I particularly like the datetime idea. Useful in the majority of cases I can think of.

Hope all is well with you

Jim

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform