SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Shiver me timbers!! anthony_irl's Avatar
    Join Date
    Aug 1999
    Location
    Dublin, Ireland
    Posts
    495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Put files in the database/or not?...

    Hi all,

    Im currently building a mySQL database for a project Im working on. The system will deal with files and at the moment I am planning to store path information in the database instead of the files themselves. I am wondering whether this is the best way to go or should I store them in the database as BLOBs. Most of the files will be Word documents.

    At the moment I would be planning to store the files in a folder and then reference the path in the DB. The PHP would delete any files that are currently not linked to by the database. Any opinions or comments would be really appreciated.

    Thanks,
    Anthony - How's tings?

    24 hours in a day, 24 beers in a case. Coincidence? I think not.
    Contact me by: PM Email NEW! Carrier Pigeon

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BLOBs are to be avoided at all costs! Don't touch them with a barge pole! BLOBs are an incredibly inefficient use of resources - they require huge amounts of memory on the server to by swallowed up, cause oodles of extra network traffic, and dramatically increase database fragmentation rates. In addition (as if that wasn't enough), Access databases have a 2GB file size limit, which BLOBs help you reach rather too quickly.

    All in all, I can't think of ANY advantage of using BLOBs other than making it easier to back up all the data (because it's all in one place).


    M@rco


Bookmarks

Posting Permissions

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