Professional Web Applications Themes

load 38000 images into MYSQL... - MySQL

Hello ... I have a problem.......I want to load 38000 images into MYSQL...How can I do that???can u help me.....actually..i have to create a database for the employee for my company..I have to load all the images according to their ID number....Can I do that in MYSQL becoz before this I have tried it in access..but access only limited to 2GB data only....The size for the images are about 5 GB. So now I want to do it in MYSQL.....Plz help me..........

  1. #1

    Default load 38000 images into MYSQL...


    Hello ...
    I have a problem.......I want to load 38000 images into MYSQL...How can
    I do that???can u help me.....actually..i have to create a database for
    the employee for my company..I have to load all the images according to
    their ID number....Can I do that in MYSQL becoz before this I have
    tried it in access..but access only limited to 2GB data only....The
    size for the images are about 5 GB. So now I want to do it in
    MYSQL.....Plz help me.......

    leen Guest

  2. #2

    Default Re: load 38000 images into MYSQL...

    leen wrote: 

    You need to use a BLOB or MEDIUMBLOB datatype for the column storing
    images. See http://dev.mysql.com/doc/refman/5.0/en/blob.html

    It sounds like your average image size is 138KB (5GB / 38000).
    I would recommend MEDIUMBLOB. A BLOB maximum size is 64KB. A
    MEDIUMBLOB has a maximum size of 16MB, which should be enough for any image.

    You can load the contents of a file into a field using the LOAD_FILE()
    function. See docs for LOAD_FILE() at
    http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
    There's even an example of loading an image file in an UPDATE statement.

    For example:

    INSERT INTO images_table (id, image_data)
    VALUES (1234, LOAD_FILE('/path/to/image_file.jpg');

    It would probably be best to write a script to generate your 38000
    INSERT statements needed to load all those files.

    Regards,
    Bill K.
    Bill Guest

  3. #3

    Default Re: load 38000 images into MYSQL...


    leen wrote: 

    Unless there was a very good reason (data tion perhaps?) I
    wouldn't store the images in the DB (just think about the back-ups!).
    Instead I'd just store the path to the images. There's lots of
    discussion out there on the pros and cons of both approaches, as well
    as tutorials on exactly this kind of thing - including the construction
    of thumbnails on the fly and even 1 or 2 completely free and excellent
    php/mysql gallery packages.

    strawberry Guest

Similar Threads

  1. load images on mac but not on pc
    By martinstaceyuk in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: December 14th, 01:53 PM
  2. Images Fail to Load Using MySql / DreamWeaver.
    By Braulio Lumbreras in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: April 3rd, 03:35 AM
  3. help: using xml to load images into flash MX
    By echopixel webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: January 15th, 08:15 AM
  4. load images from cdrom into ram
    By Thomas in forum Macromedia Director Lingo
    Replies: 2
    Last Post: December 17th, 03:08 AM
  5. Images won't up load
    By Scott Mangold in forum Macromedia Fireworks
    Replies: 1
    Last Post: July 18th, 02:25 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139