• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LIVE_RECORD and DELETED_RECORD

 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How did you guys handle this? From readRecord and writeRecord they appear to be the first element in the buffer, and it must be an int. I don't understand why readRecord returns it to the calling method when it is never used after the read itself - I guess that if I were writing Data.java I would have dumped it in readRecord and not carried it forward.
 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,
You bring up a question that has been nagging at me. My instructions are very specific--enable a user to book flights by decrementing the available seats. No instructions as to data management, ie creating new flights, deleting flights, etc. My assumptions (and so stated in my design doc) were that my GUI would do the functions requested--look up flights based on origin/destination, and book flights...period. So...basically, I'm not worried about the behavior of delete, because I never call it! Could be off base here, but that's my go-forward plan...
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree that we don't want to code for any modify or deletes. BUT, on my code anyway, I have to deal with those two flags which both readRecord and writeRecord deal with - so we do have to code them into our binary file.
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm...I haven't looked to far into this but I THINK that it returns whther or not it is a live record, because basically it
doesn't delete records from the database it just sets it as DELETED, so if you go to delete a a record which has already been deleted you should inform the user that that record does not
exist maybe? Likewise if you go to add a record that exists. I may be way off because haven't looke too closely at it. I will now. I am also not doing anythign with add and delete since it's not called for in my specs.

With Respect,
Matt
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic