Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7248561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:09:18+00:00 2026-05-28T22:09:18+00:00

I love the nested-set model for storing hierarchical data, and I’d like to find

  • 0

I love the nested-set model for storing hierarchical data, and I’d like to find a similar model for storing task dependencies in a project management application.

Issue 1: Unsustainable complexity of recursive database queries / function calls:

Right now, I have a simple m:n table that stores Task/Blocker pairs, but looping through the data is unoptimized at best, and a recursive nightmare at worst. I’d like to limit database calls in a tight loop, and–with a “normal” tree–I’d use a nested set to accomplish this.

Issue 2: multiple inheritance, multiple descendance

The reason I can’t use a tree is that this set contains not only branches, but also merges. Some tasks have multiple “parent nodes”–if you will–multiple tasks that have to be completed before it can start. It seems similar to how I assume SVN or Git must work to store versioning information.

I want to run queries like:

  • Get all tasks, recursively, dependent on a specific task (top-down traversal)
  • Add all time estimates for a specific task and all its dependencies (bottom-up traversal)
  • Constrain list of potential dependencies for a task to logical options (can’t depend on itself, in a loop)

Possible options so far:

  • Bight the bullet and deal with the complexity
  • Index all the sequences (“routes”, if you will, to finish all tasks)–still unsure how to store this
  • Store both top-down nested sets and bottom-up nested sets
  • Pray that some StackOverflow guru knows more than I do on the subject

What’s the best way (and how sure are you that it will work)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T22:09:18+00:00Added an answer on May 28, 2026 at 10:09 pm

    I would start with tasks and task_relationships tables.
    Use the task_relationships table for multiple parents or children.
    task relationship has parent and child fields both are id’s in the tasks table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I love the way I can profile a Java/.Net app to find performance bottlenecks
I love grids - especially the cool third party ones like Devex, C1 etc..
I love webpy, it's really quite Pythonic but I don't like having to add
I love and use jQuery quite a lot, but I am hoping to find
Often when developing I am confronted with a nested object that I'd like to
I love RGoogleDocs and use it a lot. However, I don't like entering my
I love how in python I can do something like: points = [] for
I have a model like this: class Search include Mongoid::Document embeds_many :terms accepts_nested_attributes_for :terms
I love the ability of plyr to split a data frame into multiple data
I love Oracle SQL Developer so I find myself using it a lot to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.