I persist the IMAGE source itself to the database using Entity Framework, and i makesure i inlcude the following in the database:
- Created Date
- File Type (Content Type)
- Source (binary)
- File Name
- File Size
- Height
- Width
I load it using byte streams/BinaryReaders. My Code is here:
http://garfbradazweb.wordpress.com/2011/08/16/mvc-3-upload-sql-server-entity-framework/
The full tutorial series is here:
http://garfbradazweb.wordpress.com/welcome-to-my-ancedotes/#
In terms of relationships, i have the following:
Media Table - Stores all the images and includes the above columns mentioned. You may need images related to other tables. The key is a uniquieid (SQL) for which the C# Type is Guid.
Profile Table - Stores my Profile of the user. Here i have a ImageId which is a ome-to-one relationship between the Profile row and the Image.
I have written a MVCImage app which shows you how to use this here:
http://mvcimage.codeplex.com/
Let me know if this is OK or if you need code examples.