Subject Re: Joins between tables in two different databases?
Author Alex Ip
Thanks for the (very concise) response, Helen! I had looked at the
possibility of using external files to perform this task, but there are
limitations around the updating or deletion of records which kind of defeat
the purpose of having them. I was trying to avoid having to mess directly
with the external files outside Firebird, but it looks like I may have no
option if I try going down that track. FYI, for this specific application,
the read-only table would be relatively large (over 30,000 records), but the
read-write table would be relatively small (around 100 records).

Are there any longer term plans to implement heterogeneous joins in
Firebird at any stage (he asked hopefully)? Alternatively, is anyone aware
of any existing tools to (neatly) simulate this operation client-side? Given
that my existing application operates mainly in a stand-alone desktop
environment, I could possibly tolerate some work-arounds which would not be
acceptable in a network-based client-server scenario, but only if I had to.

Thanks also for the clarification of the nature of Embedded Firebird
and your tips on a read-only database deployment. I thought that this was
the case, but I hadn't gotten as far as playing with the embedded version
because I hadn't resolved the first (heterogeneous join) issue. I would very
much like to junk the BDE, but first I need to replace the functionality it
currently gives me. For various reasons, I would prefer to use Firebird over
MSDE (wash my mouth out!), but I am still weighing up my options. Thanks for
your help, anyway.

Regards,

Alex.

-----
Original Message:
Date: Tue, 18 Apr 2006 15:15:07 +1000
From: Helen Borrie <helebor@...>
Subject: Re: Joins between tables in two different databases?

At 02:15 PM 18/04/2006, you wrote:
>G'day all...
>
>I have a requirement for a read-only database (on CD) which has tables
>involved in joins to table(s) held in a read-write database somewhere
>on the hard disk. My existing desktop application uses Paradox under
>the BDE to do this, but I can't seem to find any way of doing this with
>Firebird. Is this possible,

No.

> and, if so, how would I do it? For example,
>could one create views into a different database (a la SQL Server)?

Views in the SQL sense, no. But you can export Paradox files as
fixed-length text records, which Firebird can read as an external
table. I don't know whether an external file accessed from a
Firebird database that is set to be read-only is possible - you can but try.


>I have a bit of experience with Interbase/Firebird but only in a
>straightforward client/server scenario with a read/write database. I
>would very much like to get away from the Paradox/BDE environment and
>start using embedded Firebird ASAP, so any help would be appreciated.

"Embedded Firebird" on Windows is still client/server. It's
"embedded" in the sense that a server instance and a client instance
are rolled together in one DLL. You are still going to need a data
access layer through which your application code passes and receives
requests. That might, at a stretch, be the BDE, although the BDE is
strongly not recommended! If you're sticking with Delphi, it's more
likely to be IB Objects or FIBPlus that you use as this layer.

So - your client/server experience is totally relevant. What
"Embedded" is not is a simulation of DBISAM connectivity, a la
Paradox, Access, etc.

Embedded is a deployment engine. It's between useless and impossible
for development. Develop using the full Superserver, to enable you
to visit the database using development tools like IBExpert, isql,
IB_SQL, or whatever, without shutting down your project in the
IDE. Keep the database read/write throughout development. When
you're ready to **deploy**, that's the time to change the database to
Read-only and to ship it with the embedded engine.

./heLen
-----