patternsqlMinor
Question on Design for User + User Groups + User Types + Subscriptions Model
Viewed 0 times
groupsuserdesignmodelfortypesquestionsubscriptions
Problem
I am redeveloping an existing web application with both weak source code and a weak underlying database design. I'm trying to develop things in a way that future expansion will be much easier, namely:
Here are a few screenshots of my unfinished schema. Do you see any problems / data inconsistencies that could arise from this design?
Orange squares are primary keys, and blue squares are foreign keys. Had to split this up into two images.
Users / Subscriptions / Auth Groups:
User Groups / Subscription Types:
Thanks in advance!
- Supporting new login mechanisms
- Supporting new user types (ie new subscriptions plans)
- Supporting new user roles
Here are a few screenshots of my unfinished schema. Do you see any problems / data inconsistencies that could arise from this design?
Orange squares are primary keys, and blue squares are foreign keys. Had to split this up into two images.
Users / Subscriptions / Auth Groups:
User Groups / Subscription Types:
Thanks in advance!
Solution
I think you overdid normalization:
table
- I dont see the purpose of the user_names table, i would store the names in the user
table
- Same for basic_user table, i would store the email and password in the user table as well
- A subscription can have multiple statuses? if not i would put id_status in the subscription table
Context
StackExchange Database Administrators Q#1192, answer score: 5
Revisions (0)
No revisions yet.