Jump to content

Multiple or single table?


apw

Recommended Posts

My question is regarding info that should either be in a single table database or multiple tables.  The data that will be in this or these tables is data that my web-game uses to handle player information.  For example one table called pfile handles the basic login info and a few starting stats.  As the player plays he will gain new technologies, new buildings, units, etc.  My question is with so much info that will be processed and needed is it smart and wise to push this into one table or expand and have multiple tables for each technology, unit, resource, etc.  And how would i link this info together so nothing goes wrong?

Link to comment
Share on other sites

On the new table have a field Called UserID (this will have the same value as the Prime field in the usres table) and IMO i would probably keep a table for logins and another for game status info

 

EDIT: oh and link them via a JOIN but if you have the UserID stored in session during login you can just pass that to the other table directly to get Game Info) but if you want to get the Users name etc your need to either use a JOIN or do 2 queries

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.