I'm creating a db schema that involves users that can have multiple users.
I want to register different companies to use the web services.
For example:
- user A or B (etc) can signup and create a company account
- user A can create multiple accounts of other users with their types, similarly user B
If user A or B create different accounts, how would I know this particular user is belong to User A or B company ? I think user table have many to many relationship with itself (like basic friendship design).
Please suggest the best design .
Ex.
User 3,4 belongs to User A
User 5,6 belongs to User B