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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:28:08+00:00 2026-06-01T19:28:08+00:00

I have a fundamental design question in modelling the relationships between the entities for

  • 0

I have a fundamental design question in modelling the relationships between the entities for my application. Apple doc states Inverse relationships are very important to database integrity. I have three entities, Team, Player, Match with following relationships

Team <--->> Player
Player <--->> Team

The above relationship is straightforward, a Team can have many players, and a Player can belong to multiple teams.

Match:
homeTeam <---> Team
awayTeam <---> Team

In my Match entity, I have two properties homeTeam and awayTeam. Currently, their destination is set to Team with no Inverse relationship. Though application works I don’t like the fact there is no inverse relationship to a match from a team.
So, I am trying to figure what is the best way to setup inverse relationship for the Team entity. Also, I can’t setup a one-to-one inverse relationship from team to match, since a team can play many matches. So, my initial thought is I can have a property matches in Team and make them the inverse relationship to a Match. Will this scenario work? or Do I need to create two inverse relationship properties like homeMatches, awayMatches in Team?

Thanks for any thoughts.

Javid

  • 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-01T19:28:09+00:00Added an answer on June 1, 2026 at 7:28 pm

    I think your homeMatches, awayMatches idea should work well.

    One other thing that jumped out at me is your relationship where a player belongs to more than one team. I assume that shouldn’t be true for multiple teams at one time, which suggests that you might want some table in the middle (perhaps called RosterEntry) that would describe one player’s time with one team. Team and Player would then be one-to-many with RosterEntry.

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

Sidebar

Related Questions

i'm missing something fundamental here. i have a very simple custom class that draws
I was hoping if anyone can answer a fundamental question that I have regarding
I'm just getting used to Subversion and I have a fundamental question about versioning.
I have a Fundamental question in using Jquery with PHP when making ajax calls
I'm writing a Java wrapper for an API and I have a fundamental question
I have been doing some research for using MSMQ. Following 2 gave me fundamental
I know this is fairly fundamental stuff. I have a class with a function
I'm missing something fundamental here. I have a table view with each cell displaying
We have a component based C++ design, where each component is comprised of a
I'm trying to understand some fundamental best practices using Entity Framework. My EDM design

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.