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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:55:23+00:00 2026-06-18T00:55:23+00:00

I am designing a database for a web site, where performance is the top

  • 0

I am designing a database for a web site, where performance is the top most priority.

the key functionality is based around two tables.

and these table have many-to-many relations ship.

to split this, i have added an extra table Table1_Table2 that then holds teh combination of both tabl’e primary key on per relation basis.

e.g.
I have all my cars in Car table, and all my colors in color table

CarTable


ID(PK) – Name


1         – BMW
2         – Mercedes
3         – VW
4         – AUdi


ColorTable


ID(PK) – Color


1         – Blue
2         – Green
3         – Black
4         – Yellow


for many-to-many relation i have done this:

Car_ColorTable


ID(PK) – CarID – ColorID


1          – 1       – 2
2          – 1       – 4
3          – 2       – 4
4          – 3       – 1
5          – 4       – 1
6          – 4       – 3
7          – 4       – 3


is this a good design considering:

1) performance is the top priority.

2) the tables will have huge amount of data (more than 1 million records in both tables, and you can imagine how many rows will end up in Car_ColorTable.

if the above design is not the solution, how should i design this?

  • 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-18T00:55:24+00:00Added an answer on June 18, 2026 at 12:55 am

    it should be
    Car_ColorTable

    CarID (PK) - ColorID (PK)
    

    you dont want the id column there,
    primary key should have both columns
    you can create similar non clustered index with columns in oposite order that mean (ColorID, CarID)
    and thats it

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

Sidebar

Related Questions

I am designing the database for social web site. should I consider using UUID
I am designing database tables for a master-detail scenario. The specific requirement is that
I was designing a database for a site where I need to use a
I'm designing a database which will store information about some artists. These artists can
We're designing a database in which I need to consider some FK(foreign key) constraints.
I am designing a web site, and it has the ability to log in.
I'm designing a C# application Presentation ( web site + flex apps ) Business
I'm a total newbie for database-based website. I just learned designing website from zero
I'm currently in the process of designing the database tables for a customer &
I'm designing an application in ASP.NET Web-From which require Multilevel role-based authorization and permission

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.