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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:38:45+00:00 2026-05-12T05:38:45+00:00

I am trying to create a database to hold my address book but I’ve

  • 0

I am trying to create a database to hold my address book but I’ve ran into a slight problem.
My database is supposed to hold individual contacts along with company contacts. That is an entry can be either for an individual or a company. As you know both individuals and companies have addresses and I want a One-To-Many relationship between individuals and addresses as well as companies and address.

So an individual can have many addresses
and a company can has many addresses

the problem is when trying to design the schema I am not sure what the best approach here is. Should I put two foreign keys in the address table, one for individual_Id and one for company_Id or should I create a linking table for each individual to address and company to address relationships.

The foreign keys do sound easy but don’t know if that’s the right approach, and linking seem like the right approach but don’t know if this is overkill as they are mostly used for Many-To-Many relationships.

Thoughts?

  • 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-12T05:38:45+00:00Added an answer on May 12, 2026 at 5:38 am

    There are various approaches to this…The approach we took was to have a “Names” table, the equivalent of your contacts table; an addresses table, and a phone numbers table.

    The addresses and phone numbers tables each had a foreign key to the names table. The names table had a “type” field in it so that we could tell if the name was that of an individual, company, sole proprietor, etc.

    The phone numbers table had a type field in it also, so we could tell whether the phone number was Work, Home, Cell, etc. In addition, we allowed the user to store a copy of one of the phone numbers in the Name table to serve as a Primary phone number.

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

Sidebar

Related Questions

I am trying to create a contacts like app for iphone where the name
I'm trying to get my head round this mind boggling stuff they call Database
I am trying to use a Generic Linked List to hold some WorkFlow steps
I'm having a little bit of trouble saving data to a database. Basically, I
First.. here are the two tables I've created (sans irrelevant columns).. CREATE TABLE users_history1
I'm trying to test a proposition that one of our vendors presented to us
Im trying to learn MVVM so far its going well , I have stumble
i am self-studying asp.net and was trying some small projects to help understand the
Basically I am inserting an image using the listviews inserting event, trying to resize

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.