title: Database users and groups model
body: <p>I have 2 entities: users and groups. Easiest model is user(id,name,etc...), group(id,name), user_group_rel(user_id,group_id). But I need to include groups into other groups. One user can be in many groups and groups can include users and subgroups with own users and subgroups!
  Need help with database model!</p>
  
  <p><a href="https://i.stack.imgur.com/Ffr0s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ffr0s.png" alt="Users and groups"></a></p>