Forums Register Login

Physically delete the record

+Pie Number of slices to send: Send
I downloaded URLyBird 1.3.3 two days ago.Currently, I am going through the documentation.
Documentation says we have to set a flag for deleted records marking them as deleted.But, the delete() in DBMain interface says "Deletes a record, making the record number and associated disk storage available for reuse. "
I am confused, do I need to physically delete the record from the file or just mark it as deleted.
Please explain.
Thanks
+Pie Number of slices to send: Send
just mark it as deleted. However, the requirement does imply that your createRecord method should reclaim the space used by logically deleted records
ms
+Pie Number of slices to send: Send
Thank you Mike, I got it.
+Pie Number of slices to send: Send
However, the requirement does imply that your createRecord method should reclaim the space used by logically deleted records
Really? For Contractors, the instructions say you can do that, but they make clear it's not required. I guess this is a difference in assignments.
+Pie Number of slices to send: Send
Why would you mark it as deleted? If you just
mark it as deleted then when the user quits the
application you must update the DB. Why not update
the DB immediatley?
+Pie Number of slices to send: Send
To delete a record, you update the DB file so that the delete flag for that record indicates it's deleted. On my assignment this means I change the very first byte of the record from 0x00 to 0x01 - that's it. (Other assignments may use different values, and manybe two bytes instead of one, but the idea is the same as far as I know.) No other change is necessary; the record is considered "deleted" even though the remaining bytes are still there. If the record is requested in the future, the application checks the delete flag and throws RecordNotFoundException if the record is marked deleted. So "marking the record" means "deleting the record" as far as the DB file is concerned.
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 544 times.
Similar Threads
create() and delete() usage
Delete function in B and S DBMain
Bodgitt & Scarper - Database Record Numbering
delete method of B&S
Unable to delete record - JDBC
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:12:37.