add an option to control if image should be saved in database
save market into database; add database upgrade scripts