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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:57:02+00:00 2026-06-02T19:57:02+00:00

thanks in advance for your input. I have 3 objects: School Camp Coach With

  • 0

thanks in advance for your input.

I have 3 objects:

  • School
  • Camp
  • Coach

With the following relationships:

  • A School can have multiple Camps.
  • A School can have multiple Coaches.
  • A Camp can have multiple Schools.
  • A Camp can have multiple Coaches.
  • A Coach can have multiple Schools.
  • A Coach can have multiple Camps.

A many to many, School_Camp, obviously links a School to a Camp with an additional field for Date, to identify the year of the camp. But one camp can have multiple coaches.

::School_Camp::

  • School_id
  • Camp_id
  • Date

Would it be better for me to set up another many to many, School_Camp_Coach, that links to the School_Camp and Coach tables?

::School_Camp_Coach::

  • School_Camp_id
  • Coach_id

If this is the more efficient way to do this… should I give School_Camp an independent id column that can quickly be referenced rather than using the three fields as an identifier?

::School_Camp::

  • id*
  • School_id
  • Camp_id
  • Date

OR

Is it better to just have ONE many to many table, School_Camp_Coach, with 3 foreign keys?

::School_Camp_Coach::

  • School_id
  • Camp_id
  • Coach_id
  • Date

The only issue I foresee with this, is that you’ll have multiple entries for the foreign keys, but with different Dates.

Thanks again.

  • 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-02T19:57:08+00:00Added an answer on June 2, 2026 at 7:57 pm

    It is not a matter of efficiency, it is a matter of correctness: the two options that you presented do not model the same relationship between the records in the tables.

    Each record in the database means something. If the meaning of the record in the junction table is “X coached at the camp Y of the school Z”, then you should go with the option 2; if you are looking to model the meanings “X coached at the camp Y” independently of “X coached for school Z” and independently of “School Z ran camp Y”, then you should go with option 1.

    In both cases you should give your junction records independent primary keys, rather than relying on three-way combination of IDs: it will simplify your life when you implement code that applies corrections to the junction table.

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

Sidebar

Related Questions

Thanks in advance for your input. I have a question regarding the following AppleScript.
Thanks in advance for your time. I have a deeply nested XML whose XSLT
thanks in advance for your help. I am wondering if there is a (design)
Thanks in advance for your help experts. I want to be able to copy
First off, thanks in advance for your help. This issue is driving me nuts.
Thanks in advance.. I have a windows phone application. In that I am showing
thanks in advance for the replies.... I have started to create a network topology
Thanks in advance. How can I stop downloading when some events occurred in wp7.For
Thanks,in advance I want to remove all the zero size files in specified directory,can
If I have the following code : <li> <span class=radio_appt> <input id=color1 type=radio name=ctl00$cph1$appointment

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.