www.webdeveloper.com
Results 1 to 2 of 2

Thread: Save files in folder or database?

  1. #1
    Join Date
    Jul 2010
    Posts
    71

    Save files in folder or database?

    Hi

    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)

    David

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,334
    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.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

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



Recent Articles