dbTalk Databases Forums  

Data Structure Help - Recursive?

comp.databases.ms-access comp.databases.ms-access


Discuss Data Structure Help - Recursive? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Elliot
 
Posts: n/a

Default Data Structure Help - Recursive? - 01-07-2005 , 08:15 PM






I'm having trouble structuring the data in an investment database. The
basics are:

* Investors invest in Deals
* Investors can be either Individuals or Entities
* Entities may or may not contain individual Members
* Entity Members can be either Individuals or Entities
* An Investor in one Deal may be a Member of an Entity that is an
Investor in another (or even the same) Deal.
* There is no limit to the depth of this "tree"

My issue is how to structure the data to support these relationships
while enabling flexibility in the depth of display for Investors - i.e.
show just the highest-level Investor or drill down N levels in the "tree".

I'm a novice with Access, so I apologize if I'm not explaining the
problem clearly. Any advice would be greatly appreciated.

Reply With Quote
  #2  
Old   
MGFoster
 
Posts: n/a

Default Re: Data Structure Help - Recursive? - 01-07-2005 , 08:57 PM






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You've described it well. It sounds like an adjacency list model or
nested set model would be the way to set up your, relevant, tables.
This is also called a Bill of Materials (BOM) model. The most famous
book on adjacency list & nested sets is Joe Celko's. See his book _Joe
Celko's SQL For Smarties: Advanced SQL Programming_. There are also
many discussions of all three models in SQL forums and this newsgroup.
Try reading the Google group archives in these newsgroups:

comp.databases.ms-access
microsoft.public.sqlserver.programming

To understand these models it would be a good idea to read any
programming books that include discussions of data structures: linked
lists, trees, especially.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQd9MHoechKqOuFEgEQLWDQCeJKdb+wICgcL1+h0IMVszka 1m04UAniFK
FAO0QB2bV8/KCnreknuJEBpg
=mj35
-----END PGP SIGNATURE-----


Elliot wrote:
Quote:
I'm having trouble structuring the data in an investment database. The
basics are:

* Investors invest in Deals
* Investors can be either Individuals or Entities
* Entities may or may not contain individual Members
* Entity Members can be either Individuals or Entities
* An Investor in one Deal may be a Member of an Entity that is an
Investor in another (or even the same) Deal.
* There is no limit to the depth of this "tree"

My issue is how to structure the data to support these relationships
while enabling flexibility in the depth of display for Investors - i.e.
show just the highest-level Investor or drill down N levels in the "tree".

I'm a novice with Access, so I apologize if I'm not explaining the
problem clearly. Any advice would be greatly appreciated.

Reply With Quote
  #3  
Old   
Mike MacSween
 
Posts: n/a

Default Re: Data Structure Help - Recursive? - 01-08-2005 , 01:18 AM



Actually Joe has a book out specifically on this:

http://www.amazon.com/exec/obidos/AS...356133-3944959


"MGFoster" <me (AT) privacy (DOT) com> wrote

Quote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You've described it well. It sounds like an adjacency list model or
nested set model would be the way to set up your, relevant, tables.
This is also called a Bill of Materials (BOM) model. The most famous
book on adjacency list & nested sets is Joe Celko's. See his book _Joe
Celko's SQL For Smarties: Advanced SQL Programming_. There are also
many discussions of all three models in SQL forums and this newsgroup.
Try reading the Google group archives in these newsgroups:

comp.databases.ms-access
microsoft.public.sqlserver.programming

To understand these models it would be a good idea to read any
programming books that include discussions of data structures: linked
lists, trees, especially.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQd9MHoechKqOuFEgEQLWDQCeJKdb+wICgcL1+h0IMVszka 1m04UAniFK
FAO0QB2bV8/KCnreknuJEBpg
=mj35
-----END PGP SIGNATURE-----


Elliot wrote:
I'm having trouble structuring the data in an investment database. The
basics are:

* Investors invest in Deals
* Investors can be either Individuals or Entities
* Entities may or may not contain individual Members
* Entity Members can be either Individuals or Entities
* An Investor in one Deal may be a Member of an Entity that is an
Investor in another (or even the same) Deal.
* There is no limit to the depth of this "tree"

My issue is how to structure the data to support these relationships
while enabling flexibility in the depth of display for Investors - i.e.
show just the highest-level Investor or drill down N levels in the
"tree".

I'm a novice with Access, so I apologize if I'm not explaining the
problem clearly. Any advice would be greatly appreciated.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.