Jump to content

One table or many question?


apw

Recommended Posts

 

Hello

 

  Hello, Im looking for suggestions to create database tables that will keep the

following information clean and organized:

 

9 worker units

9 buildings

5 resources

26 army units

50+ technologies

 

I was thinking first to create one table that had all this information in it, however

thats ALOT of fields and I don't know if the table would be able to handle all

this information.  Instead, breaking each element into its own individual table

and 'tag' each table with the players either empire name OR username to keep

each table field together ...

 

Your suggestions please?

 

Thanks again

Link to comment
https://forums.phpfreaks.com/topic/112912-one-table-or-many-question/
Share on other sites

It's a little tough without more information, but I'll give it a try.

 

Try creating 5 initial tables, for the workers, building, resources, units, and technologies. You'll probably need a player table as well. One idea would be to use a 'many-to-many' table to join the player table to the other tables. So for instance, you would have another table called player_workers, with two fields, player_id and worker_id. And so on...

 

A great place to start working through these issues is by researching database normalization. Very fascinating stuff as well.

 

Best of luck!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.