Forum OpenACS Q&A: Response to groups question
Company Internal Groups - Group Type --Managers Group - Group of group type Company Internal Group ----manageruser1 - Member of Managers Group --Employees Group - Group of group type Company Internal Group ----employeeuser1 - Member of Employees Group Company Customers Groups - Group Type --Customers - Group of Group Type Company Customers Groups ----CustCompany1 - Component of Customers Group -------CustCompany1user1 - Member of CustCompany1 -------CustCompany1user2 - Member of CustCompany1 ----CustCompany2 - Component of Customers Group -------CustCompany2user ... - Member of CustCompany2then you are definitely on the right track (I think).
As far as I understand, the difference between the two basic relationship types component and membership only applies to groups. Persons (and users) can only be in membership relation to groups. e.g. a user can never be a component of something.
Another source for confusion is that by default there is a subtype of the membership relation called "user profile". I don't know what it is supposed to do. It propably has a special meaning regarding subsites - I just remember that some time ago I tried to add a user to a group and for some reason I could not select this user when using the "User Profile" relation, it only worked with the plain Membership relation.
To check membership take a look at the plpgsql function acs_group__member_p - It should do exactly what you need. Make sure to have a recent cvs checkout though, because this function was fixed not that long ago.