I have a matrix like this
User trial free
package1 fullaccess limited access very limited access
partial access to downloads previews expiration
package2 full access n/a n/a
full access to assets
how would I create a schema for this scenario
You would be best served by having a table for permissions:
(Containing such things as “Full Access”, “Partial”, etc) which would be a list of available permissions.
Then create packages: I would probably combine the User+Package as just packages
Finally populate your join table:
Giving your users a PackageID, you can query across the tables into the granted permissions.
This gives you the ability to alter the packages over time, add packages and add new permissions easily, all the while keeping the administration of your users to a minimum.