Subject | RE: [IBO] Simulating ISAM files using a TIBOTable component |
---|---|
Author | Jason Wharton |
Post date | 2006-04-04T14:56:39Z |
> I have a need to provide access to a Firebird table in a simulatedIt is the perfect component to simulate ISAM table access.
> ISAM environment. On the surface it would seem as though the
> TIBOTable would be a perfect foundation on which to base the ISAM
> simulation middleware. I have quite a few concerns regarding
> performance when using the TIBOTable component. For instance:
> What happens when the transaction is commited? How do I avoidYou call InvalidateRows to wipe the buffer clean so that fresh records come
> fetching the entire table every time I commit while leaving the
> current position of the record pointer intact?
from the server. Or, if you prefer to have changes pro-actively put into
the cache, use DML caching and have it span connections so that updates
records on a record level basis are purged from your cache. This way, you
maintain cached records for better performance but get the benefit of being
"up-to-date" with the database too.
> How do the Find and Locate methods work? It seems that in order toIBO knows how to jump around and virtualize the buffers.
> allow fetching the table backwards from the located record that the
> table component would need to fetch all records preceeding the located
> record every time I Find or Locate. Doesn't this make the use of
> indexes almost irrelevant?
> I guess most of my concerns stem from really bad experiences with theIf you want the benefit of having records cached in the buffers of a dataset
> Borland TTable component. I guess that I really want to know if the
> TIBOTable is more efficient that TTable or if it emulates it so
> faithfully that the inefficiencies are also emulated.
you must use TIBOTable and get to know it intimately well. This is not an
easy undertaking.
Or, if you want to keep your development work more straight forward, omit
having anything buffered and translate all ISAM record requests into SQL
that will execute via TIB_Cursor. You will be undertaking a very daunting
task here but it will be in the realm of your control and design as to how
it is done.
In short, these are your two choices: Take the time to learn what I've done
and have the benefit of dataset buffer caching or build your own system with
cursors and not have dataset buffer caching. Everything is just plumbed to
the server.
Jason Wharton