| Author |
About deletion and creation
|
Zee Ho
Ranch Hand
Joined: Jul 20, 2004
Posts: 128
|
|
The requirement of delete method is : Deletes a record, making the record number and associated disk vailable for reuse If we need conform with it. then what is the usage of the column that indicates the record is deleted or not? since the space is free and apparently we can not hold that record any more. the tag became useless. am I missing something? Actually, My implementation is sth like this: 1. When delete a record, update the tag as 1 which means deleted 2. When create a record, pick up one deleted record number first if any. Then update the tag to 0 and the content to what user want. does it conform with requirement? Any reply is appreciated..
|
SCJP 1.4<br />SCWCD 1.3<br />SCJD<br />SCBCD<br />IBM Xml Cert in progress
|
 |
Ta Ri Ki Sun
Ranch Hand
Joined: Mar 26, 2002
Posts: 442
|
|
I think you need to take a step back and think about this, because all you lack is the understanding, exactly which bit you're missing I don't know, or I'd point it out But looking at your solution I have no problem, which is why I don't understand your question, the tag is certainly not useless, it allows your create method to find a deleted record if any and reuse the space
|
 |
Frans Janssen
Ranch Hand
Joined: Dec 29, 2004
Posts: 357
|
|
Actually, My implementation is sth like this: 1. When delete a record, update the tag as 1 which means deleted 2. When create a record, pick up one deleted record number first if any. Then update the tag to 0 and the content to what user want.
Hi Zee, Like Ta it is not clear to me what your confusion is about. However your solution seems like the way to do it. Frans.
|
SCJP 1.4, SCJD
|
 |
Zee Ho
Ranch Hand
Joined: Jul 20, 2004
Posts: 128
|
|
|
thx..maybe I don't describe the question clearly, What I concern is do I need to physically delete the record when executing the delete method to free the storage of the disk? But any way, from your replies, I already got the answer.
|
 |
 |
|
|
subject: About deletion and creation
|
|
|