Also for more complex examples please read the .LRN user management stuff. Every member of .LRN is added to a global rel segment (user, stafff, etc) and every member of a class is added in a rel segment (professor, student etc)
I'm well aware of the fact this needs good documentation ... unfortunately rel segs were added very late in the life of ACS 4.x Tcl (everyone got moved to Java or laid off, apparently) and as they were at first considered experimental apparently documentation lagged.