how to store image in database and retrive from database
It depends upon the circumstances. IF you are not having a large number of images then store them in you data base and their datatype should be blob. But if you are having a large number of images then store them in extra folder and save the path in your database