kostas Posted December 12, 2007 Share Posted December 12, 2007 Hello everyone. I am about to make an application that keeps track of stocks and other stuff for periods of time in order to produce graphs and present data. The monitoring of the stocks should keep records of yesterday's values, a week before, month, 6 months and year. I was wondering how i should go around this. Should i create different tables for every period of time? Or have one with all the values in it... Any suggestions would be great appreciated. Thanks in advance Quote Link to comment Share on other sites More sharing options...
teng84 Posted December 12, 2007 Share Posted December 12, 2007 just create one table for that and let your select statement (condition) do it.. Quote Link to comment Share on other sites More sharing options...
kostas Posted December 13, 2007 Author Share Posted December 13, 2007 Thank you teng for your fast reply. My only thought to your solution is that the table will have many columns if i combine them all in one table, probably around 200. Would this be a problem (besides clarity of structure) for mysql? Quote Link to comment Share on other sites More sharing options...
teng84 Posted December 13, 2007 Share Posted December 13, 2007 nope... i guess normalization is your best bet. Quote Link to comment Share on other sites More sharing options...
Barand Posted December 13, 2007 Share Posted December 13, 2007 If putting them in one table increases the column count then there'e a flaw in your design. See http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html What are you proposing? Quote Link to comment Share on other sites More sharing options...
kostas Posted December 13, 2007 Author Share Posted December 13, 2007 If putting them in one table increases the column count then there'e a flaw in your design. See http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html What are you proposing? Well right now i have two tables. One holds the [id], name and some other info of each stock and the other holds the actual details of each stock which consists of 24 fields. If i want to gather info for 5 different periods of time for those particular stocks, how it is possible not to increase the column count without creating more tables ? Sorry for the stupid questions, i am just beginning Quote Link to comment Share on other sites More sharing options...
teng84 Posted December 13, 2007 Share Posted December 13, 2007 your question is unclear? Quote Link to comment Share on other sites More sharing options...
fenway Posted December 13, 2007 Share Posted December 13, 2007 If i want to gather info for 5 different periods of time for those particular stocks, how it is possible not to increase the column count without creating more tables ? What does this mean? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.