To avoid use of Database when managing files and pictures seems to be a big problem. And its true, use of dadabase is not good for large files.
For example.
Assume you make a discussion board, just like this one using PHP and MySQL. The forum allows users to upload their pictures for every post.
Of course the pictures don't go to the database but to one folder. The database just holds only the name of their picture file.
One day lets say the user decides to delete his post with the images. So in fact he orders PHP to excecute 2 separated tasks.
1st Task. Delete Pictures from the folder.
2nd Task. Delete Post from Database.
Lets say that his computer crashes or he switches his computer off at the middle of the tasks so that only 1st task has been executed but not the second.
So next time the post because useless, and forums become messed up with time.
How can we avoid issues like this?
Thanks
Alex.