File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes bad data in db.db Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "bad data in db.db" Watch "bad data in db.db" New topic
Author

bad data in db.db

Scott Ramsey
Greenhorn

Joined: Jun 28, 2001
Posts: 16
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


Scott<br />-----------------<br />SCJP, SCJD, SCWCD<br />XML, UML, WLS6.0
Rick Fortier
Ranch Hand

Joined: Jun 04, 2001
Posts: 147
There is no requirement for this, so I just left mine alone and showed the string in the JTable without modification.
 
 
subject: bad data in db.db
 
Threads others viewed
HashMap (or sth else) to lock/unlock records : Is it really safe?
client design
Hello everybody,I am a beginner:How can i get database(db.db) structure?
persistence layer
Tomcat sessions do not expire
developer file tools