Personaly I like to keep my databases as smal as posible and store pictures in separat files. You could make one folder for tumbnails and one for full size images. You in the database you could just store the filenames, or you could call the images $id.jpg or $id.gif or something like that, and then just store the filetype in the database.
Hope this helps
Andreas