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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:43:08+00:00 2026-05-12T06:43:08+00:00

The two tables below can both hold the same data – a full year,

  • 0

The two tables below can both hold the same data – a full year, including some arbitrary info about each month

table1 (one row = one month)
------
id
month
year
info

table2 (one row = one year)
------
id
year
jan_info
feb_info
mar_info
apr_info
may_info
jun_info
jul_info
aug_info
sep_info
oct_info
nov_info
dec_info

Table A

  • Seems more intuitive because the month is numeric, but its
  • 10x more rows for a full year of data. Also the
  • Rows are smaller (less columns)

Table B

  • 10x less rows for a full year of data, but
  • Single rows are much larger
  • Possibly more difficult to add more arbitrary info for a month

In a real world test scenerio I set up, there were 12,000 rows in table1 for 10 years of data, where table2 had 150. I realize less is better, generally speaking, but ALWAYS? I’m afraid that im overlooking some caveat that ill find later if I commit to one way. I havent even considered disk usage or what query might be faster. What does MySQL prefer? Is there a “correct” way? Or is there a “better” way?

Thanks for your input!

  • 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-12T06:43:08+00:00Added an answer on May 12, 2026 at 6:43 am

    Don’t think about how to store it, think about how you use it. And also think about how it might change in the future. The storage structure should reflect use.

    The first option is more normalized by the second, so I would tend to prefer it. It has the benefit of being easy to change, for example if every month suddenly needed a second piece of information stored about it. Usually this kind of structure is easier to populate, but not always. Think about where the data is coming from.

    If you’re only using this data for reports and you don’t need to aggregate data across months, use the second option.

    It really depends on what the data is for and where it comes from. Generally, though, the first option is better.

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

Sidebar

Ask A Question

Stats

  • Questions 191k
  • Answers 191k
  • 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 Assembly probing is only available at runtime. At compile time… May 12, 2026 at 6:06 pm
  • Editorial Team
    Editorial Team added an answer You could run Xvfb (X virtual framebuffer, an X11 server… May 12, 2026 at 6:06 pm
  • Editorial Team
    Editorial Team added an answer The following will get you the installation folder (ie. C:\Program… May 12, 2026 at 6:06 pm

Related Questions

The two tables below can both hold the same data - a full year,
I don't like having the same thing defined in two places, if I can
Busy playing with django, but one thing seems to be tripping me up is
I have two tables in my database: Company table (ID, CompanyName, CompanyUsername, CompanyPassword) Employee
When I execute the following code, I'm getting results such as: ID column1 column2

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.