Jump to content
Larry Ullman's Book Forums

Recommended Posts

I have an images table that has 5 foreign keys that reference 5 other tables, each of those tables uses the images table to store images, when an image gets uploaded, the foreign key in question gets a value associated with it in the images table but the other 4 foreign keys will get NULL values in that row. Is that acceptable, or should I rethink my database design? What would be the best way to go?

 

 

Link to comment
Share on other sites

  • 1 month later...

Are you actually storing images is a table or are you storing image URLs?

 

If you are storing images (as blob data) it might be appropriate to ask here about the wisdom of this. From what I've researched it is not advisable as it is too taxing on the performance of the dB.

 

So, if you are redesigning anyway, try keeping the images in your file system and reference by URL.

 

This is as much a question as a suggestion because I know there may be reasons "backing up?" for keeping images in a table.

OR

It could be that my information is simply outdated by now.

Link to comment
Share on other sites

 Share

×
×
  • Create New...