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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:21:58+00:00 2026-06-18T16:21:58+00:00

Okay so I am trying to figure out the best design for this problem.

  • 0

Okay so I am trying to figure out the best design for this problem. I am trying to create a database in which I have leads, clients and contracts. What I am thinking is I should have two tables for the leads and clients. Although these are hopefully the same entities. My second thoughts on this is to just create a table called something like client_status that would look something like.

CREATE TABLE status(
  status_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  status_name VARCHAR(40) NOT NULL,
  PRIMARY KEY(status_id)
);
  INSERT INTO status (status_id, status_name) VALUES ( '1', 'Prospect');
  INSERT INTO status (status_id, status_name) VALUES ( '2', 'Client');

CREATE TABLE client(
  client_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  fname VARCHAR(40) NOT NULL,
  mname VARCHAR(40) NOT NULL,
  lname VARCHAR(40) NOT NULL,
  PRIMARY KEY(client_id)
);

CREATE TABLE client_status(
  status_id INTEGER UNSIGNED NOT NULL,
  client_id INTEGER UNSIGNED NOT NULL,
  FOREIGN KEY(status_id) REFERENCES status(status_id),
  FOREIGN KEY(client_id) REFERENCES clients(client_id)
);

Would this be the correct way to handle the problem at hand?

  • 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-18T16:21:59+00:00Added an answer on June 18, 2026 at 4:21 pm

    This is exactly how I would set this up. This allows you to have a client with multiple statuses.

    The one suggestion that I have is to create the PRIMARY KEY on the client_status table as both columns.

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

Sidebar

Related Questions

Okay I've been trying to figure this out for a while now. I have
Okay I been trying to work this out but unable too. I have a
Okay I can't figure out what the problem here is... I am trying to
okay i have been trying to understand this for hours i am learning VB
A while ago I was trying to figure out a way of doing this
This is driving me crazy. I'm trying to figure out how to upload a
I'm new to prolog and I just can't figure this out. I'm trying to
Okay, I just spent the last four hours trying to figure out why my
I've been trying to figure out why this code is not getting hit. The
Okay, I've been banging my head trying to figure out how to get around

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.