Clinton Gormley wrote:

> I can think of two approaches:
>
> 1) In the DB, store the name of the server to which your file has been
>    uploaded

Don't do that. The moment you put a file into the database you loose all
of the nice tools that your OS gives you for working with files (grep, ls,
find, etc).  Plus when you send those files to the client you have to
query and stream it from the database instead of just using the
filesystem.

> 2) Store your upload in a shared partition (eg on a SAN, NFS,
>    iSCSI/OCFS2)

If you need to access those files from multiple machines, than this is
much better than sticking them in the db.

> The advantage I see in the second approach is redundancy, the
> disadvantage is that there will be a slight performance cost.

Why would there by a higher performance cost? I can't imagine that a
shared filesystem would really have much more overhead than a database.

-- 
Michael Peters
Developer
Plus Three, LP

Reply via email to