Subject | Re: [firebird-support] Using blobs on firebird |
---|---|
Author | M Tuttle (KS) |
Post date | 2004-11-03T16:17:23Z |
Max,
only the path and file names in firebird database?
I though I would clarify this a bit. I developed a document imaging system
that stores the tiff, pdf, jpeg, and like files on the file system because
this is what windows was designed to be, a file storage system. As far as
storing a path and file name for each record in your index table, don't.
What I did was create a table that stored a PK and a path. Then in the
index table I had a field that was a foreign key to PK of the paths table.
The index table would also contain a field for the filename such as
SomeTextFile.txt.
So now if or whenever you would have to move your files and database to say
another drive or server, it is as easy as simply changing the path once in
your paths table. I know because we have moved our imaging system 3 times
now as the office has upgrade it servers, or added more servers.
Doing it this way keeps the database size down.
Bottom line, if the text files you would save in a blob are not making your
database grow in leaps and bound, store them in the blob. Otherwise let
windows do what it does best... Store Files. Another thing you should be
ware of if you store files on your harddrive is that you should limit them
to a specific number per folder, then create a new folder when you hit that
limit. In our imaging system I allow the user to set this limit (They use
25000), then when that limit is reached while scanning, my app automatically
creates the new directory, adds a record to the paths table, make the new
record the default path, etc. You will want to limit the number of files in
a folder so it does not take to long for windows to open and see the files
in that directory if browsing with windows explorer.
Anyway, I hope this is a little clearer now.
Mike
> I am working on a document management program using firebird as a databaseengine.
> My questions are :could become huge in size... or should I store the docs as files and have
> 1. Is it ok to store the docs (text files) in blobs or not ? The database
only the path and file names in firebird database?
I though I would clarify this a bit. I developed a document imaging system
that stores the tiff, pdf, jpeg, and like files on the file system because
this is what windows was designed to be, a file storage system. As far as
storing a path and file name for each record in your index table, don't.
What I did was create a table that stored a PK and a path. Then in the
index table I had a field that was a foreign key to PK of the paths table.
The index table would also contain a field for the filename such as
SomeTextFile.txt.
So now if or whenever you would have to move your files and database to say
another drive or server, it is as easy as simply changing the path once in
your paths table. I know because we have moved our imaging system 3 times
now as the office has upgrade it servers, or added more servers.
Doing it this way keeps the database size down.
Bottom line, if the text files you would save in a blob are not making your
database grow in leaps and bound, store them in the blob. Otherwise let
windows do what it does best... Store Files. Another thing you should be
ware of if you store files on your harddrive is that you should limit them
to a specific number per folder, then create a new folder when you hit that
limit. In our imaging system I allow the user to set this limit (They use
25000), then when that limit is reached while scanning, my app automatically
creates the new directory, adds a record to the paths table, make the new
record the default path, etc. You will want to limit the number of files in
a folder so it does not take to long for windows to open and see the files
in that directory if browsing with windows explorer.
Anyway, I hope this is a little clearer now.
Mike