as far as I know, this depends heavily on your database type.
I work with oracle, there you can use blob fields and the like, but it's terribly complicated, so we chose to store the images in our file system and just enter the filename into the db.
better look up your database reference.