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 7683899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:54:07+00:00 2026-05-31T18:54:07+00:00

I have users that have several objects and can upload images for those objects.

  • 0

I have users that have several objects and can upload images for those objects. Each object has several items. The photos the user upload can be assigned to those items. The thing is, one object can have one specific item more than once.

To give an example: objects are cars and items are seats, windows, doors, etc. A car may have 5 seats, but all seats are the same item. The description of the image should, however, still be “seat 1”, “seat 2”, etc. and the user can upload multiple images for seat 2 as well.

Till now I have the following tables:

objects: id, name

items: id, name

assigned_items: id, object_id, item_id, quantity

images: id, object_id, item_id

How would you best solve this issue?

The reason I use quantity is, because if type of the item changes, then most probably of all the items. E.g. 4 seats can become 4 wheels, etc. So, if there was a row for each assigned_item, lets say seat1, seat2, seat3, etc, then this would be more difficult to change, no?

  • 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-05-31T18:54:08+00:00Added an answer on May 31, 2026 at 6:54 pm

    Take a look at this model:

    enter image description here

    It allows you to:

    • Connect multiple items to multiple objects (thanks to OBJECT_ITEM table).
    • Connect the same item multiple times to the same object (thanks to OBJECT_ITEM.POSITION field).
    • Connect multiple images to an object-item connection (thanks to OBJECT_ITEM_IMAGE table). So, we are connecting to a connection, not directly to an item.
    • Name the image specific to the object-item connection (thanks to OBJECT_ITEM_IMAGE.IMAGE_NAME field), instead of just specific to the image.
    • Ensure image name is unique per object-item connection (thanks to UNIQUE constraint “U1”).

    NOTE: This model can be simplified in case OBJECT:ITEM relationship is 1:N instead of the M:N, but your own attempted model seems to suggest it is M:N.

    NOTE: To connect an image directly to OBJECT (instead of OBJECT_ITEM), you’d need additional link table (OBJECT_IMAGE) in “between” OBJECT and IMAGE.


    Example data:

    OBJECT:
        Car
    
    ITEM:
        Seat
    
    OBJECT_ITEM:
        Car-Seat-1
        Car-Seat-2
        Car-Seat-3
        Car-Seat-4
        Car-Seat-5
    
    OBJECT_ITEM_IMAGE:
        Car-Seat-1-Image1 "Seat1 Image"
        Car-Seat-2-Image1 "Seat2 Image"
        Car-Seat-2-Image2 "Seat2 Alternate Image"
        Car-Seat-3-Image1 "Seat3 Image"
        Car-Seat-4-Image1 "Seat4 Image"
        Car-Seat-5-Image1 "Seat5 Image"
    
    IMAGE:
        Image1
        Image2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object of class Level that has several subsystems (child objects) it
I have an activity that contains several user editable items (an EditText field, RatingBar,
I have a complex page that has several user controls like galleries, maps, ads
I have a query that might be executed by several users consecutively. I'm scared
I have a web user control that contains several other (web user) controls and
I have a user control that takes a several seconds to load. Is there
I have a user control that is pretty basic. It contains several TextBox controls,
We have an application that uses several out of process COM objects for various
So, I'm working on an app where users can upload and manage photos with
I have a question that must be answer several times before, but I can't

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.