Subject Re: [firebird-support] Firebird Book questions
Author Milan Babuskov
Alain PIERRE wrote:
> 1. pg 181 - footnote: "BLOB storage is not a magic bullet
> for storing and retrieving large volumes of huge binary file
> data. Sometimes, under production conditions, the overhead
> and unwieldiness of storing non-dynamic data objetcs like
> movies or sound recordings inside the database overwhelm the
> benefits you perceived in the lab. Storing filesystem links
> to objects can be a valid approach."
>
> Q1.1: What do you mean by 'the overhead and unwieldiness ...
> overwhelm the benefits you percieved in the lab' ?

Reading the BLOB is not a very straightforward thing, and it can be a
lot slower than fetching file via FTP, SMB, NFS or similar protocol.

> Q1.2: Where can I find practical information about setting
> up a 'storing filesystem links to objects' approach ?

It's very simple. Just store the path to the file in database. Suppose
you have a collection of .mp3 files. Instead of holding them all in
database as blobs, you can store them separately, and just have values
like "C:\mp3collection\chris_rea\auberge.mp3".

> 2. pg 246 - Read-Only databases: "The application will have
> to be written so as to avoid requests that involve writing
> to the database or to trap the exceptions reaised when they
> are attempted."
>
> Q2.1: What's the best way to organize this: two separate
> applications one to read-write the database and another one
> to read it or can both options be implemented in one
> application ? Example(s) ?

There's nothing to organize. A read-only db is just what the name says
"read-only". No application can write to it. Your application may try to
start a read-write transaction (if it was written for non read-only
databases), so you need to catch the exception, or rewrite the app.

> 3. pg 247 - Making a database Read-Only: "Either gfix or gbak
> can be used."
>
> Q3.1: What does using gfix or gbak precisely do to the
> database in the process of making it read-only ?

AFAIK, just changes one flag inside it.

> Q3.2: Is there anything else to modify manually/through scripting
> to the database itself after the gfix/gbak operation ?

AFAIK, no.

> 4. pg 445 - Configuring Transactions, Access Mode: "Access
> mode can be read-write or read-only."
>
> Q4: Do transactions have to be changed to read-only access
> mode to use a database as a read-only database ?

Yes. Or, prepare for catching exceptions.

> 5. pg 597 - TIP: "Although FB does not provide a debugging
> feature for SPs, several 3rd party tools provide this
> capability."
>
> Q5: Which tools ?

Database Workbench, IBExpert, many others.

HTH

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org