Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Date file writer?

 
pkinuk Buler
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.
 
Roel De Nijs
Sheriff
Posts: 10763
148
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!