Results 1 to 7 of 7
  1. #1
    Ralmaken is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2013
    Posts
    4

    Need help with hierachle design for MS-Access database.

    Hello everyone,



    I have a situation in a database design which is requiring the ability to track different projects along different program levels. For example project x may be assigned to program x1 in department e3. on level f5. So his tree in a traditional excel spreadsheet would be x1.e3.f5. Now the tree will go to approximately 5 levels and report summaries would like to be able to filter data for each level from level 1 to level 5 as you can in excel. So I am wondering in being limited to Access 2007 as a database how should I go about designing this physical model?

    Rules basically would be that the fields would required cascade updating and at minimum must have the top 1st program level.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Here is a link to schema for staff assignments that you may be able to modify for your needs.

    http://www.databaseanswers.org/data_...ents/index.htm

  3. #3
    Ralmaken is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2013
    Posts
    4
    This seems to take care of 1 level of program but not the next levels

  4. #4
    Ralmaken is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2013
    Posts
    4
    bumping this

  5. #5
    Ralmaken is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2013
    Posts
    4
    bumping post

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I doubt it will be easy. Don't think I've ever seen one.

    Search forum on hiearchy or hiearchical.

    Here's one:
    https://www.accessforums.net/access/...ing-38942.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Sorry, I can't make out most of your shorthand for the requirements.

    project, program, department, level: precisely what do those words mean in the real world?

    Is Program always level one, Department level two, Level level three? If so, what are the words for the next two levels?


    I can envision a workable schema based on something like this -
    Code:
    tblNodes
      NodeKey      PK, Autonumber
      NodeLevel    Number (1 to 5)
      NodeParent   FK to tblNodes, can be Null    Pointer to immediate parent
      NodeName     Text
    
    tblProjects
      ProjID       PK Autonumber
      ProjNodeKey  FK to tblNodes  
      ProjData     The rest of the project info
    Those are all that's needed for organizing the organization into the hierarchy
    and assigning the projects to any given spot in the organization.

    For reporting, the system would generate a flat version of the hierarchy
    immediately before running the reports. Reassignment of projects would not
    require update of the flat version - only moving of nodes. A system level
    flag could be set whenever a node was moved, to indicate that recalculation
    of the flat version was required.
    Code:
    tblNodesFlat
      NodeKey      Number  (FK to tblNodes)
      NodeLevel    Number (1 to 5)
      NodeName     Text  Name of This Node 
      NodePath     Text  Full path of this node
      NodePathL1   Text  Full path of Node at L1 in hierarchy
      NodePathL2   Text  Full path of Node at L2 in hierarchy, can be null  
      NodePathL3   Text  Full path of Node at L3 in hierarchy, can be null  
      NodePathL4   Text  Full path of Node at L4 in hierarchy, can be null  
      NodePathL5   Text  Full path of Node at L5 in hierarchy, can be null  
      NodeParent   FK to tblNodes, can be Null    Pointer to immediate parent
      NodeParentL1 FK to tblNodes, can be Null    Pointer to L1 in hierarchy, if below L1
      NodeParentL2 FK to tblNodes, can be Null    Pointer to L2 in hierarchy, if below L2
      NodeParentL3 FK to tblNodes, can be Null    Pointer to L3 in hierarchy, if below L3
      NodeParentL4 FK to tblNodes, can be Null    Pointer to L4 in hierarchy, if below L4
    Given a structure like that, you could bind tblProjects to tblNodesFlat and then
    pick out any arbitrary nodepath level to filter or report at.

    Not all of those fields would be needed for any given query, but I can see
    times that any of them could be useful, and they don't take up much space.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access Database Design Expert Required ASAP!
    By devweb in forum Database Design
    Replies: 1
    Last Post: 06-06-2013, 06:33 AM
  2. Contact Tracking database design - Access 2010 non-web
    By Third Person in forum Database Design
    Replies: 1
    Last Post: 03-19-2013, 02:41 PM
  3. New to Access, Need to Design Database for Non-Profit
    By oatsybob in forum Database Design
    Replies: 1
    Last Post: 10-01-2012, 04:47 PM
  4. Guidelines to design an Access Database
    By ravikiran in forum Access
    Replies: 3
    Last Post: 08-23-2012, 06:24 AM
  5. Access database design to check assets in and out
    By ginachicclett in forum Database Design
    Replies: 2
    Last Post: 08-19-2012, 05:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums