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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:05:06+00:00 2026-06-01T15:05:06+00:00

I am setting up a MySQL database with multiple tables. Several of the tables

  • 0

I am setting up a MySQL database with multiple tables. Several of the tables will have fields with similar names that aren’t necessarily for the same purpose.

For example, there’s a users table that will have a name field, a category table with a name field and so on.

I’ve previously seen this setup up either with or without a preface to the field name, so in the above example using user_name, cat_name etc.

As these are all in separate tables, is there any benefit to structuring the database with or without this preface? I know that when using joins and calling the data through PHP you have to add a SELECT users.name AS username... to keep the fields from overwriting each other when using mysql_fetch_array. But i’m not sure if there’s any efficiencies in using one method over the other?

  • 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-01T15:05:07+00:00Added an answer on June 1, 2026 at 3:05 pm

    It’s really just a matter of preference. I personally prefer the approach of using just name.

    One thing to watch out for though, if you’re doing any SELECT * FROM ... queries (which you shouldn’t be; always select fields explicitly), you may end up selecting the wrong data.

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

Sidebar

Related Questions

In setting up a MySQL database, consider that I have a table of products
I'm setting up a custom blog that grabs the posts from a mysql database.
I have a mySQL database that tracks our projects and drives our website's display
I'm reorganizing our MySQL database, changing MyISAM tables to InnoDB and setting foreign keys,
I am setting up a very small MySQL database that stores, first name, last
I have been working on a mysql database that I set up with phpmyadmin...
I am setting up a MySQL database and will be querying it with PHP.
I have a mysql database, with two fields (firstname, lastname) of type CHAR(255) and
I have a database that has two tables locations and classes. I am familiar
My dates in mysql database are setting to 1999-11-30 no matter what I enter

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.