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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:20:37+00:00 2026-05-20T23:20:37+00:00

I was hoping someone could tell me if this would be bad database design:

  • 0

I was hoping someone could tell me if this would be bad database design:

Let’s say I have two tables:

Person  
Contract

And let’s say I get two types of contracts, a single contract (which involves only one person) and a joint contract (which involves two people). There are no other permutations.

It would be the simplest to set up the Contract table with two FK fields, one of which is nullable, i.e.:

Contract:

ContractID     Description               PersonID      PersonID_Second
1              Single person contract    1112          NULL
2              Joint contract            1073          900

Is this a bad idea?

Thanks
Karl

  • 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-20T23:20:38+00:00Added an answer on May 20, 2026 at 11:20 pm

    Two more cents: Are the relationships between the two Persons and the Contract equivalent? Is there a “first” person and a “second along for the ride” person, or do they both share equal importance with regards to this contract? And is the distinction between one-person and two-person (and possible future N-person) contracts an important attribute of the contract?

    • If relationships are equivalent, then go with Mitch’s many-to-many solution.
    • If there is an important distinction between first and second, Parched Squid’s [saying that that made my morning better!] multiple FK fix would work well.
    • But if you forsee N-person contracts, stick with the many-to-many, with an extra attribute in the relationship table indicating “which” relationship is being designated.
    • And if you need to sort through your contracts to find or sort by the 1, 2, or N-person ones, it might be more convenient to have an extra attribute indicating type of contract, rather than implementing lots of joins and null-checking logic to count each contract’s related persons.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Perl and was hoping someone could tell me what this means
I was hoping someone could give me a hand on how I write this
Could someone tell me if the code below would achieve what I want, which
I was hoping that someone could tell me the best practice for the scenario
HI All I was hoping someone could help me improve a query I have
I am hoping that someone might be able to tell me how I could
I'm hoping someone can help me with this. When I'm styling html components say
I was hoping someone could tell me how to bring an entire set of
I was hoping someone could tell me if there is a way to store
I was hoping someone could tell me which is the more efficient and/or correct

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.