473,563 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is tree structure the right concept?

Hi,

in my application I want to handle and store data in a hierarchic data
structure.
For example: persons who manage houses; houses have various numbers of
floors; floors have various numbers of rooms etc.

My first concept is to use a tree structure, to ideally save the whole
tree to file and load from file.

What do you suggest?
Would the TreeView-Component be appropriate?

Best wiches
googleo
Jul 22 '05 #1
1 1990

"googleo" <le********@net cologne.de> wrote in message
news:b5******** *************** ***@posting.goo gle.com...
Hi,

in my application I want to handle and store data in a hierarchic data
structure.
For example: persons who manage houses; houses have various numbers of
floors; floors have various numbers of rooms etc.

My first concept is to use a tree structure, to ideally save the whole
tree to file and load from file.
Well your data is a hierarchy, so a tree structure would seem reasonable.
But when computer people talk about trees they normally have something else
in mind. Namely a tree which can extend to infinite levels and where all the
data is the same type. For instance in a family tree, everyone is a person,
and you can have as many ancestors as you want. You data structure is
different in that you have a fixed number of levels and different data types
at each level. But if you want to call it a tree then that is fine by me.

What do you suggest?
Would the TreeView-Component be appropriate?


I have no idea what a TreeView-Component is, it has nothing to do with C++
(is it some sort of Windows thing, if so ask in a Windows programming
group). Nor has the rest of your question really but if you want to know how
to implement your chosen data structure that would be on topic in this
group.

john
Jul 22 '05 #2

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

Similar topics

3
1980
by: Steve | last post by:
I'm looking for some advice on how to design a set of tables to represent a tree style table structure in MySQL. I have a table that stores a set of items, with each item having a type. The type of the item belongs to a tree structure of types. e.g. Type1 +---- Type2 ---- Type3 +---- Type4 | +----...
7
1465
by: Matt Kruse | last post by:
I've just put up a new script on my site: http://www.mattkruse.com/javascript/mktree/ This script combines javascript and some tricky CSS to create the easiest-to-implement expandable/collapsable tree I've seen anywhere. Just define your tree structure in an <UL> list, set its CSS class, include the .js source file, and that's it! Newer...
4
2820
by: Henry Jordon | last post by:
I have everything pretty much done but I need to fix something in my coding. I want to be able to enter strings such as "love", "hate", "the", etc. but am unable to figure how to do this. I have put my .cpp and my .h code below. Please help and thank you very much. // include files #ifndef BINTREE_H #define BINTREE_H #include <iostream>...
19
6756
by: Christian Fowler | last post by:
I have a VERY LARGE pile of geographic data that I am importing into a database (db of choice is postgres, though may hop to oracle if necessary). The data is strictly hierarchical - each node has one, and only one parent. The depth should not exceed 6 or 7 levels. The initial import will have about 6 million leaves, and 3 million branches. I...
22
5352
by: delraydog | last post by:
It's quite simple to walk to the DOM tree going forward however I can't figure out a nice clean way to walk the DOM tree in reverse. Checking previousSibling is not sufficient as the previousSibling could be a node which has childNodes and therefore the 'true' previousSibling would be the *deepest* lastChild of the previousSibling... For...
1
2916
by: hn.ft.pris | last post by:
I have the following code: Tree.h defines a simple binary search tree node structure ########## FILE Tree.h ################ #ifndef TREE_H #define TREE_H //using namespace std; template <typename Tclass Tree{ private: Tree<T*left;
2
14679
by: aemado | last post by:
I am writing a program that will evaluate expressions using binary trees. Most of the code has been provided, I just have to write the code for the class functions as listed in the header file. However, I am really new to recursion and trees...and this program uses public functions and private helper functions, which I am completely lost in. Here...
8
1789
by: =?ISO-8859-1?Q?m=E9choui?= | last post by:
Problem: - You have tree structure (XML-like) that you don't want to create 100% in memory, because it just takes too long (for instance, you need a http request to request the information from a slow distant site). - But you want to be able to request data from it, such has "give me all nodes that are under a "//foo/bar" tree, and have a...
6
1799
by: Bart Kastermans | last post by:
I am playing with some trees. In one of the procedures I wrote for this I am trying to change self to a different tree. A tree here has four members (val/type/left/right). I found that self = SS does not work; I have to write self.val = SS.val and the same for the other members (as shown below). Is there a better way to do this? In the...
0
8103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.