File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes cach? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "cach?" Watch "cach?" New topic


Hugo van Elk

Joined: Jun 17, 2002
Posts: 15
I am spending some hours designing a cach for our database. But now I am in doubt.
Do we need a cach in our database?
What do you think? I guess not, since it has rarely been a topic in this discussion group.
On the other hand, the assignment says:'Note that the locking required is effectively a "write" lock only'. And it is fun to implement. But overdesigning is not rewarded I suppose.
Robin Underwood
Ranch Hand

Joined: May 01, 2002
Posts: 117
The only caching I have is on the client side. I needed a table model anyway to populate the JTable, so I'm using the table model as a place to store FieldInfo and DataInfo between searches. Of course, the cache will be out-of-date as soon as another client updates the database, so I need to re-read the database before doing any updates.
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
No need to design cach. It is efficient to query the database when you need them.
Hugo van Elk

Joined: Jun 17, 2002
Posts: 15
Originally posted by Robin Underwood:
The only caching I have is on the client side.

I mean server side to avoid locking overhead an disk access. The serverside cache is not locked for non-destructive methods, for reading there is no locking overhead at all. That would be the benefit. But the assignment does not stress this point.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I'd avoid trying to implement any caching. no cache needed. I just wanted to spell out cache.
There is no requirements in the spec for it.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: cach?
It's not a secret anymore!