For 1, isn't it often simpler to restore single files than it is to restore single rows?

For 2, ideally, even if you are storing the file path in the db, wouldn't you want that file to exist in one place only and have the cluster access the 'file server'?

For 3, wouldn't that be a non-issue if the file path is stored in the db? In that case the db knows where the file is and can be used to reference the file regardless of application.

- Calvin

  ----- Original Message -----
  From: Jim Davis
  To: CF-Talk
  Sent: Wednesday, December 10, 2003 11:25 PM
  Subject: RE: File Storage - Database vs. File System

  The nice thing about storing the file in the DB is that all your data is
  maintained in one place.  This has many benefits some of which are:

  1) One data store, one clean backup, one clean restore.

  2) No issues with cluster redundancy: the file is only stored in one place
  regardless of whether 1 or 20 servers use it.

  3) The data can be leveraged for more than CF if need be.

  4) You can leverage the databases built in referential integrity to great
  effect.

  That being said this does (among other things):

  1) Place more stress on your DB environment.  This can also depend on the
  types of files - are we talking small photos for photo IDs or 100 megabyte
  video files?

  2) Make for more complex application code (although as always - build it
  right and it won't be complicated).

  3) Use more (potentially very expensive) storage on the DB.

  4) Potentially make your application slower.

  I've generally found that storing the information in the DB is great - but
  in use can be slow.  So when performance counts and storage isn't an issue I
  store the information in the database and cache the file on the web server
  for use.  The code first checks to see if the file exists and is the same
  date as the file in the DB - if not it pulls it form the DB and writes it to
  the web server.

  You can choose not to cache or handle the cache in any way you like - but if
  you've got the space the cache gives you best of both worlds.

  Jim Davis

    _____  

  From: Jeff Chastain [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 10, 2003 10:11 PM
  To: CF-Talk
  Subject: File Storage - Database vs. File System

  I am working on an application where the user will have the option to upload
  files to the server.  The project specifications are open in terms of
  storage of the files, so I am wondering .... what are the benefits or
  downsides of storing a file in the database vs. storing it in the file
  system?  I have in the past stored files in a file system and used cfcontent
  to push the file back to the user, thereby hiding the file structure to the
  end user.  However, this always runs into issues with duplicate file names.

  Suggestions?

  Thanks
  -- Jeff
    _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to