home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8843 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  2.0 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!devonuk!usenet
  2. From: don@duncan (Don Radvan)
  3. Newsgroups: comp.databases
  4. Subject: Hierarchical Structures in RDBMS
  5. Keywords: hierarchical
  6. Message-ID: <1993Jan6.094340.5870@devon.co.uk>
  7. Date: 6 Jan 93 09:43:40 GMT
  8. Sender: usenet@devon.co.uk (Mr. USENET)
  9. Organization: Devon Systems International
  10. Lines: 40
  11. Nntp-Posting-Host: duncan
  12.  
  13.  
  14. I have an interesting problem. I need to represent hierarchical data  
  15. structures within a relational db, but I need to do it in a way that  
  16. permits the user to create his own hierarchy. That is, I do not know the  
  17. structure of the hierarchy before hand. 
  18.  
  19. For example:
  20.     A user wants to organize various objects. These objects will  
  21. appear as leaf nodes in the user's own hierarchy. The user may choose many  
  22. different ways of organizing these objects, indeed, s/he may have many  
  23. simultaneous hierarchies of organization for each set of objects. What  
  24. results is a sort of directory tree. Each directory is a category of  
  25. objects and each "file" or non-directory entry in a directory is an  
  26. object. Given the objects of apples and oranges, we may get the following:
  27.  
  28.                                   Stuff
  29.                                     |
  30.                     --------------------------------
  31.                   Food                          Non-Food
  32.                     |
  33.             ---------------------- . . .
  34.          Fruit        Veggies 
  35.            |
  36.      -------------
  37.   Apples       Oranges
  38.  
  39. And so when s/he does a query such as the following:
  40.     select name where Food = "Fruit"
  41. or
  42.     select name where Stuff = "Food" AND Food = "Fruit"
  43.  
  44. we would get Apples and Oranges.
  45.  
  46. Any thoughts would be appreciated. Please reply by email.
  47.  
  48. --
  49.   Don Radvan           #  Devon Systems International                 
  50.   +44 071 499 8381     #  14 Old Park Lane                   Wedding Bells
  51.   don@devon.co.uk      #  London W1Y 3LH     UK                in March  
  52.   NeXTmail friendly    #              "Betwixt Hyde and Green"                    
  53.