• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cached database

 
George Fung
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • 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?
 
Flemming Mertz
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
 
Vlad Rabkin
Ranch Hand
Posts: 555
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I agree with you all.. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic