A Brand has an Image (logo – not nullable). A Product has many Images. An Image must have either a Brand or a Product, but I can’t use “not nullable” on either field because an image only belongs to one of them?
How would you map this kind of relationship?
Brand 1—-1 Image *—-1 Product
So no matter what, an image will always have a Brand or a Product? Can a Brand have more than one image? In most cases Brand or Product is a one-to-many relationship with Image.
Meaning that a Product or a Brand at any given time can have an Image.
I’m not sure the way you worded makes a lot of sense. But usually in most cases an Image table would be a lookup table, and would necessarily have relationships to Product or Brand, but Brand or Product would have an ImageID column, hence the one-to-many relationship.