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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:50:22+00:00 2026-06-07T06:50:22+00:00

I’m planning the structure of a MySql database and could use some advice from

  • 0

I’m planning the structure of a MySql database and could use some advice from more seasoned professionals. The site which the DB belongs to gathers 90-days of weather data for EACH registered user, and has to support millions of users.

I already have a table for the users, with their login and contact information, but assume that I need a second table for all the weather data…

What I intend to do is basically store the average temperature, humidity, wind-direction and so fourth – per day – for every user. And each day the DB is updated with the new day’s data, while keeping yesterday’s entries (but limited to 89-days of old data + the current day’s data) – for all users.

Now, does it make most sense to have one huge “data” table that has 90 rows for EVERY user (with millions of users)? Or is there a more clever way to do this that is better for performance reasons or similar?

The 90-days of data will be accessed (READ and displayed etc.) every time a user logs in and views his own profile or if she browses someone else’s profile. But it will only be updated once per day (overwriting the oldest entry, maintaining the limit of 90 rows per user.)

  • 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-07T06:50:24+00:00Added an answer on June 7, 2026 at 6:50 am

    Edit: saw just now that each user has different weather data. Keeping the “shared data” in the answer, but you’re interested in the second case.

    Users share weather data

    Based, say, on their nearest weather station ID.

    I’d store a (userId, stationId, isActive, isPreferred) table to know what data the user is interested in, and then I’d run a query against stationWeatherData to fetch the 90 rows of weather data for that station.

    Each user has his own weather data

    There shouldn’t be particular problems in handling 900 million users. If you really had to, you could “shard” on different tables based on userId, e.g, table weather174 would hold data of all users for which (userId % 1000) gives 174, and you’d find yourself with 1000 tables – possibly on different servers – of one thousandth the size.

    So you start with one big table, and prepare for sharding (or moving to cloud storage and a no-SQL keystore database, e.g. MongoDB, VoltDB). Or partition based on UserID as soon as UserID reaches, say, one million.

    Or even, you don’t use a database at all. A DB makes sense if you need to search or correlate/join data — here you are just accessing a user’s “weather station”.

    If you know you’re never going to query “How many users have 60% humidity?”, but always only “What data are there for user 1234567?”, then you might save the data in a rolling buffer in binary, JSON or HTML format (on cloud storage, S3, or again MongoDB – now only one document per user). Much would then depend on how the data to be updated is arriving, i.e., in one big batch from a concentrator or each user uploading its own.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a text area in my form which accepts all possible characters from
I have a view passing on information from a database: def serve_article(request, id): served_article
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

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.