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.


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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...