Jump to content

Recommended Posts

The concept of normalizing your data tables is the same across most all databases.  Here is a link that will be very helpful.

http://www.asp.net/learn/sql-videos/video-106.aspx

 

It is in MS SQL, but again, take the concept.  It's very informative.

You'll want to create two tables, one is gangs and the second gang_members.

 

In gangs you store all the available gangs. You then then link the members that belong to a specific gang by storing the gang_id for gang the member belongs to in the gang_members table.

 

+--------------+

|    gang table  |              +-----------+

+--------------+              | Members  |

| id      -------------+      +-----------+

| name            |      |      | id            |

+--------------+      |      | username  |

                            +------ gang_id    |

                                    +-----------+

the id in the gang table and members table will be unique as they are populated using auto_increment.

 

We setup a gang_id in the members table to link the member to gang the member is part of.

 

This is how it is how it is basically done. If you do not understand I would recommend you to read up on database normalization.

i do understand as i have done it in microsoft access during alevels but how to do it in a different language was my difficulty. which was why i thought it wasnt possible.

 

microsoft access is simple GUI where as this time im guna have to hard code it

 

 

just to add if your guna link to fields in 2 tables should they not be the same name? like:

 

Gang_ID in gang and

 

Gang_ID in the member table ? or should they have different names

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.