2

I have searched a lot in SO and SE but I did not get anything particularly about this kind of database design with coupon codes included. Please take a look at this problem.

I am developing a website in which I sell a service. People buy this service in advance (Pre-paid).

I sell that service in four plans

Monthly plan,

3 months plan,

6 months plan and

yearly plan.

But as encouragement for people to use my service initially, I want to give them a free coupon code(One or more). So that they can redeem in their accounts and use.

Coupons codes can be

Monthly Coupon Code,

2 months Coupon Code,

3 months Coupon Code and so on.

Each account will have an account_id in the user table.

I am struggling a lot to link This subscription model to coupons and Plans. I am a beginner at this kind of database design. Put me in a correct path.

  • Plan is a complex attribute of Subscription. Coupon is an entity linked to a Subscription as N:1. – Akina Sep 15 '18 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.