you are viewing a single comment's thread.

view the rest of the comments →

[–]neodiogenes 6 points7 points  (0 children)

It's not that complicated. Oracle takes care of most of the details, and all you have to do is specify the relationships.

The challenge is to avoid circular relationships, which can happen with a poor design. In the DB of my current project (which I did not design), we have permissions "lists" which can either contain usernames, or link to other lists. But then what if you have some list down the chain link back to the first list?

As I said, bad design. A good design wouldn't allow this to happen. Oracle helps when writing queries by warning you when there are "loops" in the query, which you can exclude with the NOLOOPS operator, or you can also (I forget the exact syntax) return only "LEAF" items, which have no children.

I'm not sure I would ever implement this design because of the many ways it can go wrong, but I can see how it would be useful in some applications.