Subject | Tables and queries in InterBase/Firebird |
---|---|
Author | Stevio |
Post date | 2001-07-30T15:19:41Z |
What is better to use with InterBase? Tables or queries? I know a lot of the
time it can depend on what you're doing, but in general, for simple searches
(with maybe a few joins), for adding, editing and deleting records, which
would you recommend?
I read the following in an article called: "InterBase for Desktop Database
Users" from the Borland Community web site.
-------
Not only must the design of your applications change but so must the
components you use to build them. Since SQL servers, such as InterBase, are
designed to execute SQL statements well you will get the best performance
doing everything with SQL and that means using TQuery. TTable was designed
to work well with navigational databases like Paradox and DBase. While you
can use TTable with Interbase there is a lot of overhead since the BDE must
not only fetch the data but also the metadata that describes the fields and
their types. You can see the additional SQL statements that the server must
execute using SQL Monitor. There is also overhead in using TTable methods,
such as FindKey and Locate, because the BDE must translate these into SQL
and send the SQL to Interbase. To illustrate the difference let's look at
the sample QRY.DPR project that accompanies this paper.
-------
Would you agree with what is said here?
I had a colleague in a former job that used to always go on about how
overused and unnecessary live queries were in most situations. Would you
agree? This guy knew his stuff as far as Delphi and Interbase were
concerned, whereas I am a beginner.
Thanks,
Stephen
time it can depend on what you're doing, but in general, for simple searches
(with maybe a few joins), for adding, editing and deleting records, which
would you recommend?
I read the following in an article called: "InterBase for Desktop Database
Users" from the Borland Community web site.
-------
Not only must the design of your applications change but so must the
components you use to build them. Since SQL servers, such as InterBase, are
designed to execute SQL statements well you will get the best performance
doing everything with SQL and that means using TQuery. TTable was designed
to work well with navigational databases like Paradox and DBase. While you
can use TTable with Interbase there is a lot of overhead since the BDE must
not only fetch the data but also the metadata that describes the fields and
their types. You can see the additional SQL statements that the server must
execute using SQL Monitor. There is also overhead in using TTable methods,
such as FindKey and Locate, because the BDE must translate these into SQL
and send the SQL to Interbase. To illustrate the difference let's look at
the sample QRY.DPR project that accompanies this paper.
-------
Would you agree with what is said here?
I had a colleague in a former job that used to always go on about how
overused and unnecessary live queries were in most situations. Would you
agree? This guy knew his stuff as far as Delphi and Interbase were
concerned, whereas I am a beginner.
Thanks,
Stephen