• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do we assume the database is used by another application?

 
Dan Burke
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a cached design. It will only work if the database file itself is only being updating by the applications clients. If another program used by the company is also using the database then i'm in trouble.

My question is, for this assignment..do you think that it is acceptable to mention this issue in my choices.txt and explain that my stance is that no other application is using the database file.

Has anyone passed with a cached design?

Really could use the input on this one.

Thanks

Daniel
 
Eiji Seki
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On my assignment it says that we may assume that just one application will access the data file.
 
Xiao Di
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I passed with a solution of fully cached records in memory.
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the locking section is says you can assume at most one program is accessing database file.

I personally decided against a caching approach as I felt it added additional complexity, keeping the cached data and the file synchronised and also the out of memory issue keeping all records in memory.

Saying that there seems to be lots of people passing using caching.

Jason.
 
Eiji Seki
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Caching has it's issues, as has a non-caching solution. And to implement a very good solution is too complex, so I guess they are happy with anything we provide as long as it is justified.

I am not working with a simple RandomAccessFile since I really don't like the idea of synchronizing every read and write. =P
But I just figured out that if I do that with a flexible design, it is easy to document that it is test only and that caching is possible by implementing some class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic