Jump to content

big database table - better way?


Optimo

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.