This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About deletion and creation

 
Zee Ho
Ranch Hand
Posts: 128
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 357
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Zee Ho
Ranch Hand
Posts: 128
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic