Optimo Posted October 12, 2009 Share Posted October 12, 2009 Hello, i am trying to create a system by which a user can set an order of units to be constructed. The units take 12 hours to construct if no other orders are placed. However i want to give the user the option to create a 2nd order which can either be combined with the first order setting the build time for the new total back to 12. Or to start after the current build order has completed. However to store all this infomation in a database its getting to over 50 different fields in the same table and im searching for a better method. The 5 main variables i want to use are as follows: u1 : the amount of currently constructed units u1_b1 : the amount of units in the first build order u1_t1 : the time till the first build order completes u1_b2 : the amount of units in the second build order u1_t2 : the time till the second build order completes This seems reasonable enough but if i have 10 or even more individual units it means the table is going to get rather large. Is their any way someone can think of a more logical approach to this. I need all that infomation as each hour a script runs which calculates how many units to construct (effectivly minus from u1_b1/u1_b2 and adds to u1). Thanks in Advance Mike Quote Link to comment https://forums.phpfreaks.com/topic/177440-big-database-table-better-way/ Share on other sites More sharing options...
zq29 Posted October 12, 2009 Share Posted October 12, 2009 I'd suggest reading up on database normalization, there is a good article over on the MySQL website: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html Quote Link to comment https://forums.phpfreaks.com/topic/177440-big-database-table-better-way/#findComment-935611 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.