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 Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/ 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.. Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/#findComment-413264 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? Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/#findComment-413304 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. Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/#findComment-413318 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? Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/#findComment-413320 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 Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/#findComment-413348 Share on other sites More sharing options...
teng84 Posted December 13, 2007 Share Posted December 13, 2007 your question is unclear? Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/#findComment-413468 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? Link to comment https://forums.phpfreaks.com/topic/81418-designing-suggestions/#findComment-413484 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.