Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

bad data in db.db

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.
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.
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic