Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Date file writer?

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks.

I am so curious whether I need to create a file writer function. Because the assignment doesn't specify I must write data back to the file.

If yes, which options do I need to choose:

1. all the data file cached in memory will be saved in the db file when the server close or update or insert .
2. write data back to the db file every time when the server database has been changed.

Thank you in advance.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi pkinuk,

You're program should be able to book rooms (according to the instructions). I don't think you are able to book a room without writing to the database file.

The strategy you use is your own choice. I decided to use a cache (and write everything back to file when server is closed). Other ranchers used your 2nd option (and there's nothing wrong with that approach). Don't forget to argument your decision in your choices.txt

Good luck!
Kind regards,
Roel
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic