473,503 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Heirarchical ADT supporting column and row objects

Hello,

I am trying to design an abstract data type (lets call it an HTable)
which mimics a heirarchical rcordset (ala ADO 2.0). I have got this far:

1). Data will be stored in a vector of vectors
2). The HTable Constructor will specify the datatypes for the columns -
and this cannot be changed later - ensuring all row columns are of the
same data types
3). Create a Row object that returns a vector "horizontal" slice at the
appropriate "row" in the vector of vectors
4). Create a Column object that returns a vector "vertical" slice at the
appropriate "column" in the vector of vectors

This it seems will work for a flat (2D) table. However, I can't seem to
work out how to make it heirarchical, i.e. specifiy a column that is of
type HTable.

Is there a library out there that already does this kind of thing (save
me reinventing the whel), or can someone please provide some helpful
links or sample code that shows how to do this?

Thanks very much

Ann

Jul 22 '05 #1
1 1122

"Dr Ann Huxtable" <an*********@research.de.edu> wrote in message
news:co**********@sparta.btinternet.com...
Hello,

I am trying to design an abstract data type (lets call it an HTable) which
mimics a heirarchical rcordset (ala ADO 2.0). I have got this far:

1). Data will be stored in a vector of vectors
2). The HTable Constructor will specify the datatypes for the columns -
and this cannot be changed later - ensuring all row columns are of the
same data types
3). Create a Row object that returns a vector "horizontal" slice at the
appropriate "row" in the vector of vectors
4). Create a Column object that returns a vector "vertical" slice at the
appropriate "column" in the vector of vectors

This it seems will work for a flat (2D) table. However, I can't seem to
work out how to make it heirarchical, i.e. specifiy a column that is of
type HTable.

Is there a library out there that already does this kind of thing (save me
reinventing the whel), or can someone please provide some helpful links or
sample code that shows how to do this?

Thanks very much

Ann


One way would be to derive all objects (including HTable itself) from a base
object. Then you could dynamically create the objects to go into your
table, storing pointers instead of objects in the table(s). You'd probably
want the HTable object to manage the creation and deletion of the actual
objects, so that you don't have both Columns and Rows trying to delete the
same object.

You ask about making an HTable as a column type. In my scheme, since you
have a column of pointers and not objects stored there, you are free to
store whatever you need. You can either make the HTable a descendant of the
base class, like any other data type, or you can make a kind of "link"
object descendant class whose pointers are stored there, and have that link
class do any work you need in accessing a separate, externally stored HTable
object. In either case, your tables contain only pointers to base class
objects (where each is instantiated as the specific object required by the
column it is in).

Hope this helps...

-Howard


Jul 22 '05 #2

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

Similar topics

1
1671
by: Richard Rice | last post by:
This may be a basic question, but defining anything other than a cursor is preffered. I have, as an example, 2 tables. One with customer data (addresses, phones, etc), the other is a listing of...
8
1999
by: Manu Ashok | last post by:
pls anybody help me with this. i need to make a query where i have to display all names of a category heirarchically. C1-->C2-->C3-->C4 where C1 is the top level category it shud b...
6
6188
by: Robert J. O'Hara | last post by:
I'm one of those people who practices what some consider "dull" and others consider "elegantly conservative" page design. I appreciate good traditional typography and standards-compliant liquid...
3
4712
by: BobforeApples | last post by:
Hi All, I was trying to apply databinding to a custom collection as in the MSDN Magazine article found in the August, 2005 issue. After converting the code in the article to C# and applying it to...
2
991
by: AJ | last post by:
Hi all, I am posting from the web based forum on msdn.com. My question is, how do i create the heirarchical table like controls that this forum uses to display posts. Any tutorials, links...
2
1400
by: Charlie | last post by:
Hi: I have one-to-many relation (customer > invoice > invoice_items) that I would like to display on web page using Repeater control. Can the control be bound to a heirarchical dataset to...
1
1407
by: Prawin | last post by:
Hi, My Requirement is to display the records from the database in Tree Like structure but I cannot use TreeView Control of ASP.Net 2.0 becuase I need to display multiple columns so Iam suppose to...
399
12634
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or...
1
1310
by: jehugaleahsa | last post by:
Hello: I am sure this is a common need, so I hope I can be brief. I have a heirarchical database setup such that one customer can have multiple contracts and those contracts can have multiple...
0
7205
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
7349
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...
1
7008
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...
0
5594
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,...
0
4688
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...
0
3177
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...
0
1521
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 ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.