Firstly, I'll make a back up of your current website - and I'll set up a development environment. Once, that's done - I'll use a copy of the backup for development and I'll integrate the functionality you require (in this case, it's uploading photo's and storing them in a database).
I have to ask though, how sure are you that you want to store photo's in a database?
^ As an addition, if you like, I would like to make a temporary cache for photo's; so when a photo is downloaded from the database, it should temporarily be cached for a specific amount of time on the filesystem to prevent us from constantly hitting the database unnessacerily.
Get in touch!