The desktop database similarity illusion

Preamble

It is no secret that the most development tools grown up from desktop databases technologies, now trying to provide developers with “native” metaphors of desktop databases (PostgresDAC one of them) – tables, indices, searching & positioning in index etc. It’s a huge temptation to realize task as it is simple table, where you can search by the first letters of title…

But we should not forget, that so called tables (in meaning of user interface) and indices are made through SQL-calls anyway, and on opening of the table most likely SELECT * FROM table ORDER BY Index will be executed. And even on this simple query will be different reaction from different servers.

Real life example

There was a tragic history in the 90th described by A. Akopyantc (in Russian). In one bank there was system developed in Clipper (who knows what is it now 😉 ) on Nowell network. This system was out of breath because of huge amount of data.

They bought Sun server and Oracle for the number with six zeros on the end. Task was quickly rewritten under Oracle and launched. And they found out that it pulls no more than 5 users. To make the story short new client program just simulated old “clipper” ideology and opened all needed tables with query shown above.

Hunky-Oracle swapped these huge tables for each operator into memory (so called buffering) and successfully filled the whole memory. Then after every update by operator, server started buffers refreshing with 100% CPU load.

Another common mistake – an attempt to organize the data processing on the client. There one must be aware of the fact that viewing the table data on the client will work twice – three times longer than in the old file server application, and also it will hugely increase network traffic.

Amble

“Why TPSQLTable component there in your component suite then?” – one may ask.

“Because man is weak” – my answer would be. 🙂

You have no idea how many people cannot imagine development process without table components (TPSQLTable, TTable etc.). It was easier to give than to refuse. But believe me, this messy thingy will be eliminated.

Once I asked Sergey Vostrikov (DevRace, FIBPlus) how they fight such kind of lamentations?

“We politely sent them to study client-server ideology and explain that TTable was coined for the desktop single user systems and is excellent solution, with direct access to files. File-server approach with a SQL-server is maleficent” – answered Sergey.

Advertisements

2 thoughts on “The desktop database similarity illusion

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s