It is currently Sun Nov 28, 2021 9:44 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to store fast-changing data in MySQL?
PostPosted: Wed Jun 02, 2021 8:29 am 
Newbie
Newbie

Joined: Wed Jun 02, 2021 8:27 am
Posts: 1
I want to store a date/time and total asset price (adding all stock holdings together) in MySQL for graphing purposes. I want to store data every five minutes when the market is open to show a 1-day chart, and the last traded price for all 1 week, 1 month, 3 months, and 1 year. However, I am confused about how I should design tables for it. Here are some of my ideas:

Make two tables for each user. One for 1-day chart data, and the other for the rest chart data. However, the 1-day chart should be able to be of deque structure since I just want 24-hour data, so adding new data should delete the oldest data.

I should just make one table with two diff columns, one for 1D chart data, and the other for the rest. The goal is to serialize data and store it, which I believe is not an ideal way to go.

Any pointers would be helpful.


Last edited by EleanorW on Thu Jun 03, 2021 7:16 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How to store fast-changing data in MySQL?
PostPosted: Thu Jun 03, 2021 5:07 am 
Newbie
Newbie

Joined: Fri Dec 25, 2020 4:03 pm
Posts: 4
Assuming that I understood you correctly, you need advise for application development (or in this case the database structure) - this thread in stackoverflow.com might be a useful starting reference: https://stackoverflow.com/questions/125 ... nformation


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ]  Moderators: Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011