Post by JNeuhoff » Tue Dec 25, 2007 4:35 am

I noticed that the 'product' table has a foreign key 'image_id' pointing to the 'image' table (one-to-one or many-to-one relationship). However, there is also a 'product_to_image' table for implementing a many-to-many relationship between 'product' and 'image' tables. Doesn't the latter make the 'image_id' field in the 'product' table obsolete?

I assume that a product can have one or more images, and that an image can be shared by multiple products.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by bo-oz » Thu Dec 27, 2007 11:46 pm

it could be that the image_id in the products table points to the default image... I do not know this for sure... but that is a solution that is sometimes used in database design

bo-oz


Post by Daniel » Fri Dec 28, 2007 4:19 am

One is the main product image and the others are additional images.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 2 guests