Subject | Re: [firebird-support] Using Union and Join (of two tables residing in different databases) in a Query |
---|---|
Author | Stellarancia.com |
Post date | 2018-09-13T17:45:19Z |
Dear Svein,
the problem is not the greatness of the database, but its
administration: the problem borns for a few tables that are utilized by
others tables (master/detail), and for many records passed to "storical"
(these movements become static). These tables don't have need to
periodically be saved.
I menage 11 softwares that utilize 11 different databases.fdb (each
database have different tables). The consumer can utilize one software,
four software, etc. on the same computer.
If I replicate this few tables in all databases, every maintenance for a
single common table must be done in every database. If I put these few
tables in a single database (e.g. Common.fdb), these few table are in a
single, unique file, then...
I am agree with you: the most obvious and elegant solution is to put all
the tables in a unique database. But I will try to create two separate
query, each connected to separate database.fdb, then create a relation,
for example a lookup master/detail via OnCalcFields. It is not the same
thing of a JOIN, still less than a UNION, but I'll try in some manner.
I'm using BDE from 22 years (very ok, but obsolete), but with Win10 it
is not possible to use it; now, from two months I'm using Firebird and
I don't have great experience yet.
Thanks anyway.
Antonio BIANCA
Il 13/09/2018 10:46, Svein Erling Tysvær setysvar@...
[firebird-support] ha scritto:
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
the problem is not the greatness of the database, but its
administration: the problem borns for a few tables that are utilized by
others tables (master/detail), and for many records passed to "storical"
(these movements become static). These tables don't have need to
periodically be saved.
I menage 11 softwares that utilize 11 different databases.fdb (each
database have different tables). The consumer can utilize one software,
four software, etc. on the same computer.
If I replicate this few tables in all databases, every maintenance for a
single common table must be done in every database. If I put these few
tables in a single database (e.g. Common.fdb), these few table are in a
single, unique file, then...
I am agree with you: the most obvious and elegant solution is to put all
the tables in a unique database. But I will try to create two separate
query, each connected to separate database.fdb, then create a relation,
for example a lookup master/detail via OnCalcFields. It is not the same
thing of a JOIN, still less than a UNION, but I'll try in some manner.
I'm using BDE from 22 years (very ok, but obsolete), but with Win10 it
is not possible to use it; now, from two months I'm using Firebird and
I don't have great experience yet.
Thanks anyway.
Antonio BIANCA
Il 13/09/2018 10:46, Svein Erling Tysvær setysvar@...
[firebird-support] ha scritto:
> dBase supported tables, and databases was not a separate concept.---
> Firebird also supports tables, but as a very different concept from
> databases. A Firebird database can contain about 32000 tables and
> joining tables within a database is easypeasy. Although possible
> (through EXECUTE STATEMENT... ON EXTERNAL DATA SOURCE...), it does
> make things a lot more difficult if you have to do things across
> databases.
>
> If you've been asked to transfer 967 tables to Firebird, the normal
> and simple solution would be to have one database containing all 967
> tables, not a lot of different databases that should be joined to each
> other. If you can separate things that doesn't talk to each other,
> then you can split into several databases, but probably a few
> databases, not 967. If there are a few tables that are common lookup
> tables, you could consider having one master database with these and
> then copy/replicate the tables to other databases (I would assume
> zipcodes and municipalities to be rather static, so these are good
> candidates for having a master in a separate database, but then
> copy/replicate these tables to all databases that uses them).
>
> You may of course have good reasons for importing these .dbx tables
> into databases of their own (e.g. if there are some kind of strange
> legal requirements), but I'd say that is a decision that you should
> only take after carefully considering alternatives.
>
> HTH,
> Set
>
> Den ons. 12. sep. 2018 kl. 22:05 skrev 'Stellarancia.com'
> niobi@... <mailto:niobi@...>
> [firebird-support] <firebird-support@yahoogroups.com
> <mailto:firebird-support@yahoogroups.com>>:
>
> I'm transferring many tables (967) from single BDE .DBF files (old
> driver DbIV) to Firebird 2.5.
>
> I utilize Delphi 7 as environment and ZEOS components to Firebird
> connections: the work is enough easy.
>
> A large number of old queries contain UNIONS and JOINS of tables (->
> single files .DBF), but now the old .DBF tables are transferred in
> different Firebird Databases. For example, with the two tables
> Municipalities.Dbf and ZipCodes.Dbf, I can write with BDE a query
> "SELECT * FROM MUNICIPALITIES.DBF a INNER JOIN ZIPCODES.DBF b ON
> ()...
> WHERE..."; now the first table is in WorkCom.fdb database, and the
> second table is in the TabCom.fbd database: how to join to day
> the tho
> tables? My program utilizes this queries and I would want to find
> solutions that give a fast result as BDE.
>
> I know that is not possible for Firebird to join tables that
> "resides"
> in different databases (.fdb), but I must find a solution as
> elegant as
> possible to join the same FB tables previously joined with .DBF files.
>
> Do you have any suggestion as to how to solve this problem?
>
> Thanks in advance.
>
>
> ---
> Questa e-mail è stata controllata per individuare virus con Avast
> antivirus.
> https://www.avast.com/antivirus
>
>
>
> ------------------------------------
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Documentation item
> on the main (top) menu. Try FAQ and other links from the
> left-side menu there.
>
> Also search the knowledgebases at
> http://www.ibphoenix.com/resources/documents/
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ------------------------------------
>
> Yahoo Groups Links
>
>
> firebird-support-fullfeatured@yahoogroups.com
> <mailto:firebird-support-fullfeatured@yahoogroups.com>
>
>
>
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus