• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cached database

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have read some posts that implement cached database. Could you tell me what's the machanism of it? Is it necessary? For my case, I always access database file (open file) whenever there is read or update. It may be time consuming and the implementation is simpler than cache database. Any opinion?
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello George
I haven't read the other topics about caching, but I don�t think that a cached database in this case needs to be that difficult to implement. Load all records into some in-memory collection, and then allow all the reads on it, but only write through to the file on actions that update the content. Note, that I am doing the FBN version, so this could be different in your version.
The above mentioned solution could be implemented quite easily, and give you a performance increase. Weather or not performance is an issue, that is the question, then. My assignment states that I should prioritize simplicity, and create code that a junior programmer could understand, over code optimized for performance.
But I think a scheme as outlined above would be simple enough. I do not think that it is necessary for the Developer assignment, however, since the scale of the application wont suffer from a bit of performance penalty. Cached or not cashed, I think both are acceptable. The important thing is to remember to describe your choice, and motivation for it, in the design decisions document.
Regards,
Flemming Mertz
 
Ranch Hand
Posts: 555
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi George,

Originally posted by Flemming Mertz:
I think both are acceptable. The important thing is to remember to describe your choice, and motivation for it, in the design decisions document.


I agree. There have been people who apllied one of both design and passed the test.
Best,
Vlad
 
George Fung
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with you all.. Thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic