This is a part of my database structure:
table: item column: item id Item Image Column: Item ID, Tag ID: Item IDID, Tag ID Table: Image Column: IMDID, Path, Size, Uploaddate Table: Item Image Column: Item ID, Idid
items can have more than one image, so I have an extra table "image" and in these items, these images Map not. Now I am seeing a problem with this structure. Before I can add images, I have to enter an item.
My question is now is this structure a good way to solve my problem with many images / tags for a problem?
Thanks
Yes, it is usually done this way. Fully normalized DB structure for that purpose
Depending on your application, some types of de-generalization may be required for performance at some points, but I will wait till you identify the actual obstacles.
Ensure that you have indexed all foreign keys and any other fields that you usually filter. Creating an overall index on ItemTag
and ItemImage
can also be a good idea.
Comments
Post a Comment