designing question

roseta

Member
Joined
Jun 7, 2004
Messages
7
Programming Experience
10+
hello

I want to design a database for a doctor. he needs the picture of his patients to be in database
before and after surgery. so there would be lots of pictures with .jpeg to deal with.

I wanted to know is it better to put the pictures in database or the best way is to put them on a
drive and keep the path in the Database. we can put the pictures thruogh an algorithm in directories
then when opening them , go for the path.

I appriciate your oppinion on this.
roseta.
 
I you use MSDE 2000 you might fill the database if you save too many images. There is a limit of 2GB per database. The new version of SQL 2005 allows for 4GB I think.
I wouldn't worry about the size of the database too much if you are using SQL Server Standard or Enterprise and have a good backup solution.

Again. It all depends on how many images and the size of each each image.
 
Storing Images

I'm done this a couple of times before. For a small single user system using a database with limited capabilities (e.g. MSDE and Access), I find it best to store the images in the database.

However, as the system grows (storage and users), and you have more and more images, it's better to store the images in the directories and just store the path to the in the database. Otherwise, you will find that your database will be struggling to serve requests.

If you follow this path, you need to remember that there is a limit to the number of files in a single directory. Also, you will want to limit the number of files per directory as the file system will be able to cope better that way. As such, your application will need to create and manage multiple directories and you need to devise an algorithm to decide with directories each image need to be stored in.
 
Back
Top