Subject RE: [firebird-support] Re: Blob storage
Author Svein Erling Tysvær
Firebird supports transactions that spans several connections so that your client application can make sure changes are committed to or rolled back from more than one database. Triggers/procedures/queries etc. don't have access to other databases, so you cannot have a trigger that records in one database that something was deleted from another database (well, possibly a UDF could do that, but it sounds like a dangerous hack). The only safe thing to do, is to let the triggers update tables in the same database. Depending on your situation, you could then keep the two audit trails separate, transfer data from one database to the other, or have a client program that created 'audit trail reports' (I'm not into the terminology) based on data from both databases.

HTH,
Set

-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of diagnosysuk
Sent: 22. oktober 2007 22:38
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Blob storage

--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@...>
wrote:
>
> diagnosysuk wrote:
> > I want to store a large number of blobs in a firebird database but I
> > really want to only store a filename rather than the data (to make the
> > database file smaller).
>
> You could use two databases: one for Blobs and other for all the rest.
> That way you:
>
> - still have a small database without Blobs
> - have easy backup/restore procedure
> - have no problems accessing the data
> - have no problems with synchronization (you can use transactions that
> span both databases for atomic changes).
>
> --
> Milan Babuskov
> http://www.flamerobin.org

Thanks for the suggestions. I think I will look at two databases, but
I am not sure about the synchronization between the two. Is there some
information of how to do this with two databases. I've only ever used
one before. We use triggers to keep an audit trail, and delete
records. How does this work between multiple databases

Richard