Grief Coder
Grief Coder

Reputation: 6786

Optimal DB structure for a membership website with free and paid subscriptions

There is a regular Users (UserID, UserName, Email, Password) table which handles user registrations.

Which other tables should be added in order to handle paid membership with 2 types of paid subscriptions - Monthly and Yearly.

Upvotes: 0

Views: 238

Answers (2)

Pam Lahoud
Pam Lahoud

Reputation: 1105

I think you may want to distinguish between membership details and transactions. I like the idea of adding a membership_type column (should be a tinyint column with a separate lookup table), then having a membership_expiration column as well. If you want to track each membership purchase, you can have a separate transaction table that tracks purchases. This also gives you the ability to expand to other types of purchases or transactions in the future without modifying the data model.

Upvotes: 2

Beth
Beth

Reputation: 9607

How about adding a membership field to the users table with one of three values- null, monthly, or yearly?

Upvotes: 1

Related Questions