Subject | Re: [firebird-support] database over internet |
---|---|
Author | Matthias Hanft |
Post date | 2013-01-09T19:45:15Z |
Sergio wrote:
are transferring. I'm using FB this way, too (via a VPN because
otherwise passwords would go unencyrpted through the Internet), and
while it isn't as fast as "at home", I can easily work with it.
The point is that you must already have WAN connections in mind at
database design time (and when constructing SQL queries). Many
programmers just make queries like "SELECT * FROM table;" and
choose the needed rows and columns within their client software
because this way it's easy to code and (at home!) fast enough.
What they don't keep in mind is data minimization. If you just
need the first name of customer #137, the above query show read
"SELECT firstname FROM customers WHERE id=137;" and nothing else.
So, only the needed data goes over the WAN which makes it pretty
fast.
And, I don't use any of the Delphi-supplied data components because
I never know exactly what they are doing. The only components which
I'm using are (from the "Interbase" tab) 1 IBDatabase, 1 IBTransaction
and 1 or more IBSQL. (Granted, that stuff is old, but still works
perfetcly with FB 2.5.1.)
This way, I have full control over the data which is transmitted
between client and server. It may be a bit more programming work
to transport the FB data "manually" from and to a visual component
like a textbox, a memo or something like that (no automagic!), but
it's well worth the speed gain when you're working over a WAN!
On the other side, if your client really *needs* each and every
row and colum, you just can look for a faster Internet connection
because AFAIK there's no possible data compression between FB
clients and server. But this case should happen very rarely...
-Matt
>Of course it works, and how slow it is depends on how many data you
> I've made some very simple tests, conecting to the database like
> the_remote_server:C\databases\data.fdb
> It works, but it's slow...
are transferring. I'm using FB this way, too (via a VPN because
otherwise passwords would go unencyrpted through the Internet), and
while it isn't as fast as "at home", I can easily work with it.
The point is that you must already have WAN connections in mind at
database design time (and when constructing SQL queries). Many
programmers just make queries like "SELECT * FROM table;" and
choose the needed rows and columns within their client software
because this way it's easy to code and (at home!) fast enough.
What they don't keep in mind is data minimization. If you just
need the first name of customer #137, the above query show read
"SELECT firstname FROM customers WHERE id=137;" and nothing else.
So, only the needed data goes over the WAN which makes it pretty
fast.
And, I don't use any of the Delphi-supplied data components because
I never know exactly what they are doing. The only components which
I'm using are (from the "Interbase" tab) 1 IBDatabase, 1 IBTransaction
and 1 or more IBSQL. (Granted, that stuff is old, but still works
perfetcly with FB 2.5.1.)
This way, I have full control over the data which is transmitted
between client and server. It may be a bit more programming work
to transport the FB data "manually" from and to a visual component
like a textbox, a memo or something like that (no automagic!), but
it's well worth the speed gain when you're working over a WAN!
On the other side, if your client really *needs* each and every
row and colum, you just can look for a faster Internet connection
because AFAIK there's no possible data compression between FB
clients and server. But this case should happen very rarely...
-Matt