Jump to content

Make Multiple Tables, or one BIG Table?


Errant_Shadow

Recommended Posts

I'm making some database tables for a game I'm working on and I've come to be stuck on a decision. The game is based on racing cars, so I'll need to create tracks and save their data in MySQL. Now what I've got so far is an array of segments including the length of the segment, what the segment is made of (dirt, rocks, etc etc), and what hazard exists on the segment (corner, hill, etc etc). So a track is basically an array of these segments, but each track will be different. I know there has to be at least 2 segments for the most basic kind of track (an oval) but more elaborate tracks may have any number of segments...

 

So my decision is this: do I make one database table with the track name and a maximum number of possible segments, using SET to hold the three segment variables, and allow unused segments to be null, or do I make a new table for each track, where each row contains the three elements in separate rows?

 

(MySQL version 5.0.22, in case that makes a difference)

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.