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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:45:31+00:00 2026-06-13T12:45:31+00:00

I have a table where specific service providers will be store there-car shops for

  • 0

I have a table where specific service providers will be store there-car shops for example.
The car shops offer various services.

My problem how to store in a column these services?
I could create a second table where the services are stored but that would needed if I wanted to provide search functionality-which my intention is not to, at least not now.

So how I would store all the services in one row(that corresponds to a specific car shop for eaxmple). It would be of the VARCHAR type as I see it.

Furthermore is it OK that a primary key in a table references a primary key in another table?

WHat else do I have to do?

I need to stress also that there might be cases where there might be a unique service offered by a service provider-that only one service provider offers a specific service.

  • 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-13T12:45:32+00:00Added an answer on June 13, 2026 at 12:45 pm

    you can have many-to-many relationship,

    This table stores list of service providers.

    CREATE TABLE ServiceProvider
    (
        ProviderID INT NOT NULL,
        ProviderName VARCHAR(50),
        .......,
        CONSTRAINT tb_pk PRIMARY KEY (ProviderID),
        CONSTRAINT tb_uq UNIQUE (ProviderName)
    );
    
    CREATE TABLE ServiceList
    (
        ServiceID INT NOT NULL,
        ServiceName VARCHAR(50),
        .......,
        CONSTRAINT tba_pk PRIMARY KEY (ServiceID),
        CONSTRAINT tba_uq UNIQUE (ServiceName)
    );
    

    this table maps the list of service provider to their services offered.

    CREATE TABLE Provider_Service
    (
        RecID INT,
        ProviderID INT NOT NULL,
        ServiceID INT NOT NULL,
        CONSTRAINT tbb_pk PRIMARY KEY (RecID),
        CONSTRAINT tbb_fk1 FOREIGN KEY (ProviderID) 
              REFERENCES  ServiceProvider(ProviderID),
        CONSTRAINT tbb_fk2 FOREIGN KEY (ServiceID) 
              REFERENCES  ServiceList(ServiceID),
        CONSTRAINT tba_uq UNIQUE (ServiceName, ProviderID)
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Advantage Database Server) I have a table of service providers that, for auditing purposes,
I have a table and I want to duplicate specific rows in the table.
I have a table that I keep track of fees for a specific item.
I have one table TABLE_EXAM . i need to update the value of specific
Sorry for a pretty specific question. I have a table (see bottom), and when
I have a MySQL table that defines values for a specific customer type. |
I have a textbox which is binded to a specific database table column. This
I have a configuration table, that holds the values selected by a specific user.
I have a specific information in a table I am looking for, this query
I have a specific requirement of having a toggling table. By toggling I mean

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.