Subject | RE: [firebird-support] Blobs in DB or file system. |
---|---|
Author | Nigel Weeks |
Post date | 2006-11-23T23:00:06Z |
> I can give another reason for storing files in Blobs (if they are notI use a simple method for addressing thousands of files on disk.
> big). For instance, many branches use the same desktop application but
> they cannot have access directly to a common folder. Also, if the
> number of images are big storing in a single folder is not feasible.
> You will need to start find ways to manage them. We have a customer
> with 250.000 images in a single database. Managing they in the disk is
> troublesome.
> Best regards,
> Eduardo Mauro
> Acabit Tecnologia
Each file has an integer ID(numeric(18,0)).
At the base of the file storage are folders from 000 through to 999.
The ID of the file then tested:
if shorter than 3 characters, it's padded with zeroes (1 becomes 001)
if longer than 3 characters, the last three are chopped off (5882365 becomes
365)
The file is then stored/referenced from that folder.
Works brilliantly on Windows 2000 server and FreeBSD servers. Haven't
installed it on anything else yet.
As pointed out, it's still susceptible to files being deleted/moved/becoming
out of sync with the index, but that's what the spiders are for...;-)
Good thread! Some great issues thrown around!
N.