I have a dating site where each user has many photos. When the user uploads the photo, I create three different photo sizes - small, medium, big with different pixels. The question is how to persist the names of the files in the database.
Should I have all three records with the file and path names, or I can have only the primary one and all others to be accessed via the hardcoded link with a prefix.
Melanie.jpg is stored in the database with one record, and all other sizes can be accessed via:
big_dsfdsfs_Melanie.jpg small_dsfdsfs_Melanie.jpg medium_dsfdsfs_Melanie.jpg
In the other case, I will have for every one image, three records in the database.