www.webdeveloper.com
Results 1 to 4 of 4

Thread: How should I structure this?

  1. #1
    Join Date
    Mar 2008
    Location
    Gulf Breeze, Florida
    Posts
    171

    How should I structure this?

    Ok, we've all seen the millions of CSS Galleries out there and how they categorize many of the websites by their overall look or purpose (ex: Minimalistic, Colorful, Grungy); so my question is this...what is the best way to organize this?

    It may be a simple answer but there are some situations that may cause it to be more complex, for example if a website is categorized in more then 1 category.
    Last edited by Greyfish; 02-22-2009 at 12:22 AM. Reason: Missed a word
    Hola!

  2. #2
    Join Date
    Jul 2008
    Location
    Carnoustie, Scotland
    Posts
    36
    Category table: category_id, category_desc, etc
    Website table: website_id, website_url, website_desc, etc
    website_category table: website_id*, category_id*

    * asterisks denoting foreign keys to category and website tables

    Something like that??
    /* no comment */

  3. #3
    Join Date
    Mar 2008
    Location
    Gulf Breeze, Florida
    Posts
    171
    Thankyou for your help pollymac! I didn't even think to do it that way!
    Hola!

  4. #4
    Join Date
    Mar 2008
    Location
    Gulf Breeze, Florida
    Posts
    171
    I've never really used Foreign Keys before, could you explain to me the advantages of using them? Also I'm not really sure how to use them when it comes time for querying the database.
    Hola!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles