Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008

    Database Design for "nested" tables

    I need to design a database with the following requirements:

    For each Contract, there can be 1->many Projects
    For each Project, there can be 0->many sub-Projects
    For each sub-Project, there can be 0->many subsub-Projects
    For each subsub-Project, there can be 0->many subsubsub-Projects
    For each subsubsub-Project, there can be 0->many subsubsubsub-Projects
    ....(there can be up to 7 levels of Projects...
    For each subsubsubsubsubsubsubsub-Project, there can be 0-many Tasks

    I hate to create 7 (identical) Projects tables, especially since there will seldom be more than 3 levels of nesting. However, there will often be data at the lowest level (Task).

    Any ideas? I hope this makes sense

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    for your sub-sub-sub-... structure, see this article: Categories and Subcategories | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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