linked myPhotos and allPhotos to db