J
Jonathan Wood
I'm thinking about building a site that would include user-contributed
articles, file attachments, images, and maybe videos.
I'm trying to determine the best way to store this data. Specifically:
A) What are the pros and cons of storing the file attachments, images, and
videos in a database vs. storing them as separate files?
B) I've decided user-contributed articles should not be submitted as HTML.
I'd have some code to convert newlines to <br /> and otherwise convert the
articles to HTML. I'm thinking about separate database columns for both the
original and the converted articles. The advantages would be that the site
would be fast because no conversion would be needed when serving the
articles, and it would be possible for a contributor to obtain the original
if they wanted to edit it and resubmit. I'd be curious if others thought
this was the best approach.
I'm interested in hearing all ideas.
Thanks for any suggestions
articles, file attachments, images, and maybe videos.
I'm trying to determine the best way to store this data. Specifically:
A) What are the pros and cons of storing the file attachments, images, and
videos in a database vs. storing them as separate files?
B) I've decided user-contributed articles should not be submitted as HTML.
I'd have some code to convert newlines to <br /> and otherwise convert the
articles to HTML. I'm thinking about separate database columns for both the
original and the converted articles. The advantages would be that the site
would be fast because no conversion would be needed when serving the
articles, and it would be possible for a contributor to obtain the original
if they wanted to edit it and resubmit. I'd be curious if others thought
this was the best approach.
I'm interested in hearing all ideas.
Thanks for any suggestions