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

  • Home
  • SEARCH
  • 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 540951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:17:35+00:00 2026-05-13T10:17:35+00:00

I am setting up a MySQL database and will be querying it with PHP.

  • 0

I am setting up a MySQL database and will be querying it with PHP. Is is better to break the information up into multiple tables and do select queries on each of the tables; or is it better to put all the items in one table and do a single select query?

For example:

It will hold information on upto 7 cars; which would mean that their will be approximately 50 columns or so.

Table_design 1
----------------------
table_all
    username
    car1_make
    car1_model
    car1_year
    car1_condition
    car1_tires
    car1_color
    car2_make
    car2_model
    car2_year
    car2_condition
    car2_tires
    car2_color
----------------------

Table_design 2
----------------------
table_1
    username
    car1_make
    car1_model
    car1_year
    car1_condition
    car1_tires
    car1_color

table_2
    username
    car2_make
    car2_model
    car2_year
    car2_condition
    car2_tires
    car2_color
----------------------
  • 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-13T10:17:36+00:00Added an answer on May 13, 2026 at 10:17 am

    Three tables. This way you’re not limited to the amount of information you can add to a car. And you’re not limited to the number of cars a user can have access to.

    If you ever need a spreadsheet of users, query the users table. If you ever need an inventory of cars, query the cars table. If you ever need to know which cars each users are associated with, query the userscars.

    See Database Normalization.

    • users
      • User ID
      • User First Name
      • User Last Name
    • cars
      • Car ID
      • Car Make
      • Car Model
    • usercars
      • User ID
      • Car ID
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 293k
  • Answers 293k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to give the Grails servlet a more specific… May 13, 2026 at 6:22 pm
  • Editorial Team
    Editorial Team added an answer Just because you added it to your solution doesn't mean… May 13, 2026 at 6:22 pm
  • Editorial Team
    Editorial Team added an answer You can use SFINAE to detect the presence of the… May 13, 2026 at 6:22 pm

Related Questions

I am setting up a web server for a client. They will be using
I roamed the site for this question using the search engine, and I don't
I have a website that has approx 1000 different strings in a mysql database
I not a DB expert, so am looking for advice for a web-based system
I have a dropdown box that I construct with PHP. Here is the code:

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.