Re: Large files in a database

From: Steve Kass <>
Date: Sat, 22 Mar 2003 12:55:03 -0500
Message-ID: <b5i7uu$15n$>

Most products probably have a binary-large-object type like Microsoft SQL Server's [image], which can hold the entire image. If you want the images to be managed along with the rest of the data for backup, replication, etc., then there is an advantage to storing them internally. If you can maintain data integrity and handle them conveniently outside the database and want the advantages of image access through a file system, storing filenames or URLs is reasonable. In the latter case, I recommend you store only that part of the full URL that is an intrinsic attribute of the image (perhaps just the file name if all images are in the same directory). If there is a common path for the images, store it in a separate table or in the same table as a computed column with constant value, because the path may change, and it doesn't make sense to require updating every row of the table when nothing about the data in the table really changed.

Steve Kass
Drew University

BassGEN wrote:

>I'm at the early stages of a project at the moment that it seems is going to
>require the storage of large image files for reference in a database. The
>images are about 6 or 7MB each (compressed) and they have about 230 of them
>to store.
>My initial thought is that the easiest way to store these images is going to
>be to use a relational database to store references to each image (a URL)
>and then simply store the images in a normal file system.
>The other important thing to note as well is that there are about 3500
>datapoints of floating point numbers to be stored along with each image, and
>the collection of images and data is expected to grow exponentially. We have
>been told that the new images that will be added will be larger than the old
>ones and there will be more of them.
>I was talking to someone who is a lecturer in software engineering at my
>university and he told me that when it comes to large file sizes relational
>databases are not the best option and that there is another way that you
>should go. This is a bit of a surprise to me having really only learnt
>relational database in my degree. What I am wondering is whether or not
>there is anyone out there who knows anything about the storage of really
>large volumes of data and if they could point me in the right direction in
>my research.
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (
>Version: 6.0.456 / Virus Database: 256 - Release Date: 18/02/2003
Received on Sat Mar 22 2003 - 18:55:03 CET

Original text of this message