Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8402903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:12:03+00:00 2026-06-09T22:12:03+00:00

A Brand has an Image (logo – not nullable). A Product has many Images.

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:12:05+00:00Added an answer on June 9, 2026 at 10:12 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this basic one-to-many relationship in Core Data: Brand has N Products Product
A User can have many roles, but only one role per Brand. Class User
I have an object from a NSObject class that I call brand and has
I have two models. one is brand and another is product_detail. brands table has
Brand new to the Log4Net library and there is something I have not been
I have a brand new Objective-C class called test . The test class has
Say I have a table that has id and brand columns. Say I have
This is a Rails 3 application. I have images that can be tied to
I'm not brand new to the concept of unit testing but at the same
I have a form in MS Access which has an image. The image has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.