Database Design – Data Model for Web License Management

I'm trying to create something similar to Adobe ID for a 3D CAD software.

What would be the best data model and the best database structure for this?

The user creates an account with email> Purchase License> Insert a license into the system> Invite people to join the team, and then assign licenses to users for them to 39> use> downloaded web user portal license based on their authorization> install a db desktop software for a serial number> the user enters a code on the user portal and then pastes it into the software.


– Some users may have only one account for a single user using a license, they can be turned into a "corporate" account in order to resize the team and licenses, or reduce the number of members of the user. team and retain the licenses.

-The software uses a perpetual model, with a USB security dongle system

-The owner of the account has the authority to manage the member users to be assigned to this license or use the license itself.

Problems / Questions:
-I have an admin console for the technical support of my company to manage these users and their users. I must display the relationship between the member, the dongle and the account holder. How to link the dongle, the member and the account holder when the dongle and the owner have no apparent relationship in the database? How to avoid multi-to-multi relationships? common table? is the wrap of all these things in a business identifier a solution? The challenge is that not all users have companies, and we do not want to use the user name but the account owner messaging to consolidate all this information. There is also a risk that the account holder will be removed from a real company. So we have to delete it and replace it with the help of my company's console without breaking other relationships.