Subject Re: [firebird-support] Blobs in DB or file system.
Author Martijn Tonies
> > > You can put pretty much anything you like in a BLOB field, but the
usual
> > > method is to put a filename in a VARCHAR, and keep the file on your
> > > filesystem, rather than slow down your DB pulling data from BLOB's.
>
> > That's a very broad statement to make and I disagree :-)
>
> I'd love to know why you disagree! I've probably been doing things wrongly
> for the last 5 years...
> I feel another learning curve coming on...:-)

Not "wrongly", different, yes.

I would say it depends on the situation/application as well as your personal
preferences.

> It's true I was assuming that only files were to be stored, and with PHP,
it
> takes two database operations to pull data from a blob(one to get blob
> reference, the second to visit that reference and pull the data)
> Sure, it's all done automatically with
> `ibase_fetch_object($recordset,IBASE_FETCH_BLOBS)`, but behind the scenes,
> there's still extra traffic.
>
> Keen to learn, so bring it on...

I once did a thingy that included user data inside a database, including a
small avatar graphic. I made a blob of it in the database, so that
everything
was inside the db and users could be easily migrated to other databases
without having to resort to files.

I liked that.

There's also this application I worked on where certain travel routes were
part of customer data, again: in the database. This way, there was no need
to set up file server access for all the different clients (not a
web-application)
and only a database connection had to be established.

Sounds fine to me.

And I could easily go on and on with examples. Remember: there's more
than PHP and web applications out there.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com