Store millions of small images in Firebird BLOBs.
I know you will say that there are some duplicates for this question. I've read most of them. But I need an answer to the specific case I present.
I am planning on storing millions of small jpg images (about 3kb) in a Firebird database.
Assumptions:
- The table that will contain these images will not contain any information other than its key; - This is not a web application; - images will never be updated;
- In most cases, the database will never grow by more than one GB figure;
- The server should be easily maintained as there will be no DBA to take care of it.
Is this a good approach? Or should I consider saving images to the file system?
You are welcome. I need an answer specific to non-web applications and Firebird databases.
source to share
At the previous company, we stored 155 million images of 32 KB each in an Oracle 8 database (then 9 and then later 10). It also contained more information about each image.
So I would have thought that FireBird should be able to hold on to a million or so without breaking too much sweat.
source to share
I would recommend storing on the filesystem - BUT, do one or more of three things:
- Store them in a hierarchical directory structure (can't suggest details without knowing the context) so there is no problem reading large directories
- Store them in sets in archives (for example, tar), possibly compressed - to save on file system waste from storing small files
- Your application has a caching mechanism.
source to share
The best approach is not to store images in a database, but instead store them on the file system.
Then you can use an image lookup table in your database, where each record contains the relative or absolute path to the image files in the file system.
Typically, there is very little writing done to store images as blobs inside dbase.
source to share