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

  • Home
  • SEARCH
  • 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 3306084
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:14:47+00:00 2026-05-17T21:14:47+00:00

My application is CoreData based but they may be a common theory for all

  • 0

My application is CoreData based but they may be a common theory for all relational databases:

I have a Output-Input to-many relationship in my model. There are potentially an unlimited number of links under this relationship for each entity. What is the best way to identify a specific input or output?

The only way I have achieved this so far is to place an intermediate entity in the relationship that can hold an output and input name. Then an entity can cycle through its inputs/outputs to find the right relationship when required. Is there a better way?

Effectively I am trying to provide a generic entity that can have any number of relationships with other generic entity.

Apologies if my description isn’t the clearest.

Edit in response to the answer below:
Firstly thank you for your response. I certainly have a two-way too-many relationship in mind. But if a widget has 2 other widgets linked to its Inputs relationship what is the best way of determining which input is supplying, say, ‘Age’ or ‘Years Service’ when both may have this property but I’m only interested in a specific value from each?

  • 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-17T21:14:48+00:00Added an answer on May 17, 2026 at 9:14 pm

    I’m as confused as Joshua – which tells me that it may be that you haven’t got a clear picture of what you’re trying to achieve or that it is somewhat complex (both?).

    My best guess is that you have something like:

    Entity Widget
    Attributes:

    • identifier

    Relationships

    • outputWidgets <<->> Widget
    • inputWidgets <<->> Widget

    (where as per standard a ->> is a to-many relationship and <<->> is a to-many relationship with a to-many reverse relationship).

    So each widget will be storing the set of widgets that it has as outputs and the set of widgets it has as inputs.

    Thus a specific widget maintains a set of inputWidgets and outputWidgets. Each of these relationships is also reversed so you can – for any of the widgets in the input or output – see that your widget is in their list of inputs or outputs.

    This is bloody ugly though.

    I think your question is how to achieve the above while labelling a relationship. You mention you want to have a string identifier (unique?) for each relationship.

    You could do this via:

    screengrab

    Where you create a new widgetNamedRelationship for each double sided relationship. Note that I’m assuming that every relationship is double sided.

    Then for each widget you have a set of named inputs and named outputs. This also allows for widgets to be attached to themselves but only of there are separate input and output busses.

    So then for your example “age” in your implementation class for Widget instance called aWidget you’d have something like:

    NSPredicate *agePredicate = [NSPredicate predicateWithFormat:@”name=’age'”];
    NSSet *ageInputs = [aWidget.inputs filteredSetUsingPredicate:agePredicate];

    Have I understood the question?

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

Sidebar

Related Questions

I have a document based application running with core data. The object model has
I have an application based on CoreDataBooks. I want to toggle two images in
I am developing a core data application based on the CoreData books example. Is
hii friends, My application based on RSS Feeds where i have to use database
I have a navigation based app that uses Core Data for storage. The schema
I've got a document based App using Core Data, and have a tableView which
Can someone please explain me the meaning of For a very simple application it
ich have the following problem: I'm using a the construct of the default Navigation
I am developing an app that lets the user record videos and photos. Now

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.