Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2013
    Posts
    2

    Question Database Layout for Part Catalogue

    "I'm a Newbie to SQL. I need assistance with my Database layout. I want to create a electronic parts catolgue to hold all the parts of a mulitply vehicles. This is what I have so far. Hope I'm going in the right direction.
    +----------------------------------+
    | Tables_in_test4 |
    +----------------------------------+
    | vehicle |
    | groupsection |
    | groupsection_has_vehicle |
    | parts |
    | parts_has_subsection_has_vehicle |
    | subsection |
    | subsection_has_vehicle |
    +----------------------------------+


    vehicle
    +----------+-------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +----------+-------------+------+-----+---------+-------+
    | ModelVin | varchar(20) | NO | PRI | NULL | |
    | Type | varchar(25) | NO | | NULL | |
    | Vin | varchar(15) | NO | | NULL | |
    +----------+-------------+------+-----+---------+-------+

    groupsection
    +-----------+-------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-----------+-------------+------+-----+---------+-------+
    | SectionID | varchar(4) | NO | PRI | NULL | |
    | Section | varchar(45) | NO | | NULL | |
    | GroupID | varchar(4) | NO | PRI | NULL | |
    | Group | varchar(45) | NO | | NULL | |
    +-----------+-------------+------+-----+---------+-------+

    subsection
    +--------------+-------------+------+-----+---------+-------+
    | Field | Type | Null Key | Default | Extra |
    +--------------+-------------+------+-----+---------+-------+
    | SubSectionID | varchar(4) | NO | PRI | NULL | |
    | SubSection | varchar(45) | NO | | NULL | |
    +--------------+-------------+------+-----+---------+-------+

    parts
    +---------+-------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default
    +---------+-------------+------+-----+---
    | PartsNo | varchar(15) | NO | PRI | NULL |
    | ItemNo | varchar(3) | NO | | NULL |
    | Desc | varchar(45) | NO | | NULL |
    | Qty | varchar(4) | NO | | NULL |
    | Remark | varchar(45) | YES| | NULL |
    | Pic | varchar(15) | NO | PRI | NULL |
    +---------+-------------+------+-----+---



    groupsection_has_vehicle
    +------------------------+-------------+------+-----+-----
    | Field | Type | Null | Key | Default |
    +------------------------+-------------+------+-----+-----
    | GroupSection_SectionID | varchar(4) | NO | PRI | NULL |
    | GroupSection_GroupID | varchar(4) | NO | PRI | NULL |
    | Vehicle_ModelVin | varchar(20) | NO | PRI | NULL |
    +------------------------+-------------+------+-----+-----


    subsection_has_vehicle
    +-------------------------+-------------+------+-----+-----
    | Field | Type | Null | Key | Default
    +-------------------------+-------------+------+-----+-----
    | SubSection_SubSectionID | varchar(4) | NO | PRI | NULL
    | Vehicle_ModelVin | varchar(20) | NO | PRI | NULL
    | GroupSection_SectionID | varchar(4) | NO | PRI | NULL
    | GroupSection_GroupID | varchar(4) | NO | PRI | NULL
    +-------------------------+-------------+------+-----+-----


    parts_has_subsection_has_vehicle
    +------------------------------------------------+-------------+-----
    | Field | Type | Null | Key |
    +------------------------------------------------+-------------
    Parts_PartsNo | varchar(15) | NO | PRI Parts_Pic | varchar(15) | NO | PRI
    SubSection_has_Vehicle_SubSection_SubSectionID | varchar(4) | NO | PRI SubSection_has_Vehicle_Vehicle_ModelVin | varchar(20) | NO | PRI
    SubSection_has_Vehicle_GroupSection_SectionID | varchar(4) | NO | PRI
    SubSection_has_Vehicle_GroupSection_GroupID | varchar(4) | NO | PRI
    +------------------------------------------------+-------------+------
    Attached Thumbnails Attached Thumbnails Parts Layout MySQL.jpg  

Posting Permissions

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