Hi all, In urlyBird, I am not sure about tow methods of Data.One is update(), i want to know in what cases should call update()?The other is delete(), when called, should data is db file be removed or just the collection class in memery which store records be removed?
Hmm, I don't think we can comment on that, since the methods vary. IF your update and delete methods are same as mine:
update(int recNo, String data) Changes the record (replaces the record with the given record number with the one you are passing as parameter)
delete(int recNo) Makes the record ready for reuse (mark the record with the deleted flag so create(String) invocations will reuse it's space). Notice that you don't need to phisycally remove the record from the file. You just mark the space it takes as free.
SCJD URLyBird (WIP)<br />SCJP 1.5
Joined: Feb 15, 2006
Of course, if you are using memory cache of the data, you need to make sure your cache reflects the changes made to the file. OR, if that is your case, just change the memory cache and then make sure all operations are persisted when shutting down.
That is a design decision that can only be answered by you.
However, you really need to start searching the board for your questions before you ask them. I know its tempting to just come here and post whenever something comes to mind, but all of your questions have been answered on this board, most of them within the past few days and weeks.