sir pannels
05-11-2006, 05:50 PM
Alright people.
Stuck with the structure of a database.. will tell you what I have currently, then what I'm going for ...
I have a CSV file that is displayed on a page after some fancy parsing.
The CSV file has 6 important values seperated by commas...
ID, NAME, VALUE1,VALUE2,VALUE3,VALUE4
the values are numbers, to two decimal places.
There are about 500 lines of data in this CSV file. Also, something worth noting is that each one of those values corrosponds to a week... those four values are four weeks of data... the 4 most recent weeks, when another 4 weeks passes, more data gets added and the page will display only the most recent 4 weeks, but keep the rest still for archive reasons.
I need to put this Data into a mysql database and stop using the CSV.
I'm stuck on a structure to hold the data. Thought about putting a database for each id/name and in there having a table for each 4 week period in the table are four fields, the four values.. but the problem is there after a few years the table will be massive and also displaying data from 500 different databases on one page is going to be very slow.
I have no other idea how to go about this, if someone can help me brainstorm some structure ideas that would be great as im stuck.
Cheers all,
Sir P =]
Stuck with the structure of a database.. will tell you what I have currently, then what I'm going for ...
I have a CSV file that is displayed on a page after some fancy parsing.
The CSV file has 6 important values seperated by commas...
ID, NAME, VALUE1,VALUE2,VALUE3,VALUE4
the values are numbers, to two decimal places.
There are about 500 lines of data in this CSV file. Also, something worth noting is that each one of those values corrosponds to a week... those four values are four weeks of data... the 4 most recent weeks, when another 4 weeks passes, more data gets added and the page will display only the most recent 4 weeks, but keep the rest still for archive reasons.
I need to put this Data into a mysql database and stop using the CSV.
I'm stuck on a structure to hold the data. Thought about putting a database for each id/name and in there having a table for each 4 week period in the table are four fields, the four values.. but the problem is there after a few years the table will be massive and also displaying data from 500 different databases on one page is going to be very slow.
I have no other idea how to go about this, if someone can help me brainstorm some structure ideas that would be great as im stuck.
Cheers all,
Sir P =]