Thread: Data Type

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    Hi,

    I am building a database where I am inserting a file of size around 250K to 500K. The database runs to more than a GB. The file is a html page. I would like to know which data type to use for the file storage.
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,642
    Rep Power
    4492
    Depends on database program. In MSSQL, you can just use text and it'll easily hold 500K. I tried looking for a upper limit on text sizes in MSSQL and MS wasn't very specific, but I know it's very large.

    If you are using MySQL, then the following text columns are available, probably medium or long text will suite your needs.

    TINYTEXT and TINYBLOB -- A TEXT/BLOB with max length of 255 characters.

    TEXT and BLOB -- A TEXT/BLOB with max length of 65535 characters.

    MEDIUMTEXT and MEDIUMBLOB -- A TEXT/BLOB with max length of 16777216 characters.

    LONGTEXT and LONGBLOB -- A TEXT/BLOB with max length of 4294967295 characters.

    If you are using some other database program, i hope someone else can help you. those are the only two i know.

    ---John Holmes
    ---www.SepodatiCreations.com
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    Thanks for your immediate reply.

    I am using a MySql as my database backend.

Similar Threads

  1. SQL Server image data type
    By cf_greg in forum ColdFusion Development
    Replies: 5
    Last Post: October 18th, 2006, 09:01 PM
  2. Codepupil
    By Adachic in forum C Programming
    Replies: 3
    Last Post: February 6th, 2004, 06:50 PM
  3. [urgent]C programming: data type conversion
    By bythesea in forum C Programming
    Replies: 5
    Last Post: January 18th, 2004, 09:34 AM
  4. Handling large data for Long or CLOB data type
    By priyendu in forum Perl Programming
    Replies: 2
    Last Post: January 7th, 2004, 05:52 AM
  5. my comp sux lately , need help from pro's
    By Hykinsel007 in forum Windows Help
    Replies: 2
    Last Post: January 5th, 2004, 01:52 PM

IMN logo majestic logo threadwatch logo seochat tools logo