Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted records
Message
 
To
25/01/2003 17:07:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00745433
Message ID:
00745461
Views:
26
Do you know how SQL Server gets away with it (just wondering)? Is it because of SQL Server stores data in "pages" so that a delete of record 90 requires only a reshuffling of the data page associated with record 90? Or is it because SQL Server writes to disk in a different way than VFP (SQL Server bypasses aspects of the OS, doesn't it?)?



>>Dennis,
>>
>>There is no way to physically remove them, besides performing a pack, or copying the records to a new table. Physically removing records every time one is deleted would be a very inefficient operation...in reality it would require rewriting all records after the delete point.
>
>I don't agree that it would "require rewriting all records after the delete point", not for fixed-sized records. Say you have 1000 records, and you want to delete record #500. It would be possible to copy record #1000 to position #500, and then adjust both the file size and the reccount() part of the header.
>
>Note that a) This wouldn't work for memo fields, and b) Users are accustomed to have the possibility of seeing records in the order they were created. This wouldn't be possible with the above algorithm. And of course, you could no longer use recno() as the primary key (which isn't recommended anyway).
>
>Hilmar.
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform