473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Trees? Subprojects? Threads? Or How do I sort multiple levels of nested relations?

Hi all,

I'm not sure exactly what words to use or how to Google this. (I keep
coming up with BOL links.) So, I'm going to ask the group for a
starting point or proper terms to even describe what I'm doing. Is
this a "thread handler? Or a "hierarchy tree" or what?

-----------------------
Basically, I'm working on a project that will be a task and project
tracking tool. What I've been asked to do is provide functionality
for two things at a Manager level.
1. Radar lists
2. sub projects.

Both of them involve the possibility of having a
1. Project
1.A Subproject
1.A.i. Sub-sub-project
....to infinity.
1.B Subproject b
1.B.i Sub-sub project b.

I'd like to be able to sort them out like Windows Explorer does
directories. Or like a usenet reader or a blog site handles threads.

I know to relate the table to itself by having a table structure
like...
ProjectID
ProjectTitle
ParentProjectID

Where ParentProjectID is another ProjectID in the list. i.e. The
example I typed above would be something like this...
1, Project, null
2, Subproject, 1
3, sub-sub-project, 2
4, subproject b, 1
5, sub-sub-project b, 4

But, I haven't been able to figure out a method for queries that
somehow discerns what is a top level, second level, third level, etc
item for the purposes of queries and reports.

-------
Anyway, I assume this is a standard method for database writers that
has a standard name. So, if anyone can let me in on that, I'd
appreciate it so I can start learning! :)

Many TIA,

Jon

Feb 21 '07 #1
3 1825
On Feb 21, 5:39 pm, "jonceramic" <joncera...@gmail.comwrote:
Hi all,

I'm not sure exactly what words to use or how to Google this. (I keep
coming up with BOL links.) So, I'm going to ask the group for a
starting point or proper terms to even describe what I'm doing. Is
this a "thread handler? Or a "hierarchy tree" or what?

-----------------------
Basically, I'm working on a project that will be a task and project
tracking tool. What I've been asked to do is provide functionality
for two things at a Manager level.
1. Radar lists
2. sub projects.

Both of them involve the possibility of having a
1. Project
1.A Subproject
1.A.i. Sub-sub-project
...to infinity.
1.B Subproject b
1.B.i Sub-sub project b.

I'd like to be able to sort them out like Windows Explorer does
directories. Or like a usenet reader or a blog site handles threads.

I know to relate the table to itself by having a table structure
like...
ProjectID
ProjectTitle
ParentProjectID

Where ParentProjectID is another ProjectID in the list. i.e. The
example I typed above would be something like this...
1, Project, null
2, Subproject, 1
3, sub-sub-project, 2
4, subproject b, 1
5, sub-sub-project b, 4

But, I haven't been able to figure out a method for queries that
somehow discerns what is a top level, second level, third level, etc
item for the purposes of queries and reports.

-------
Anyway, I assume this is a standard method for database writers that
has a standard name. So, if anyone can let me in on that, I'd
appreciate it so I can start learning! :)

Many TIA,

Jon

I think you are talking about two different things, a datasource or
recordset and a method to present it. The control that Windows
explorer uses is called a TreeView control and is usually used with a
ListView control or something similar to display related objects or
information. They are not directly connected to a set of data so it
will require some extra patience to implement. You should spend a good
amount of time learning about these two controls before attacking the
recordset part of it as the methods to present it may influence how
you gather the data.

If they are not outlined in Access help, then check the MSDN site.
There should be a fair amount of info there.

Feb 21 '07 #2
Look up "Nested Sets" and "Adjacency Model". These are the two major
styles. The one that you are working on is called the Adjacencty
Model.

In browsing through these you see lots of nonsense about whether A or
B is normalised or not.

Main Difference:
Adjacency Model - easy to update, slow to query (must use recursion)
Nested Sets - easy to query (simple SQL), must update half of
recordset for every update.

I'm still waiting to find out how to represent a "forest" in a nested
set model.

Cheers,
Jason Lepack

On Feb 21, 5:39 pm, "jonceramic" <joncera...@gmail.comwrote:
Hi all,

I'm not sure exactly what words to use or how to Google this. (I keep
coming up with BOL links.) So, I'm going to ask the group for a
starting point or proper terms to even describe what I'm doing. Is
this a "thread handler? Or a "hierarchy tree" or what?

-----------------------
Basically, I'm working on a project that will be a task and project
tracking tool. What I've been asked to do is provide functionality
for two things at a Manager level.
1. Radar lists
2. sub projects.

Both of them involve the possibility of having a
1. Project
1.A Subproject
1.A.i. Sub-sub-project
...to infinity.
1.B Subproject b
1.B.i Sub-sub project b.

I'd like to be able to sort them out like Windows Explorer does
directories. Or like a usenet reader or a blog site handles threads.

I know to relate the table to itself by having a table structure
like...
ProjectID
ProjectTitle
ParentProjectID

Where ParentProjectID is another ProjectID in the list. i.e. The
example I typed above would be something like this...
1, Project, null
2, Subproject, 1
3, sub-sub-project, 2
4, subproject b, 1
5, sub-sub-project b, 4

But, I haven't been able to figure out a method for queries that
somehow discerns what is a top level, second level, third level, etc
item for the purposes of queries and reports.

-------
Anyway, I assume this is a standard method for database writers that
has a standard name. So, if anyone can let me in on that, I'd
appreciate it so I can start learning! :)

Many TIA,

Jon

Feb 21 '07 #3
On Feb 21, 4:57 pm, "Jason Lepack" <jlep...@gmail.comwrote:
Look up "Nested Sets" and "Adjacency Model". These are the two major
styles. The one that you are working on is called the Adjacencty
Model.

In browsing through these you see lots of nonsense about whether A or
B is normalised or not.

Main Difference:
Adjacency Model - easy to update, slow to query (must use recursion)
Nested Sets - easy to query (simple SQL), must update half of
recordset for every update.

I'm still waiting to find out how to represent a "forest" in a nested
set model.

Cheers,
Jason Lepack

On Feb 21, 5:39 pm, "jonceramic" <joncera...@gmail.comwrote:
Hi all,
I'm not sure exactly what words to use or how to Google this. (I keep
coming up with BOL links.) So, I'm going to ask the group for a
starting point or proper terms to even describe what I'm doing. Is
this a "thread handler? Or a "hierarchy tree" or what?
-----------------------
Basically, I'm working on a project that will be a task and project
tracking tool. What I've been asked to do is provide functionality
for two things at a Manager level.
1. Radar lists
2. sub projects.
Both of them involve the possibility of having a
1. Project
1.A Subproject
1.A.i. Sub-sub-project
...to infinity.
1.B Subproject b
1.B.i Sub-sub project b.
I'd like to be able to sort them out like Windows Explorer does
directories. Or like a usenet reader or a blog site handles threads.
I know to relate the table to itself by having a table structure
like...
ProjectID
ProjectTitle
ParentProjectID
Where ParentProjectID is another ProjectID in the list. i.e. The
example I typed above would be something like this...
1, Project, null
2, Subproject, 1
3, sub-sub-project, 2
4, subproject b, 1
5, sub-sub-project b, 4
But, I haven't been able to figure out a method for queries that
somehow discerns what is a top level, second level, third level, etc
item for the purposes of queries and reports.
-------
Anyway, I assume this is a standard method for database writers that
has a standard name. So, if anyone can let me in on that, I'd
appreciate it so I can start learning! :)
Many TIA,
Jon- Hide quoted text -

- Show quoted text -
Jason and Storrboy... Thank you, this is exactly what I needed.
Searching for these terms (treeview, listview, netsted sets, and
adjacency model) gets me copious examples of code and theory for how
to set things up. many thanks. Jon
Feb 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Arnold | last post by:
We are currently in the process of developing a client/server based generic tree application with which we want to be able to model and render any size, shape and depth of tree. Our primary...
6
by: JC | last post by:
Hi, I'm looking for some help on Binary trees, in particular levels, heights etc. I need to find the levels of a tree, I also need to determine the minimum, maximum and average leaf levels. ...
0
by: Chi | last post by:
This is a problem that has been nagging me for a while, and I cannot figure out how to best solve the problem: I have a stored procedure that returns multi-level "nested" XML and inline XDR. My...
0
by: Raed Sawalha | last post by:
I have the following code where Build the relation on DataSet Schema I got the error that Child Has Multiple Tables DataTable LoData = new DataTable("LearningOutcomesDT"); DataTable LoDocData...
3
by: Bryan Christopher | last post by:
Hello All! I have a rather abstract question for some genius out there to answer. I want to integrate communication tracking, for customer relations, into an existing Access DB. What I was going...
0
by: Ron | last post by:
I am trying to create a nested DataList with multiple subcategories listed under each primary category. Unfortunately, I end up with a bunch of multiple SubCategory values after iterating through...
0
by: George Durzi | last post by:
I have a DataSet with 3 tables, and two DataRelations dsSubs.Tables.TableName = "Subscriptions" dsSubs.Tables.TableName = "AccountManagers" dsSubs.Relations.Add "AccountManagers_Subscriptions",...
3
by: Eirik Eldorsen | last post by:
Im trying to make a nested repeater with 3 levels. I've successfully created a nested repeater with 2 levels, but when adding the 3rd level I get an InvalidCastException. What am I doing wrong? ...
7
by: jefftyzzer | last post by:
Friends: In a DB2 UDB LUW table, I have a table with pairs of equivalent ID's. What I want to do is assign all equivalent IDs to the same group number, including those that are transitively...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.