Subject | Re: [firebird-support] Multidatabase query |
---|---|
Author | Woody (TMW) |
Post date | 2005-05-10T17:20:18Z |
From: "Daniel Rail" <daniel@...>
There are times when more than one database is preferable. For instance,
when using archived data. In one of my apps, an archive is done for each
fiscal year. Therefore, there is a current year database, a current archive
(which becomes the fiscal archive for the current year) and an archive for
each fiscal year before that. In my setup, I maintain the name of each
archive created in a table in the current database. That allows me to search
through all past archives for any information. I sometimes have to use this
information or at least report on it.
At the end of the fiscal year, a routine is run to transfer all current
year information that is closed to the current archive. This is then renamed
for the fiscal period and a new current archive database is created and the
loop starts all over.
With the routines that I designed, it is easy to maintain and query any
or all of the database(s) simply by reading the names of the archives and
connecting to them when needed.
Woody (TMW)
>Daniel,
> Also, what is the reason why you are using more than one database in
> your design?
There are times when more than one database is preferable. For instance,
when using archived data. In one of my apps, an archive is done for each
fiscal year. Therefore, there is a current year database, a current archive
(which becomes the fiscal archive for the current year) and an archive for
each fiscal year before that. In my setup, I maintain the name of each
archive created in a table in the current database. That allows me to search
through all past archives for any information. I sometimes have to use this
information or at least report on it.
At the end of the fiscal year, a routine is run to transfer all current
year information that is closed to the current archive. This is then renamed
for the fiscal period and a new current archive database is created and the
loop starts all over.
With the routines that I designed, it is easy to maintain and query any
or all of the database(s) simply by reading the names of the archives and
connecting to them when needed.
Woody (TMW)