This topic is locked

Storing images on a separate table

8/1/2008 1:08:41 AM
PHPRunner General questions
P
premium author

Hi all,
I would like to create an Business Directory type of application where registered users would be able to upload their entries together with a maximum of 5 images.
now for performance reasons I do not want to store the textual information on the same table as the images (I want all columns on the entry table to be of fixed length, fully searchable etc).
ideally i would have

  • a table called entry_text with columns entry_id,title, description, image_id1, image_id2, image_id3 etc
  • a table called entry_images with columns image_id and image (blob)
    would this be something that phprunner could handle? maybe using a master-detail?
    In general what would be the best practice?
    thanks in advance

J
Jane 8/1/2008

Hi,
sure you can use master-detail relationships for this purpose.

Only one note: I recommend you to following structure:

  • a table called entry_text with columns entry_id,title, description, images_id.
  • a table called entry_images with columns images_id, image1 (blob), image2 (blob), etc.