Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: why hierarchy?

Re: why hierarchy?

From: Neo <neo55592_at_hotmail.com>
Date: 27 Jul 2006 08:23:56 -0700
Message-ID: <1154013835.983762.47500@75g2000cwc.googlegroups.com>


> Okay, there are several named things.

In dbd, each thing can have 0 to many names.

> Some of them are things, some are persons, some are persons with ages, and some are planets. Right so far?

In dbd, they are all things, some of them are further classified as a person, an age, a planet, etc.

> And their ID is the bit of magic which glues their characteristics together? (Hmm.. Sounds like Microdata has done this.)

Could someone post a Microdata script roughly equivalent to dbd's to model/query the above data?

> CRUD on things shouldn't be tough; you can handle those, right?

In dbd, they are new, create, select, update and delete. See www.dbfordummies.com/NLI/Function.asp for additional.

> And there are some hierarchies. Let's treat those as trees.

In the most general case, dbd manages a network where any thing can have any type and number of relationships with other things. A subset of the network can be a list, table, tree, etc. In the current example, each thing can be in 0 to many trees. In some trees, it can be the root. In some, a branch. In others a leaf. All without redundancy. See www.dbfordummies.com/Basic/Hierarchy.asp

> How are the trees and forest identified?
> How does one plant a new tree?
> How does one sprout a new leaf?
> How does a leaf become a branch?
> How does one prune a limb and graft it onto a different part of the tree?
> How does one cut a leaf from one tree and not the other?

All the above are quite easy and implementing them doesn't affect it in other hierarchies, lists, table, graphs, etc. Could you specify the above in a more specific manner? Will the following specific changes be sufficient? (If not, please specify)

How do I create a boss/employee hierarchy with Mary and John as boss of Adam and Eve who are both part of Earth? How do I add a new child of Mary named Suzie? How do I change Suzie from being a child of Mary to being a child of John?
How do I then make John a child of Mary instead of being a child of Adam and Eve?

Could you or someone post a roughly equivalent SQL script to model/query the original data and implement the above changes/additions for comparison? Received on Thu Jul 27 2006 - 10:23:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US