473,385 Members | 1,782 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,385 software developers and data experts.

Multiple Parent Hierarchy...

I have searched and found where this has been discussed, but the
suggestions I have found have all ended up tuning into debated about
whether it needs to be done - but - as far as I can tell - I need to.

I am trying to setup a database that tracks parcel history. I want
to be able to choose a parcel and see a list of its children (smaller
pieces to the property that have been sold off) and a list of its
parents (previous tracts/parcels that created the current parcel).
This does happen, where I have had pieces of larger parcels that were
sold off from the larger parcels and combined into a single new
parcel. I would like to represent this in some hierarchy 'tree' view
to make it easy for users to select a parcel to see it's details, but
to be able to quickly move up and down the 'tree' studying details of
the selected parcel.

I figured on using a database table with a parcelID, parentParcelID
and other parcel related fields. I could then use selects to return
the parents and childrent o populate some control to display them.
TreeView can't do this since it only supports a single parent. Is
there any other control or method you could recommend to accomplish
this?

Thanks!
Jul 25 '08 #1
3 4218
Andrew Meador <an****@meadorcrafts.comwrote:
I have searched and found where this has been discussed, but the
suggestions I have found have all ended up tuning into debated about
whether it needs to be done - but - as far as I can tell - I need to.

I am trying to setup a database that tracks parcel history. I want
to be able to choose a parcel and see a list of its children (smaller
pieces to the property that have been sold off) and a list of its
parents (previous tracts/parcels that created the current parcel).
This does happen, where I have had pieces of larger parcels that were
sold off from the larger parcels and combined into a single new
parcel. I would like to represent this in some hierarchy 'tree' view
to make it easy for users to select a parcel to see it's details, but
to be able to quickly move up and down the 'tree' studying details of
the selected parcel.
The trouble is, what you have isn't a tree. In a tree, each node *does*
only have one parent.

What would you want the UI to actually look like? How would you
represent the multiple parents for multiple children?

One option might be to use a tree view, but populate each of the
parents with the child. It could get ugly very quickly though...

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Jul 25 '08 #2
"Andrew Meador" <an****@meadorcrafts.comwrote in message
news:28**********************************@s50g2000 hsb.googlegroups.com...
I have searched and found where this has been discussed, but the
suggestions I have found have all ended up tuning into debated about
whether it needs to be done - but - as far as I can tell - I need to.

I am trying to setup a database that tracks parcel history. I want
to be able to choose a parcel and see a list of its children (smaller
pieces to the property that have been sold off) and a list of its
parents (previous tracts/parcels that created the current parcel).
This does happen, where I have had pieces of larger parcels that were
sold off from the larger parcels and combined into a single new
parcel. I would like to represent this in some hierarchy 'tree' view
to make it easy for users to select a parcel to see it's details, but
to be able to quickly move up and down the 'tree' studying details of
the selected parcel.

I figured on using a database table with a parcelID, parentParcelID
and other parcel related fields. I could then use selects to return
the parents and childrent o populate some control to display them.
TreeView can't do this since it only supports a single parent. Is
there any other control or method you could recommend to accomplish
this?

Thanks!
With respect to the data modelling, I'd start with the thought that you have
a directed acyclic graph (DAG). Where the 'acyclic' comes in is due to the
fact that logically, if parcel A is subdivided into parcels A1 and A2, that
if sometime later A1 and A2 are combined into a new parcel, that will be B,
not A, even though the plot of land is identical.

The vertices of the DAG represent parcels. You'd store history (start/end
dates) here as well as other parcel information. This system would easily
account for changes in ownership or appurtenances, not just fragmentation
and consolidation of parcels. So you'd have one table to store vertex
(parcel) data.

The edges represent lineage. Another table would store edge data, and each
row would have two parcel IDs - parcelID and parentID. Bear in mind that
"parent" means not just spatial parent but also temporal parents. For a
graph these are the predecessor vertices.

The edge table makes it easy, for any vertex/node V, to find what the
predecessors (parents) and successors (children) are. In the first case you
are looking for all parentIDs for a given parcelID. In the second case you
want all parcelIDs for a given parentID.

I may have just taught my grandmother how to suck eggs, for which I
apologize in advance. But you did mention _one_ database table.

For viewing, well, I'd look for something that just displays graphs. I'm
taking a gander at this:
http://www.codeproject.com/KB/miscctrl/quickgraph.aspx

AHS
Jul 26 '08 #3
On Jul 26, 6:50*pm, "Arved Sandstrom" <asandst...@accesswave.ca>
wrote:
"Andrew Meador" <and...@meadorcrafts.comwrote in message

news:28**********************************@s50g2000 hsb.googlegroups.com...


* I have searched and found where this has been discussed, but the
suggestions I have found have all ended up tuning into debated about
whether it needs to be done - but - as far as I can tell - I need to.
* I am trying to setup a database that tracks parcel history. I want
to be able to choose a parcel and see a list of its children (smaller
pieces to the property that have been sold off) and a list of its
parents (previous tracts/parcels that created the current parcel).
This does happen, where I have had pieces of larger parcels that were
sold off from the larger parcels and combined into a single new
parcel. I would like to represent this in some hierarchy 'tree' view
to make it easy for users to select a parcel to see it's details, but
to be able to quickly move up and down the 'tree' studying details of
the selected parcel.
* I figured on using a database table with a parcelID, parentParcelID
and other parcel related fields. I could then use selects to return
the parents and childrent o populate some control to display them.
TreeView can't do this since it only supports a single parent. Is
there any other control or method you could recommend to accomplish
this?
* Thanks!

With respect to the data modelling, I'd start with the thought that you have
a directed acyclic graph (DAG). Where the 'acyclic' comes in is due to the
fact that logically, if parcel A is subdivided into parcels A1 and A2, that
if sometime later A1 and A2 are combined into a new parcel, that will be B,
not A, even though the plot of land is identical.

The vertices of the DAG represent parcels. You'd store history (start/end
dates) here as well as other parcel information. This system would easily
account for changes in ownership or appurtenances, not just fragmentation
and consolidation of parcels. So you'd have one table to store vertex
(parcel) data.

The edges represent lineage. Another table would store edge data, and each
row would have two parcel IDs - parcelID and parentID. Bear in mind that
"parent" means not just spatial parent but also temporal parents. For a
graph these are the predecessor vertices.

The edge table makes it easy, for any vertex/node V, to find what the
predecessors (parents) and successors (children) are. In the first case you
are looking for all parentIDs for a given parcelID. In the second case you
want all parcelIDs for a given parentID.

I may have just taught my grandmother how to suck eggs, for which I
apologize in advance. But you did mention _one_ database table.

For viewing, well, I'd look for something that just displays graphs. I'm
taking a gander at this:http://www.codeproject.com/KB/miscctrl/quickgraph..aspx

AHS- Hide quoted text -

- Show quoted text -
You understand this very well! Thanks! I hadn't thought about
trying to handle it through graphing methods, but the link you gave me
would seem at first glance to be a great solution. I could use the
vertixes as parcels (as you suggested) and this library would allow
the user to click on any node - upon which I could pull the related
details to population other fields on the form. All parcels have a
parent parcel, so it made sense to me to put the reference to the
parentParcelID within each parcels data withing one table. I guess
that could be separated out as you suggested, and maybe could get
better performance vs. having this data in one table with and index on
the table. Not sure - I'd have to think about the pro's/con's of each
approach.

Anyway, thanks for your link and suggestions - this gives me a good
direction to continue with!

Andrew
Jul 28 '08 #4

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

Similar topics

14
by: Axel Straschil | last post by:
Hello! Im working with new (object) classes and normaly call init of ther motherclass with callin super(...), workes fine. No, I've got a case with multiple inherance and want to ask if this...
8
by: pb648174 | last post by:
I have a single update statement that updates the same column multiple times in the same update statement. Basically i have a column that looks like .1.2.3.4. which are id references that need to...
5
by: BPearson | last post by:
Hello I would like to have several sites share a single web.config file. To accomplish this, I would point the root of these sites to the same folder. Is there any reason why I might not want to...
8
by: Dip | last post by:
Hello Experts, Here is the code to flatten a PC hierarchy into a level based table. It works fine. SELECT t1.TASK_ID AS TASK_LV1, t2.TASK_ID AS TASK_LV2, t3.TASK_ID AS TASK_LV3, t4.TASK_ID AS...
2
by: dd | last post by:
I need to know whether an element can move itself to a new parent within the DOM. I can't find any function that offers me such an ability. Here's an example of a hierarchy: -body ....div 1 ...
3
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent...
7
by: Adam Nielsen | last post by:
Hi everyone, I'm having some trouble getting the correct chain of constructors to be called when creating an object at the bottom of a hierarchy. Have a look at the code below - the inheritance...
47
by: Larry Smith | last post by:
I just read a blurb in MSDN under the C++ "ref" keyword which states that: "Under the CLR object model, only public single inheritance is supported". Does this mean that no .NET class can ever...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.