Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 69661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:36:32+00:00 2026-05-10T19:36:32+00:00

I have to add a coupon table to my db. There are 3 types

  • 0

I have to add a coupon table to my db. There are 3 types of coupons : percentage, amount or 2 for 1.

So far I’ve come up with a coupon table that contains these 3 fields. If there’s a percentage value not set to null then it’s this kind of coupon.

I feel it’s not the proper way to do it. Should I create a CouponType table and how would you see it? Where would you store these values?

Any help or cue appreciated!

Thanks,

Teebot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:36:33+00:00Added an answer on May 10, 2026 at 7:36 pm

    You’re correct, I think a CouponType table would be fit for your problem.

    Two tables: Coupons and CouponTypes. Store the CouponTypeId inside the Coupons table.

    So for an example, you’ll have a Coupon record called ‘50% off’, if would reference the percent off CouponType record and from there you could determine the logic to take 50% off the cost of the item.

    So now you can create unlimited coupons, if it’s a dollar amount coupon type it will take the ‘amount’ column and treat it as a dollar amount. If it’s a percent off it will treat it as a percentage and if it’s an ‘x for 1’ deal, it will treat the value as x.

    - Table Coupons   - ID   - name   - coupon_type_id # (or whatever fits your style guidelines)   - amount # Example: 10.00 (treated as $10 off for amount type, treated as              # 10% for percent type or 10 for 1 with the final type)    - expiration_date  - Table CouponTypes   - ID   - type # (amount, percent, <whatever you decided to call the 2 for 1> :)) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You need to use the new live API added to… May 11, 2026 at 10:07 am
  • added an answer Look at the Form.AcceptButton property. May 11, 2026 at 10:07 am
  • added an answer You will need to use regex: <?php function emailize($text) {… May 11, 2026 at 10:07 am

Related Questions

I have to add a coupon table to my db. There are 3 types
I've created an excel sheet with Delphi 6. Now I have to add a
I need to add a specific column if it does not exist. I have
I have a python script that I would like to add a Shutdown when
I have a CompositeDataBoundControl and im trying to add a ItemCommand to it, ala
I have an ASP website which I need to add a RegEx match to.
Aloha I have a VS2008 solution to which I want to add a webservice
I have a simple GtkStatusBar created with glade,and want to add a simple message
I have a priority queue implementation in C# that I want to add a
I have a image button. I wanted to add a text Search on it.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.