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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:51:26+00:00 2026-05-11T18:51:26+00:00

The software I’m working with has 2 tables, lead and customer. When we sell

  • 0

The software I’m working with has 2 tables, lead and customer. When we sell our product to someone, a record is created in the customer table with data from the lead table (as well as some additional data).

Currently there is no relationship between the two tables. The best that exists now is the lead object has a function that will do a lookup in the customer table for a record with the same phone number (hoping that it hasn’t changed in the last 5-10 years that they’ve been our customer – doing such a search on each lead produces an %82 intersection on the customer table). There is no reverse lookup (customer->lead).

The problem is that I do need to know what customer record is associated with what lead record, and vice versa.

I considered storing a fk from lead in customer and a fk from customer in lead… but the ORM i’m using will overflow as it loads associated records when fkeys exist.

Merging the two tables into one ‘person’ table is what I’d like to do, having a bit flag identifying whether or not a person is a customer… but alas, timelines and budgets do not permit.

I don’t quite know what to do.

  • 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-11T18:51:27+00:00Added an answer on May 11, 2026 at 6:51 pm

    Do you really need it to go both directions (i.e. 1:M leads to customers and 1:M customers to leads)? If so, a composite table sitting “between” the two could be the way to go. Each record would contain the PK from customer and the PK from lead (linking the two).

    If you just need to know how many leads are linked to a customer, I would add the FK to leads (pointing to the PK in customers).

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

Sidebar

Related Questions

Our software manages a lot of data feeds from various sources: real time replicated
Our software is not ever officially installed on Windows, and currently has an update
Our software currently has many features. I've been asked to make a free trial
Our software produces a lot of data that is georeferenced and recorded over time.
My (software) company has hundreds of customers. We'd like to provide each customer with
Our software was installed on (customer site) Window Server 2008 R2 Foundation in Turkey
What software is recommended for working with and editing large XML schemas? I'm looking
Our software must be able to run on SQL Server 2000 and 2005. To
Every software development professional (and especially project managers) has to deal with a never
Software I'm working with uses a text field to store XML. From my searches

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.