If you are not storing the file itself (which I have not done), you can simply store the filename in the database and that way you just have to read the filename out later to use the image.
Er, if you need more detailed help, please say exactly what you know about using a database like if you have one setup, if you can create tables, if you can insert and select rows...