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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:48:21+00:00 2026-06-10T07:48:21+00:00

Recently I had this discussion with some other developers about how too many columns

  • 0

Recently I had this discussion with some other developers about how too many columns in a table , or too many attributes on a model is a code smell . Some argue that a Model with too many Attribute is doing too many things , and should be split .
But what If the Model actually requires those attributes ?

Let me take the example of a users table .

A user can have
first_name , last_name , street_name , city , state , age , etc .
According to the argument , I assume street_name , city and state should be moved into a different table . I agree that related data are grouped together this way , but if the application is querying for the user with his address as well , wont that be a more expensive operation, since they’re in 2 tables now ?

So what is the right way to model tables with a lot of attributes ?
( Should we also consider these cases : when
1. the number of rows are going to be less
2. the number of rows are going to be huge )

  • 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-10T07:48:23+00:00Added an answer on June 10, 2026 at 7:48 am

    Using your address scenario specifically, you’ll find it highly beneficial if your design is supposed to cater for multiple addresses per user or to track/trap multiple registrations using the same address.

    Alternatively, you could consider a more generic address table implementation where you have a generic description field and a type column that tags the row as a specific type of address (e.g. email, house, office, spouse, etc.).

    The moral of the story is the moral of this story is if there could be more than one of it, have a separate table. Over normalization only sets in when there’s no benefit in jumping the extra table or two for info that:

    1. Doesn’t change much,
    2. Doesn’t occur more than once or
    3. Every primary key entity must have it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently, I had seen some D flip-flop RTL code in verilog like this: module
I recently had some trouble with IE8 (I don't know about 9 at this
I recently had a similar thread about this, but now I need to animate
I recently had a discussion with a colleague about serialization of byte data over
I've been in some discussion recently about where email (notifications, etc...) should be sent
I recently had this issue with a client. The code read: ini_set( sendmail_from, noreply@<current-domain>.com
I hope this isn't knocked for being too general, but... I recently had occasion
I recently had a short discussion with another developer about the relationship between PHP's
I had this problem a long time ago and recently I got some clues
I recently had to re-factor some code from a previous maintainer and initially I

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.