Topic: Re: Hierarchy in the plane
Hello, S, you wrote: S> There is a table with roles of type Role (Id, Parent) and table UserRole (User, Role). Roles can be hierarchical. Whether there is any elegant request without cursors to receive the table to type FlattenUserRole (User, Role) where lines on User would be doubled so much time, how many roles (including parent) have User. It is called transitive closing. "The elegant" request is possible in Oracle c it Hierarchical clause. In other DBMS with support recursive CTE the request without cursors too is possible, but its elegant to name already difficult (if as elegance to understand laconicism).