Results 1 to 2 of 2

Thread: Save files in folder or database?

  1. #1
    Join Date
    Jul 2010

    Save files in folder or database?


    I'm working on a webbased file archive, and I'm not sure if I should make it store the different filetypes in a mysql database or a folder on the server!

    Which solution is the fastes to view / work with?

    (Have heard that files in databases makes queries very slow)


  2. #2
    Join Date
    Aug 2004
    Unless you need to be able to search/sort the actual file contents, I generally prefer to let the file system handle file storage and let the database system handle data storage. You may, however, want to store the actual files on the file system while storing data about the files in the database (author or owner, file type, descriptions, etc....), which may include the actual directory/filename info so you know which file to access based on your DB query results.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center