Forum OpenACS Development: Re: Hierarichal Trees With No cyclic

Collapse
Posted by Tom Jackson on
Is it possible you are taking an intro course in SQL?

Anyway, the answer is that you would need a procedural language function to enforce this constraint.

There are probably many better places to ask this question, even the Q&A Forum here at OpenACS would be better, but maybe an open source db forum somewhere. Suggestions, anyone?

The main problem with the question is that hierarchies in SQL don't exist, they are invented by the end user. You decide, by repeated application of a query, what hierarchy exists between objects.

If this question goes along with the previous one you asked about, with the ordering of parent, child, grandchild, then the easy intro SQL course answer is to enforce the child id to be greater than the parent id.

Collapse
Posted by roohie natt on
Well its known that procedure would be required
but the requriement dosent allow to work in PL/SQL
so just the sujjestions were welcomed if anything could be done in SQL

about taking an course in SQL .its not forum to answer such question

It was just that the exact forum was not known where the
questions could be posted.
But had quite nice responses here.