SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Apr 2002
    Location
    Miami
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Grasping Relational Table layout MySQL PHP

    Hi,

    I have been studying Kevin Yanks book and find it very good for a complete beginer like myself but I am a bit confused on mapping out my database.

    I am creating a database of North American birds.
    The birds are classified into first a Top Category
    then into a Group Category and lastly into a Member Category.

    This is an excercise so I dont mind that its going to be a fairly large task but it seems that there should be an easier way than what I am contemplating.

    It appears that I would have to create and populate the tables
    Top Category (ID, Name)
    Group Category (ID, Name)
    Member Category (ID, Name, Sci-name, Desc, ...)

    and a

    Look up Table (TCID, GCID, MCID)

    I have 15 Top Categories
    Around 80 Group Categoris
    and hundreds of Member Categoris

    I was thinking I could build a form input that could enter the values of all the tables simultaneously but I dont see any mention of that.

    Is there a smart way to do what I am planing above.

    Thanks very much for your help

    Jorge

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2001
    Location
    UK
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would add an extra field to the groups table, something like TopID to reference the primary key of the first table. Then on the members table have two fields for the top and group tables. This would remove the need for a lookup table I imagine.
    Last edited by oblig; Apr 15, 2002 at 18:14.

  3. #3
    SitePoint Addict
    Join Date
    Apr 2002
    Location
    Miami
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks,

    I will try that approach.

    jp


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •