db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veaceslav Chicu ...@infologic.fr>
Subject Re: advice for client/server application
Date Mon, 27 Mar 2006 06:20:21 GMT
> I was wondering about that.
> Derby does support IO Streams so you could do that.
> But this sort of begs the question... why store the file in the database?
> If you look at content management solutions from companies like IBM their 
> solutions are based on storing the file's meta data within the database.
> If you take that design approach, you'll find that you can separate your 
> TFTP/FTP issues away from the JDBC layer.

in DB2 they have a special infrastructure to keep in sync files with
database reference, it's not so simple
the simplest way is to have a table with blobs

but if you want simple to upload download files, maybe you can write 2
stored procedures

{call upload_file(VARCHAR(254) filename, byte[] file)}
{call download_file(VARCHAR(254)filename)}

in this procedure you just store the file or read file from file system,
maybe you need a procedure to look at the list of files in directory

if you have a webapp and files a images for example, it's better to keep
 just references in the database, and implement some methods to keep in
sync with database

best regards,

View raw message