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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:23:34+00:00 2026-06-16T01:23:34+00:00

Trying to setup a Entity relationship but having difficulty figuring out a relationship i

  • 0

Trying to setup a Entity relationship but having difficulty figuring out a relationship i need:

I have a single Entity, Person. Person has two relationships, super_friend and sub-friend. Each Entity can have many friends (a Person Entity), so sub_friend is to-many relationship. I am not sure what super_friend is; a to-one or a to-many relationship.

Example: Bill is friends with Fred and Ted. Alice is also friends with Fred.

does this mean Fred’s super_friend needs to be to-many?

EDIT:

Entity Person Bill’s sub_friend points to Fred and Ted.

Entity Person Alice’s sub_friend points to Fred.

so what relationship does Fred’s super_friend have to Entity Bill and Entity Alice? If I pull up Entity Fred, will it only point to Bill or Alice?

I think that just answered my question. I would need Entity Fred to point to both Bill and Alice, so to-many. I want each Entity to be Unique.

What if i don’t care about who Fred’s super_friends are? i would only ever transverse “down” through sub_friends, never “back up” through super_friend/s.

EDIT 2:

Due to confustion let me expand my need: i need to sortive transverse the Entities.

So say I am Bill, i need to see who all Bill’s sub_friends (Fred and Ted). I select Fred. I then need to find all of Fred’s sub_friends and select one, etc. I need to be able to do this n times.

A solution with just a friend relationship would not allow me to keep the friends separate. Say Fred knows John and Stacy. When i query Fred, i won’t know if John is above (super_friend and won’t care about) or if John is a sub_friend (need to present in a table view for selection).

  • 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-16T01:23:35+00:00Added an answer on June 16, 2026 at 1:23 am

    Just look at this diagram:

    enter image description here

    Like you see Bill has many sub_friend’s, and Fred is sub_friend of many entities.
    So it’s a to-many relationship.

    EDIT

    I thought it was pretty obvious, but sub_friend is the reverse relationship of super_friend, because if Bill has Fred as sub_friend, then fred has Bill as super_friend.

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

Sidebar

Related Questions

I have an entity relationship setup in my mvc2 application such that each user
I have been trying to setup git for our web development team unsuccessfully. Some
I have a Group entity which has many Item entities. An Item entity can
I am new to iPhone development trying to figure out how to setup a
Trying to setup a simple Thread/Poll table mapping. Here is what I have: Threads
Using Entity Framework, I am writing a social networking app and trying to setup
I am trying to setup editing functionality using MVC3 and entity framework 4. I
I'm trying to add two tables to magento but it still dosen't work! I
I have two tables/entities client and site that have a many to many relationship
Okay, I have a database, but no tables in it. I have some entity

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.