SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, here I have a database called mysoftware with 6 tables which I am going to set up like this, does this look correct. I'm no real newbie but I'm kind of new to getting it right.

    Seems a little bit like overkill for me but I'm not sure, I'm here to learn so commence with the teaching.


    TABLE SOFTWARE

    | s_id
    | s_category_id
    | s_subcategory_id
    | s_media_id
    | s_reg_id

    --------------------------------

    TABLE CATEGORY

    | s_id
    | s_category_id
    | s_category

    ---------------------------------

    TABLE SUBCATEGORY

    | s_id
    | s_subcategory_id
    | s_subcategory

    --------------------------------

    TABLE DESCRIPTION

    | s_description_id
    | s_description
    | s_title

    --------------------------------

    TABLE MEDIA

    | s_id
    | s_media_id
    | s_media_name
    | s_media_filesize

    ---------------------------------

    TABLE REGISTRATION

    | s_id
    | s_reg_num

    ---------------------------------

    -Mark

  2. #2
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Couple suggestions -

    Do you need the seperate table for descriptions? Wouldn't they be specific for each software? I would add ts_description to the software table and drop the rest of the Description table.

    Would the file_size field be better off in the software table?

    Isn't the registration number unique to each software? I would add registration number to the software table and drop the rest of the registration table. Unless you've seperated it into a one-to-one relationship for security reasons.
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  3. #3
    SitePoint Evangelist Umair.ms's Avatar
    Join Date
    Sep 2000
    Location
    Lahore, Pakistan
    Posts
    567
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've a suggestions.


    TABLE CATEGORY

    | s_id
    | s_category_id
    | s_category

    ---------------------------------

    TABLE SUBCATEGORY

    | s_id
    | s_subcategory_id
    | s_subcategory

    relace it with the following:

    TABLE CATEGORY

    s_id
    s_category_id
    s_parent_cat_id
    s_category

    Now for a top level category, s_parent_cat_id may be NULL and for the sub categories you can place the s_category_id of the parent category. Just an idea.
    TinyPlanet.org
    Discuss and Debate World Events, Politics and Religion.
    Interact and Share your Views with People around the Globe.


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
  •