Hierarchial Table Design

  • Please provide some guidance on creating an effective Data Model for a Hierachial structure

    The Hierachy is below

    Categories

    Families

    Products

    tblCategories stores Category Info

    tblFamilies stores Family Info

    tbl Products Stores Product Info

    And junction tables to handle relationships like Category-Family and Family-Product since One Category can contain more than one family.

    I need a output which shows the data representation in a tree format

  • If a product can only be in one family and a family can only be in one category, you should have a category id in the family table as a foreign key into the category table and a family id in the product table as a foreign key into the family table.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply