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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:40:42+00:00 2026-06-08T08:40:42+00:00

I need to design a new table for my project, which basically holds a

  • 0

I need to design a new table for my project, which basically holds a list of 41 numbers per key. The first number in the list is some distance measurements,
while the rest of the numbers represent weighted bins of percentages as such:

  • the first ten percentiles are 1% each
  • the next ten are of 2% each
  • the next ten are of 3% each
  • and the next ten are of 4% each

which all sum up to 1*10 + 2*10 + 3*10 + 4*10 = 100%

The normal usage of this data would be summing the bins vertically.
(i.e. key1-bin1 + key2-bin1 + .. ; key1-bin2 + key2-bin2 + .. ; etc. )

Now, assuming this will never change and there will always be 40 bins with the same bin dispersion, which is better?:

  • one line per key of the form – key, distance, bin1, bin2… bin40

or

  • 41 lines per key of the form – key, bin_number, value where bin_number -1 holds the distance

The obvious advantage of the first option is the reduction of data duplication, plus I really don’t like my “-1” workaround.

But this feels really dirty and extremely “hard-coded”, and I remember being taught that databases somehow “prefer” the second option and are designed to handle it better than the first in terms of compression, indexing etc. (Plus the queries will probably look nicer in the second option, but I can live with ugly queries in my code)

Thanks!

  • 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-08T08:40:43+00:00Added an answer on June 8, 2026 at 8:40 am

    The key to your choice of answer is “assuming this will never change.” If that is true, then you should go with the many-column table. You’re right that MySQL and other dbms systems handle normalized data (your first option) pretty well. But if I understand your problem correctly, you will always have the 41 data points for each observation. That means your first option will always have 41 rows per observation.

    There’s no magic in MySQL or other DBMSs. They just grind data. Sure, they do it pretty efficiently. But forty-one times as many rows as observations is a lot.

    If you sometimes had one, sometimes three, and sometimes ten data points per observation, you’d choose the normalized, short-row, option.

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

Sidebar

Related Questions

Every time I need to design a new database I spend quite some time
Im new to database design and need some guidance. A lot of new data
I need some guidance for a database design around a project management system. My
I have a new project and just need some advice on how to do
I am new to d3.js and I need to design a visualization that is
I am new to Web page design and creation - but I need to
I need to design a JSON interface which when implemented on my end will
I recently became involved with a new software project which uses SQL Server 2000
I need a new perspective on how to design a reliable and efficient SQL
Currently I am working on the design of my degree project. Some days ago

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.