SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL - Large Fields?

    I'm just starting to learn PHP and MySQL, so please be kind

    Here's what I'm thinking:
    Create a table (called "articles"). Inside this table there would be the fields "id" "author" "date" "content".

    My question is, can fields in a MySQL database be very large? In most of the examples I've seen of MySQL, the fields seem to be very small. With a few sentences, at most, inside a field. Is it practical/possible to contain an entire article inside a MySQL field? (ex: many pages) Would this present performance issues?

    For example, say there is a table (like the one above) with 700 rows. Each row has a content field of 4-8 pages of text. Would this create any problems?

    Thanks!
    Peter

  2. #2
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Peter,

    mysql has this field type called text. This is an extract from the mysql manual,
    TINYBLOB
    TINYTEXT
    A BLOB or TEXT column with a maximum length of 255 (2^8 - 1) characters.

    BLOB
    TEXT
    A BLOB or TEXT column with a maximum length of 65535 (2^16 - 1) characters.

    MEDIUMBLOB
    MEDIUMTEXT
    A BLOB or TEXT column with a maximum length of 16777215 (2^24 - 1) characters.

    LONGBLOB
    LONGTEXT
    A BLOB or TEXT column with a maximum length of 4294967295 (2^32 - 1) characters.
    Paul

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul!


Bookmarks

Posting Permissions

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