• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bad data in db.db

 
Scott Ramsey
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have recently downloaded the assignment for SCJD. I have FBN, as most folks do. In preparation, I coded a simple class to spit out all the data in db.db. To my surprise, there seems to be bad data (logically, that is) in the form of "11h65m" for several of the flight durations. If there have been posts about this, I haven't seen them (though I have only recently joined the board).
My question is: if one of you has had something similar, and what you did about it.
I figure the options are:
(1) Leave it alone and just pass it on to the user;
(2) Don't display this record to the user (i.e. only show them data that is semantically correct);
(3) Code some hokey validation routine to fix this specific problem (i.e. if (minutes > 60) {minutes -= 60; hours += 1;}
I'm leaning toward #1, with the justification that invalid existing data is the fix-up job of a DBA, not the application.
I would appreciate any thoughts.
Thanks.
Scott
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no requirement for this, so I just left mine alone and showed the string in the JTable without modification.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic