Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Php Messaging System

  1. #11
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    Yup you got it. Messages in one table pointing to the person who left it. Storing them as blobs is just fine.

    Ahm the issue of images in the database or the file system is a debate that will never end. I personally use the database for images (<200K) to prevent accidental deletion on the file system by some other process.

    You would not store a 2MB image on the database as it could cause performance degredation. Large files are best handled by the file system of the server on which the database resides.

  2. #12
    Join Date
    Apr 2003
    Posts
    13,269
    Rep Power
    34

    Default

    Quote Originally Posted by Blunty Killer View Post
    I personally use the database for images (<200K) to prevent accidental deletion on the file system by some other process.
    Curious, what other process would accidentally delete image files on the server? And wouldn't your web files (asp, php, html, etc.) be in danger of being deleted as well? Unless the processes only target image files.

    Not to mention your database files being deleted by said processes, unless you have your database server on another server separate from your web server.

    If had experience having your images accidentally deleted by a process, I wouldn't mind reading about it.

    Personally, I would store the images in a specified folder on the server and point to it from the database.

  3. #13
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    Wow, never expected such a narrow interpretation of 'process.' But regularily companies only make backups of dbs and essential os files to get the db up and running in terms of failure. One counting on such an event would have to accept that only essential files will be restored of which your images are not.

    As i noted to preempt any debate, anyone can use any method, not really trying to start a debate on the merits of either, the net is already populated with them.

  4. #14
    Join Date
    Apr 2003
    Posts
    13,269
    Rep Power
    34

    Default

    Quote Originally Posted by Blunty Killer View Post
    Wow, never expected such a narrow interpretation of 'process.' But regularily companies only make backups of dbs and essential os files to get the db up and running in terms of failure. One counting on such an event would have to accept that only essential files will be restored of which your images are not.

    As i noted to preempt any debate, anyone can use any method, not really trying to start a debate on the merits of either, the net is already populated with them.
    Not wanting to debate anything at all. Trying to see and understand the reasoning behind why you do, what you do.

    And it's the first time I am reading that there is a debate on the net about storing images in a database vs storing them on the server. I have just found it easier to work with the images stored on the server and link to them from the database, than manipulating them with code, when retrieving and storing them in the database.

    I would hope Wallizzle and others would be able to understand the pro's and con's with both coming from the convo.

    Just 2 points to your response comes to mind.
    1. Would the risk of those images being deleted, be the same for the rest of your site's files? So it's not just the images you will need to be worried about as well, yeah? Then keeping a backup of your sites file, either on your pc or else where would be beneficial. (I usually keep a backup of my site on my pc)

    2. One would check with a host before they sign up, if they do regular backups of both the database and your entire site.

    With those 2 points, this would help lower the risk of your files being accidentally deleted, and if they are, you are able to restore it with your backup quickly.

    What's your thoughts on it?

  5. #15
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    Quote Originally Posted by Arch_Angel View Post
    Not wanting to debate anything at all. Trying to see and understand the reasoning behind why you do, what you do.

    And it's the first time I am reading that there is a debate on the net about storing images in a database vs storing them on the server. I have just found it easier to work with the images stored on the server and link to them from the database, than manipulating them with code, when retrieving and storing them in the database.

    I would hope Wallizzle and others would be able to understand the pro's and con's with both coming from the convo...
    Ok, apart from personal preference there was an article posted on Oracle sometime ago that addressed this issue. After reading I had agreed with the points presented by the author and applied them to my own projects.

    Here is an excerpt from the Manageability section of the same document:

    Images stored in the database can be directly linked with metadata. In the one transaction an image can be manipulated, a thumbnail of that image created and all associated metadata modified. Related information is kept in sync. If an image is stored in a file system, then it is possible for external processes to delete or modify that image, causing the image itself to either become orphaned or lose synchronicity with its corresponding relational data. Another common issue is web quality images losing their associated thumbnails, meaning web page displays become broken.
    I have highlighted a particular section which shares my sentiments about storing images in the database.

    The article can be found here - The Move To Store Images In The Database.

    Again this is my personal decision to apply a technique I learned while reading another document. It can work for some, and not for others. I encourage everybody to read as much and learn as much about these issues and make a decision about the environment which you work. My environment does not give me control over backup processes of the servers which my applications are deployed. When I install an application, the company takes over archiving. If they choose to backup only databases and nothing else, I would not not want my application relying on any external files that it itself cannot reinitialize such as reports, ini files, etc. Things that are a part of the installation package.

  6. #16
    Join Date
    Apr 2003
    Posts
    13,269
    Rep Power
    34

    Default

    Thank you. That's all I wanted to know.

  7. #17
    Join Date
    Feb 2003
    Posts
    3,184
    Rep Power
    0

    Default

    @Blunty Killer I've read that article and they use the phrase "not possible" far too often. For future reference find a better article or write one yourself.

    From what I've read Wallizzle doesn't seem to understand the concept of a table as a list of rows and columns. You need to read up some more on that. "A table has a specified number of columns but can have any number of rows."

  8. #18
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    Quote Originally Posted by owen View Post
    @Blunty Killer I've read that article and they use the phrase "not possible" far too often. For future reference find a better article or write one yourself."
    LOL! Are you serious? LOL!

    Ok, In the article the phrase "not possible" is used twice (didn't know this was far too often).

    Here is the first under security

    If all images are stored in a directory then fine grained control is not possible.
    This reference only bolsters the use of databases because it clearly states that using a directory removes fine grained control.

    Second time it is used in the article is here:

    That is, it is not possible to restrict access of the images to individual users.
    This also means that it is impossible to restrict other users from accessing those files whereas in the database you do have control.

    I do not know the purpose of your post, but I did read the article and found the article very informative, insightful, and again presenting techniques that I employ.

    Strange, you are the first to say the article is not good.

  9. #19
    Join Date
    Feb 2003
    Posts
    3,184
    Rep Power
    0

    Default

    You can tell its not a rounded article because of how it goes about developing it points. Its hard for me to explain but its largely biased towards Piction and Oracle. It really doesn't explain anything substantial. Basically "put pictures in database is better". Nothing about indexing or clusters or partitioning or table sizes. as I said before a better article would be good.

  10. #20
    Join Date
    Mar 2005
    Posts
    161
    Rep Power
    0

    Default

    Quote Originally Posted by owen View Post
    @Blunty Killer I've read that article and they use the phrase "not possible" far too often. For future reference find a better article or write one yourself.

    From what I've read Wallizzle doesn't seem to understand the concept of a table as a list of rows and columns. You need to read up some more on that. "A table has a specified number of columns but can have any number of rows."
    Hey man I do understand at least that... this thread was not meant for bashing what little I know about dbms... I want views, ideas, n opinions... now if you may just focus on whats at hand plz... thanks man
    Owned:
    >> Samsung Galaxy Note 3; LG Optimus G; Nexus 4; Samsung Galaxy Ace Duos
    << Microsoft Surface RT; Dell Venue 8; Asus Transformer

Posting Permissions

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