Subject | Re: [firebird-support] Using Union and Join (of two tables residing in different databases) in a Query |
---|---|
Author | Svein Erling Tysvær |
Post date | 2018-09-13T08:46:17Z |
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@... [firebird-support] <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
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)
<*> To change settings via email:
firebird-support-digest@yahoogroups.com
firebird-support-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/