getting picture from database

some changes to database structure.