Added database functionality for storing photo data in a MySQL store