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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:40:56+00:00 2026-05-11T02:40:56+00:00

Does anyone have a process or approach to use for determining how to resove

  • 0

Does anyone have a process or approach to use for determining how to resove a many-to-many relationship in a relational database? Here is my scenario. I have a group of contacts and a group of phone numbers. Each contact can be associated with multiple phone numbers and each phone number can be associated with multiple contacts.

A simple example of this situation would be an office with two employess (e1 & e2), one main voice line (v1), one private voice line (v2). e1 is the CEO so they have thier own private voice line, v1, but they can also be reached by calling the main line, v2, and asking for the CEO. e2 is just an employee and can only be reached by calling v2.

So, e1 should be related to v1 & v2. e2 should be related to v2. Conversly, v1 should be related to e1 and v2 should be related to e1 & e2.

The goal here is to ge able to run queries like ‘what numbers can e1 be reached at’ and ‘what employees can be reached at v2’, etc.. I know the answer will involve an intermediate table or tables but I just can’t seem to nail down the exact architecture.

  • 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. 2026-05-11T02:40:57+00:00Added an answer on May 11, 2026 at 2:40 am

    Employees:

    eID, eName 1, e1 2, e2 

    PhoneNumbers:

    pID, pNumber 1, v1 2, v2 

    EmployeePhones:

    eID, pID 1, 1 1, 2 2, 2 

    then you inner join. if you need to find out what number(s) e1 can be reached at (t-sql):

    SELECT E.eName, P.pNumber  FROM   dbo.Employees E  INNER JOIN dbo.EmployeePhones EP ON E.eID = EP.eID  INNER JOIN dbo.PhoneNumbers P ON EP.pID = P.eID  WHERE E.eName = 'e1' 

    I believe this should work (testing it right now…)

    EDIT: Took me a few minutes to type up, sorry for duplication…

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

Sidebar

Related Questions

I have a C++/MFC application I need to restructure. The app used to process
Here's my problem. I need to set up a process, preferably with jstl/jsp, that
We currently use Auditing triggers to track all of our DB changes. In order
I have a compiled c++ application that produces a stack trace when it crashes.
My python script needs to start a background process and then continue processing to
I have a Windows service that is written in C++ using VS2008. I now
I have a WordPress installation that has been targeted quite heavily by a phishing
I am getting ready to submit an educational app to Apple for review. The
According to the MSDN documentation , transactional NTFS doesn't seem to allow one to
I recently got PHPUnit working with xDebug for testing my Zend Framework applications. The

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.