Subject Re: [firebird-support] Firebird database portability
Author Christopher Chan
Helen Borrie wrote:
>
>
> At 04:41 PM 29/11/2006, you wrote:
>
> >http://sotu.berlios.de/Firebird-Embedded-Linux-HOWTO.html
> <http://sotu.berlios.de/Firebird-Embedded-Linux-HOWTO.html>
> >
> >Which is why I asked whether firebird databases were portable...
>
> ...and THAT is a different question, again due to your confusion
> about the disposition of systems. "Embedding" is a deployment
> model...an **application architecture**. You can use the very same
> database in an embedded deployment or in a 2-tier client/server
> deployment or as the back-end to a webserver.

I was aware of Firebird's ability to have the database copied from a
local machine, where it was being used solely by one person, to another
location to be 'shared' by a server. I just wondered how far it went.

>
> A *database* is what is created, maintained, accessed, guarded, etc.
> by the database management system - a.k.a. the database engine. One
> running engine (server) can do all this stuff for multiple
> *databases*. Databases are portable, but that doesn't mean that a
> byte-for-byte *image* of the database *file* is interpreted the same
> way on all *machine* architectures...which is why we talk about
> databases being *transportable*.

Sorry, being exposed to cdb and mysql myisam gave me a broader perspective.

>
> File-copying databases around is bad practice, in any event, since
> uncommitted work and garbage, the transaction counter's current state
> and inventory and even the version counter for metadata changes are
> stored in the database file. It's not that you *can't* do it, but
> that you *shouldn't*. A new deployment should be that - NEW, i.e.
> freshly restored or in a transportable backup that's ready to be
> freshly restored.

Of course we don't copy mysql myisam databases around while the server
is still running. cdb is the exception since it is 1) a file database
and 2) a static read-only database so it can be copied anytime it is not
being rebuilt.

Back to my case. The new deployment will be a fresh database. I am not
precreating any database to be deployed. However, I am used to databases
having a certain directory structure just as a mysql on Redhat
Enterprise Linux is found under /var/lib/mysql and if you want another
instance, it would have to be under another directory like maybe
/var/lib/mysql2 and ditto for postgresql, I figured that firebird is
probably the same.

If so, please tell me, what must be done to create this directory
structure for a fresh local database that will be used by the embedded
engine under Linux.

I am not here to put firebird down or anything. postgresql databases are
not portable either. They must be transported too. I just want to get
full information on the nature of firebird databases so I know what can
be done or what cannot be done with them.

regards,

Christopher