By: Kevin Frevert
Abstract: The following paper will discuss the differences in desktop and client/server databases and why Delphi's desktop database components (TTables) are inefficient in a client/server environment.
Well, "deadly" may be too strong a word, but nothing will have your end-users hunting you down faster than that little SQL hour glass.
"Why does it take nearly an hour to open a million record TTable in Delphi?". That is a common question/problem on Borland's
Delphi SQL server newsgroups. A developer tries to move a legacy desktop database application to a client/server database and running into the
inherent problems with desktop database design in a client/server environment.
The following paper will discuss the differences in desktop and client/server databases and why Delphi's desktop database components (TTables)
are inefficient in a client/server environment.
The reason there is both a TTable and a TQuery component is due to the fact there table-oriented databases like Dbase, Paradox, or Access,
and there are set-oriented databases like Interbase, Oracle, and MSSQL. These different types of database systems work and behave
differently from one another and the same methods of access cannot be equally applied.
TTable is specifically designed to work best with table-oriented systems - it is native to them. Using a TQuery against such databases is slower
because they do not understand SQL and so the BDE must interpret the SQL and convert it to table calls for that database.
TQuery is specifically designed to work best with set-oriented databases that understand SQL directly and were designed to work this way.
Using a TTable against such a system is slower because the BDE must convert the table functions into SQL instructions to be sent off to the database.
Some of the things that TTables do that eat time and resources over a network with an SQL system are:
With TQuerys, you still need to use them right to get the most out of them, but the point is that you can use them right with regard to SQL databases.
Download Delphi XE8 now!
Get Free Trial
Webinars on demand!
More social media choices:
Delphi on Google+
@RADTools on Twitter
Server Response from: ETNASC04