i got a question about the upload a pic and save it to database

can anyone show me how to do the process of upload a picture to store it to the database. and when i need to use the picture i can retrieve from database ? can give me an example of it ? thank you ~~