views:

45

answers:

3

I am working on project -online file management where we have to tore file and images.so we are in confusion state that whether we use file system or database to store file and images;;;;;

A: 

Keep your files out of the database. Create a record in the database like so:

 primaryKey   FileName    FileDescription     OnDiskKeyName 
 ------------ ----------- ------------------- -----------------

use a UUID to give a unique name to the file, and a link to the database with a human-readable name.

Chris Kaminski
A: 

An usual approach is to store big binary data (e.g. images) in files, and put pointers to them in a database. This way the best of both worlds can be combined (to a degree, at least); file system's efficiency of file storage, and database's search / sort / lookup capabilities.

Joonas Pulakka
+1  A: 

This question has been asked before.

Ken Liu