Jump to content

Content-in-MySQL, newbie question


aeris130

Recommended Posts

I'm currently trying to learn about MySQL in order to get rid of about 350 php-files currently plaguing my host.

I've noticed that there's a lot of tutorials etc about storing contacts, passwords, etc, but I'm also interested in storing my entire content, including extensive articles.

So, first of all, how much space would be required for this? Also, are there any tutorials specifically regarding this, or can most tutorials about retrieving info from MySQL be applied?

In other words, is there anything special that I should keep in mind when storing extensive content, compared to names, phonenumbers etc?
Link to comment
Share on other sites

Assuming you're just talking about text files (and not binary data), my recommendation would be to keep them in a separate table. TEXT/LONGTEXT fields are not fixed-width, so they may slow down queries on existing fixed-width tables. Otherwise, there's nothing special about storing 65K of text in one field vs storing 250 characters.
Link to comment
Share on other sites

You shouldn't have any problems storing HTML in the database, although storing PHP code is slightly more involved (if you want it to be executed when it comes out).

One of the nice things about storing articles in MySQL is you can use COMPRESS() and UNCOMPRESS() to transparently save space. Some MySQL installations may not have support for it though.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.