A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Developer Certification (SCJD/OCMJD)
Deleted field in .db
Joined: Nov 25, 2007
Mar 19, 2008 08:34:00
Hi Can i treat deleted field in a record as a field? that way i read all records, even including deleted field, later in business if they decide to undelete him, it will be easy.
Joined: Feb 18, 2008
Mar 19, 2008 19:10:00
The way i understood from my instructions is
When the user deletes a record, the program has to flag the first byte of that record with a value 0xff(255 i believe) and not physically delete it.
Next the program has to reuse the space of that record when you insert a new record. And of course you have to un flag that record.
Am i right/Wrong guys?
[ March 19, 2008: Message edited by: John Mattman ]
Joined: Jul 17, 2006
Mar 20, 2008 03:58:00
Next the program has to reuse the space of that record when you insert a new record
Do you really mean "has to", or just "may"?
@Lin: if your specs do not mention "undeleting", I would not think about it.
Joined: Feb 18, 2008
Mar 20, 2008 06:29:00
Based on the comments of my delete method, I assumed that we need to reuse the space.Here are the comments that were in my interface provided by Sun.
// Deletes a record, making the record number and associated disk
// storage available for reuse.
public void delete(int recNo) throws RecordNotFoundException;
Joined: Mar 03, 2008
Mar 20, 2008 08:02:00
I asked myself the same questions shall I reuse the deleted record or not.
I decided against it because there are only view byte which will be
not used and a risk of a disk overflow is just very small.
Make sure you mention this in your choices.txt
Joined: Dec 11, 2004
Mar 20, 2008 09:33:00
Please check your
regarding an important administrative matter.
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: Deleted field in .db
What might be the problem??
Checking for a deleted record
NX:deleted flag as a field
Very scary thing
EntityBean and default value of a not null field
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013