Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Missing field in database? No flight dates, only days.

 
james beech
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks, I guess it's time to de-lurk.. Hi's to Mr. Habibi for the book & the other regulars who've contributed all the sound thinking.
I got my dev project just over a year ago, and am a little confused by the fields in my supplied db.db file - I've a 3-char DAY column in the format MON,TUE,etc but no flight dates - the problem's obvious in I suspect there are passengers wanting to book more than a week in advance.
I've just read a post from someone saying there doesn't seem much variation in certification requirements - but I haven't seen this one discussed anywhere.
(I've done my criteriaFind & single-client locking + docs so far, but am trying to address this before I move onto the network server.
I've been told "You may not modify [the db.db] file, but you may move it if you wish."
So I need an extra file to store the data in, say db.db2 (leaving the possibility of further additions db.db3, etc)
One way to do this would be by modifying the Data class fairly drastically, to hold an ArrayList of RandomAccessFiles (so it can dynamically grow if db.db2 isn't found during startup), which'll require modification of all the read/write/search routines.
Another way would be an adapter with a private collection of Data objects, splitting the search down and querying all instances before returning only the results common to all.
Thought I'd throw this up as it seems something new (thought I'm sure you'll tell me otherwise) but it would be great if you've an idea of the approach I should be taking.
Cheers,
James
--
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've a 3-char DAY column in the format MON,TUE,etc but no flight dates - the problem's obvious in I suspect there are passengers wanting to book more than a week in advance.

Don't worry about that Date column, -- you don't need to do anything with the dates. This data is in the database for completeness only.


I've been told "You may not modify [the db.db] file, but you may move it if you wish."

All it means is that you should include the original database with your submission. Your program should make changes to database, -- how else would you adjust the seat count for the flights?
Eugene.
 
james beech
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eugene,
This data is in the database for completeness only.

Thanks, I guess a date field isn't necessary for booking a flight - but what use would the thing be without one?
poor old FBN - good thing they're not paying me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic