Blob vs text in the forum

I am writing a forum website, but I had a problem creating a database for storing messages right now. From what I read, phpBB 3 stores the data published by the user as a BLOB, and some store the data as text. Is there an advantage that could have been otherwise? What about maximum characters if you need to store data as text? I have never extracted BLOB data from a database or analyzed it for text (or any data that is supposed to be for that matter), but I think that learning how to use it would be interesting.

The text data for the message will be encoded in utf8. I am using a MySQL database.

In addition, how could you upload images for the forum, and if the images are stored as part of a database, for example, in a BLOB, should it be saved as separate files?

Any recommendations / suggestions are welcome.

+5
source share
1 answer

The text and blob are almost identical, the main difference is that you have to take care of the coding yourself when using blob. On the other hand, you will be forced to use a text field encoding ... Saving files in a database has some advantages and disadvantages:

Benefits:

  • Backups and switches to another server are easier to achieve.
  • No need to add another method to access files near the database

Disadvantages:

  • , , .
  • -

, , , ; , .

+9

All Articles